所以我试图让我的应用程序在对话框中显示一个可编辑的文本字段。一旦你输入了你想要的文本,你可以点击'OK‘来使用该文本转到下一个视图,并根据该文本做一些事情。
所以这就是我的代码。
public void onClick(View v){
final EditText input = new EditText(MainActivity.this);
final AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create();
alertDialog.setTitle(&
我已经以编程方式创建了TextView,现在我想将文本颜色设置为下面的TextView是我的代码
TableLayout ll = (TableLayout) findViewById(R.id.auditContent);
public TableRow row;
TextView txtNumber;
for (int i = 0; i < ItemCount; i++) {
row = new TableRow(MainActivity.this);
TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.Lay
public void onClick(View arg0) {
final Dialog dialog = new Dialog(Hero.this);
ListView list = new ListView(Hero.this);
final ArrayList<Spell> spells = new ArrayList<Spell>();
for (int i = 0; i < MainActivity.charSpells.size(); i++){
if