Reputation: 9
I read data from a Dialog but I'm unable to set that data on a TextView.
What am I doing wrong?
Upvotes: 0
Views: 339
Reputation: 11
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);
Upvotes: 1
Reputation: 33792
// 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.");
Upvotes: 1