开发者

Unable to set data from a Dialog on a TextView

开发者 https://www.devze.com 2023-02-14 15:44 出处:网络
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.

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

精彩评论

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