我从Dialog读取数据,但我无法在TextView上设置该数据。
我做错了什么?
答案 0 :(得分:1)
// 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.");
答案 1 :(得分:1)
自定义对话框时,应该这样做:
LayoutInflater inflater = LayoutInflater.from(this);
final View layoutview = inflater.inflate(R.layout.rootview, null);
final TextView title=(TextView) layoutview.findViewById(R.id.text);