I am creating a dialogue with a number picker and a button but unfortunately it is taking up the entire screen.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<NumberPicker
android:id="@+id/numberPicker1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:descendantFocusability="blocksDescendants"
android:layout_marginTop="64dp" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/numberPicker1"
android:text="Set" />
</RelativeLayout>
Here is how i am creating the dialogue
final Dialog d = new Dialog(CreateShiftActivity.this, R.style.Theme_AppCompat);
d.setTitle("NumberPicker");
d.setContentView(R.layout.num_dialog);