我应该列出可点击的项目。我暂时写了文字。如何使它们可点击?抱歉,我刚开始在 Android 中编程。你能帮我写代码吗?
public class CustomDialog extends Dialog
{
public CustomDialog(Context context)
{
super(context, android.R.style.Theme_Translucent_NoTitleBar);
}
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
//requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.privacy_popup);
TextView text = ((TextView)this.findViewById(R.id.text));
text.setText(Html.fromHtml("<b>item<b>"));
//text.setText("Privacy");
TextView text2 = (TextView) findViewById(R.id.text2);
text2.setText(Html.fromHtml("<b>item2<b>"));
TextView text3 = (TextView) findViewById(R.id.text3);
text3.setText(Html.fromHtml("<b>item3<b>"));
TextView text4 = (TextView) findViewById(R.id.text4);
text4.setText(Html.fromHtml("<b>item4<b>"));
}
}