I have this problem with alert dialog button
I have successfully added some data in database using this 

[![enter image description here](https://i.stack.imgur.com/Jqldp.png)](https://i.stack.imgur.com/Jqldp.png)

but what i am aiming is like this
[![enter image description here](https://i.stack.imgur.com/XHi8O.png)](https://i.stack.imgur.com/XHi8O.png)

any help will be appreciated :)
and here is my code

```
mylistView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                    @Override
                    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                        LayoutInflater layoutInflater = LayoutInflater.from(context);
                        View promptView = layoutInflater.inflate(R.layout.activity_prompt_attendance, null);
                        AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
                        alertDialogBuilder.setView(promptView);
                        alertDialogBuilder.setTitle("Attendance:");

                        alertDialogBuilder
                                .setCancelable(false)
                                .setPositiveButton("OK", new DialogInterface.OnClickListener() {
                                    @Override
                                    public void onClick(DialogInterface dialog, int which) {

                                    }

                                })
                        .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                dialog.cancel();

                            }
                        });
                        AlertDialog alertD = alertDialogBuilder.create();
                        alertD.show();

                    }
                });

```

this is thepromptAttendance xml file

```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center_vertical"
tools:context="com.ucu.ccs.classrecord.promptAttendance">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:layout_marginTop="20dp">
    <EditText
        android:id="@+id/Date"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:hint="Date"/>
    <RadioGroup
        android:id="@+id/radio1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp">
        <RadioButton
            android:id="@+id/present"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Present"/>
        <RadioButton
            android:id="@+id/absent"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Absent"/>
    </RadioGroup>

</LinearLayout>

```

and this is the promptAttendance java file

```
public void goAdd(View view){
    new AttemptGetData().execute();
}

class AttemptGetData extends AsyncTask<String, String, String>{
    String date = Date.getText().toString();
    String remarks = RadioAttBtn.getText().toString();

    @Override
    protected void onPreExecute() {
        super.onPreExecute();
        pDialog = new ProgressDialog(promptAttendance.this);
        pDialog.setMessage("In Progress...");
        pDialog.setIndeterminate(false);
        pDialog.setCancelable(true);
        pDialog.show();
    }

    @Override
    protected String doInBackground(String... params) {
        List<NameValuePair> mList = new ArrayList<NameValuePair>();
        mList.add(new BasicNameValuePair("date", date));
        mList.add(new BasicNameValuePair("remark", remarks));

        Log.d("starting", "fetch");

        JSONObject json = jsonParser.makeHttpRequest(url, "POST", mList);

        try {
            verify = json.getString("Message");
            return verify;
        }catch (JSONException e){
            e.printStackTrace();
        }
        return null;
    }

    @Override
    protected void onPostExecute(String s) {
        super.onPostExecute(s);

        pDialog.dismiss();
        if (s != null){
            Toast.makeText(getApplicationContext(), verify, Toast.LENGTH_LONG).show();
            Date.setText(null);
        }
    }
}

```