title: use few button and other widget in Fragments
body: <p>I want to use a few <code>Button</code>, <code>Spinner</code> and <code>TextView</code> on fragmets but i don't know how to do that since i was newbie in android programming.</p>
  
  <p>I'd appreciate any help! Thanks a lot! </p>
  
  <p>here's my java activity</p>
  
  <pre><code>package com.elvis.triagetags;
  
  import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  public class formActivity extends Fragment {
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
  
      View rootView = inflater.inflate(R.layout.form, container, false);
  
      return rootView;
  }
  }
  </code></pre>
  
  <p>and this my form.layout</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  tools:context=".MainActivity" &gt;
  
  &lt;ScrollView
      android:id="@+id/scrollView1"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_above="@+id/relativeLayout1"
      android:layout_alignParentTop="true" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="428dp"
          android:orientation="vertical"
          android:padding="15dp" &gt;
  
          &lt;TextView
              android:id="@+id/textView2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:text="@string/header"
              android:textSize="25sp" /&gt;
  
          &lt;TextView
              android:id="@+id/fullname"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:text="@string/fullname"
              android:textColor="#0000CD"
              android:textSize="21sp" /&gt;
  
          &lt;EditText
              android:id="@+id/etIden"
              android:layout_width="284dp"
              android:layout_height="wrap_content"
              android:ems="10"
              android:inputType="textPersonName"
              android:textSize="21sp" /&gt;
  
          &lt;TextView
              android:id="@+id/Gen"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginTop="15dp"
              android:text="@string/gen"
              android:textColor="#0000CD"
              android:textSize="21sp" /&gt;
  
          &lt;Spinner
              android:id="@+id/spinGen"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@android:drawable/btn_dropdown" /&gt;
  
          &lt;TextView
              android:id="@+id/tvdate"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginTop="15dp"
              android:text="@string/date"
              android:textColor="#0000CD"
              android:textSize="21sp" /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content" &gt;
  
              &lt;EditText
                  android:id="@+id/etdate"
                  android:layout_width="0.99dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:background="@android:drawable/editbox_background"
                  android:ems="10"
                  android:inputType="date" &gt;
              &lt;/EditText&gt;
  
              &lt;Button
                  android:id="@+id/btnDate"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:background="@drawable/wp_button"
                  android:text="@string/date1" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;ImageView
              android:id="@+id/imageView1"
              android:layout_width="148dp"
              android:layout_height="0dp"
              android:layout_gravity="center"
              android:layout_marginTop="25dp"
              android:layout_weight="0.87"
              android:contentDescription="@string/pop"
              android:src="@drawable/no_image" /&gt;
  
          &lt;TextView
              android:id="@+id/imageDetails"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:text="@string/urlImage"
              android:textColor="#000000"
              android:textSize="14sp"
              android:textStyle="italic"
              android:typeface="serif" /&gt;
  
          &lt;Button
              android:id="@+id/capture_button"
              android:layout_width="150dp"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:background="@drawable/wp_button"
              android:text="@string/capture" /&gt;
  
          &lt;Button
              android:id="@+id/next_button"
              android:layout_width="150dp"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:layout_marginTop="25dp"
              android:background="@drawable/wp_button"
              android:text="@string/bt" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  
  &lt;RelativeLayout
      android:id="@+id/relativeLayout1"
      android:layout_width="match_parent"
      android:layout_height="30dp"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true"
      android:background="#000000"
      android:gravity="center" &gt;
  
      &lt;TextView
          android:id="@+id/textView4"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/elvis"
          android:textColor="#ffffff"
          android:textSize="16sp" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>