I ve created Custom Dialog with Button on them :
AFter that i tried to add on click listener on this form..How i can do this? WHen i wrote
within Oncreate the application had crashed in emulator with error UNNABLE TO START ACTIVITY.
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
>
<EditText android:id="@+id/EditText01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"></EditText>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Провести"
android:id="@+id/Enter"></Button>
</LinearLayout>
AFter that i tried to add on click listener on this form..How i can do this? WHen i wrote
Code:
EnterButoon=(Button) findViewById(R.id.Enter);
EnterButoon.setOnClickListener(this);
Code:
@Override
protected Dialog onCreateDialog(int id) {
Context mContext = getApplicationContext();
Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.custom_dialog);
dialog.setTitle("Введите категорию");
return dialog;
}