0

我是安卓新手。我有一个包含 imageview 和 textview 的布局。我还有一个包含一些数据信息的列表。

我想在 textview 位置的对话框中添加列表。Imageview 设置为默认图像,我想把它留给 momenet。稍后我将有一个带有 imageview 的新列表,我想从 layout.view pos 将其设置为我的 imageview。

我想问一下如何将列表数据设置为textview以及如何从对话框中获取点击的元素我不知道如何在文本的对话框中添加列表

builder = new AlertDialog.Builder(getApplicationContext());
LayoutInflater li = (LayoutInflater) getApplicationContext().getSystemService(LAYOUT_INFLATER_SERVICE);  
View promptsView = li.inflate(R.layout.contact_filster_list,(ViewGroup) findViewById(R.id.layout_root));
builder.setView(promptsView);
final ImageView userInput = (ImageView) promptsView.findViewById(R.id.dialog_icon);
final TextView userInput1 = (TextView) promptsView.findViewById(R.id.dialog_text);
4

0 回答 0