I have made a dialog which I am happy with. The problem is that I want the dialog to open with information from the database. Now the layout of the dialog is done. But for one thing some sort of field box that the data will be called to. I don’t know what I need to input into the layout for that to display.
Any help with great. Thank you
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();
}
});
}
}
1 Answer