开发者

Unable to set data from a Dialog on a TextView

I read data from a Dialog but I'm unable to set that data on a TextView.

What am I do开发者_如何学Pythoning wrong?


// We can't imagine what you are doing wrong, without seeing your source code.  
TextView facePalm = (TextView)findViewById(R.id.youtextview);
facePalm.setText("Like Octavian Damiean said you should improve your question.");


When you customize a dialog, you should do it like this:

LayoutInflater inflater = LayoutInflater.from(this);
final View layoutview = inflater.inflate(R.layout.rootview, null);
final TextView title=(TextView) layoutview.findViewById(R.id.text);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜