title: how to add a widget which has two spinner items and put in a single dialog in android
body: <p>I am trying to design confirmation dialog which has two lists (scrollable). One part shows numbers of foot and another shows inches values. This should be in a single dialog as shown in the image below. Any suggestions to do this is appreciated.</p>
  
  <p><img src="https://i.stack.imgur.com/lXLQx.png" alt="see this image"></p>
  
  <p><em>I achieved this UI by using the following code</em><br>
  <strong>mycustomwidget.xml</strong></p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
      &lt;TextView
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="0.5"
          android:text="@string/txtHeight"
          android:id="@+id/tvHeight" /&gt;
      &lt;EditText
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="0.50"
          android:id="@+id/editText_Height"
          android:hint="select Height"
          android:paddingBottom="8dp"
          android:background="@drawable/border_bottom" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>in my Activity is used this code to get the dialog</p>
  
  <pre><code>editText_Height.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
      final Dialog dialog = new Dialog(ProfileInfo.this);
      dialog.setContentView(R.layout.height_picker);
      dialog.show();
      }
  });
  </code></pre>
  
  <p>heightpicker.xml</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:orientation="vertical"
      android:layout_width="250dp"
      android:layout_height="wrap_content"&gt;
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/txtHeight"
          android:layout_marginTop="24dp"
          android:textAlignment="center"/&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:background="@drawable/border_bottom"&gt;
          &lt;com.myapp.HelperClasses.MyNumberPicker
              android:id="@+id/footValue"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="0.5"
              android:layout_gravity="center"
              android:orientation="vertical"
              max="7"
              min="4" /&gt;
          &lt;com.myapp.HelperClasses.MyNumberPicker
              android:id="@+id/inchValue"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="0.5"
              android:layout_gravity="center"
              android:orientation="vertical"
              max="11"
              min="0" /&gt;
      &lt;/LinearLayout&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="52dp"
          android:orientation="horizontal"&gt;
          &lt;TextView
              android:id="@+id/textView_cancel"
              android:layout_width="0dp"
              android:layout_weight="0.5"
              android:layout_height="36dp"
              android:layout_marginTop="8dp"
              android:layout_marginLeft="24dp"
              android:text="@string/txtCancel"
              android:textAlignment="center"
              android:textColor="@color/blue"/&gt;
          &lt;TextView
              android:id="@+id/textView_Okay"
              android:layout_width="0dp"
              android:layout_weight="0.5"
              android:layout_height="32dp"
              android:layout_marginTop="8dp"
              android:layout_marginLeft="8dp"
              android:layout_marginRight="8dp"
              android:text="@string/txtOkay"
              android:textAlignment="center"
              android:textColor="@color/blue"/&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>