1
私は満足しているダイアログを作成しました。問題は、データベースからの情報でダイアログを開くことです。これでダイアログのレイアウトが完成しました。しかし、1つの事のために、データが呼び出されるフィールドボックスのいくつかの並べ替え。私はそれを表示するためにレイアウトに何を入力する必要があるのか分かりません。ダイアログに呼び出されたデータ
偉大なヘルプ。あなた
public class activity2 extends Activity {
/** Called when the activity is first created. */
Dialog Dialog;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main2);
Dialog = new Dialog(this);
Dialog.setContentView(R.layout.main3);
Dialog.setTitle("ProJect69");
Dialog.setCancelable(true);
TextView btn1 =(TextView) findViewById(R.id.textView4);
btn1.setOnClickListener(new OnClickListener(){
public void onBackpressed(){
Intent intent= new Intent(activity2.this,activity2.class);
startActivity(intent);
finish();
}
public void onClick(View v){
Dialog.show();
}
});
}
}
ありがとうだから私は、レイアウト内のどこのTextViewを置くとき。このコードを入力すると、データベースからのデータがテキストビューに置き換えられます。 – chock
はい。どうすればいいですか? –
他人を助けることができるときに私は私のコードを掲示してくれてありがとう – chock