-1

我尝试在具有不同布局但 TextView 上的文本没有改变的对话框上设置 TextView。我为此目的使用该代码:

    public void onDialogPositiveClick(DialogFragment dialog) {
    EditText et=(EditText)dialog.getDialog().findViewById(R.id.editText1);
    dosyaAdi=et.getText().toString();

    TextView txv=(TextView) dialog.getDialog().findViewById(R.id.header);
    txv.setText(parametre);


    if(dosyaIslemi){
    generateFeatures kayit=new generateFeatures(this,dosyaAdi);
    }
    else{
    generateFeatures kayit=new generateFeatures(this,dosyaAdi);
    }
    sm.registerListener(this, myAccelerometer,50000);
}
4

1 回答 1

0

dialog.setTitle(text); 有什么问题??

只需使用:

dialog.getDialog().setTitle("Title here");
于 2013-01-27T12:22:16.393 回答