title: Fragments not responding to buttonclicks
body: <p>I have a problem with my app. Firstly, I made two Tabs using <strong>fragments</strong> which inflates an <strong>activity</strong>. The tabs implemented is working fine. Secondly i have  displayed the <strong>XAML</strong> right. However there is not possible to interact with the buttons, but it's possible to write in the text fields. The text fields will however not respond when i try to update them with the buttons. </p>
  
  <p>The activities work properly not using the fragments, any clue what I can do? Any help is greatly appreciated! Thanks </p>
  
  <p>Here is my code: </p>
  
  <hr>
  
  <p><strong>MainActivity Code:</strong></p>
  
  <pre><code>public class TabActivity : AppCompatActivity
      {
          private DrawerLayout mDrawerLayout;
          protected override void OnCreate(Bundle savedInstanceState)
          {
              base.OnCreate(savedInstanceState);
              SetContentView(Resource.Layout.Main);
  
              //Toolbar
              SupportToolbar toolbar = FindViewById&lt;SupportToolbar&gt;(Resource.Id.toolBar);
              SetSupportActionBar(toolbar);
  
              //ActionBar
              SupportActionBar actionBar = SupportActionBar;
              actionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu);
              actionBar.SetDisplayHomeAsUpEnabled(true);
              //Drawer 
              mDrawerLayout = FindViewById&lt;DrawerLayout&gt;(Resource.Id.drawer_layout);
              NavigationView navigationView = FindViewById&lt;NavigationView&gt;(Resource.Id.nav_view);
              if(navigationView != null)
              {
                  setUpDrawerContent(navigationView);
              }
              //Tabs 
              TabLayout tabs = FindViewById&lt;TabLayout&gt;(Resource.Id.tabs);
  
              ViewPager viewPager = FindViewById&lt;ViewPager&gt;(Resource.Id.viewpager);
              setUpViewPager(viewPager);
  
              tabs.SetupWithViewPager(viewPager);
              };
      }
  
  
      // What Actually sets my tabs
          private void setUpViewPager(ViewPager viewPager)
          {
          //====================================
              //SET THE FRAGMENTS HERE.
          //====================================
              TabAdapter adapter = new TabAdapter(SupportFragmentManager);
              adapter.AddFragment(new Fragment1(), "Inventar");
              adapter.AddFragment(new Fragment2(), "Onskeliste");
  
              viewPager.Adapter = adapter;
          }
          public override bool OnOptionsItemSelected(IMenuItem item)
          {
              switch (item.ItemId)
              {
                  //Checks if the drawer is opened all the way up
                  case Android.Resource.Id.Home:
                      mDrawerLayout.OpenDrawer((int)GravityFlags.Left);
                      return true;
                  default:
                      return base.OnOptionsItemSelected(item);
              }
          }
          private void setUpDrawerContent(NavigationView navigationView)
          {
              navigationView.NavigationItemSelected += (object sender, NavigationView.NavigationItemSelectedEventArgs e) =&gt;
              {
                  e.MenuItem.SetChecked(true);
                  mDrawerLayout.CloseDrawers();
              };
          }
  
          //===================================
          // Creating a tab adapter which inherrit from a fragment adaper, is used to adapt the viewpager and tabs together
          //===================================
          public class TabAdapter : FragmentPagerAdapter
          {
  
              public List&lt;SupportFragment&gt; Fragments { get; set; }
              public List&lt;string&gt; FragmentNames { get; set; }
  
              public TabAdapter (SupportoFragmentManager sfm) : base (sfm)
              {
                  Fragments = new List&lt;SupportFragment&gt;();
                  FragmentNames = new List&lt;string&gt;();
              }
  
              public void AddFragment(SupportFragment fragment, string name)
              {
                  Fragments.Add(fragment);
                  FragmentNames.Add(name);
              }
  
              public override int Count
              {
                  get
                  {
                      return Fragments.Count;
                  }
              }
  
              //Gets the item of the fragemnt at the specific possition
              public override SupportFragment GetItem(int position)
              {
                  return Fragments[position];
              }
  
              //Sets the title of the fragment 
              public override ICharSequence GetPageTitleFormatted(int position)
              {
                  return new Java.Lang.String(FragmentNames[position]);
              }
          }
      }`
  </code></pre>
  
  <hr>
  
  <p><strong>Fragment 1</strong></p>
  
  <pre><code>public class Fragment1 : SupportFragment
      {
          public override void OnInflate(Activity activity, IAttributeSet attrs, Bundle savedInstanceState)
          {
              base.OnInflate(activity, attrs, savedInstanceState);
          }
  
          public override void OnCreate(Bundle savedInstanceState)
          {
              base.OnCreate(savedInstanceState);
          }
  
          public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
          {
              //Inflates the view under the tabs 
              View view = inflater.Inflate(Resource.Layout.Inventory, container, false);
  
              return view;
          }
      }
  </code></pre>
  
  <hr>
  
  <p><strong>XML File</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:id="@+id/scroll2"
          android:padding="16dp"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="#FBC855"&gt;
          &lt;RelativeLayout
              android:id="@+id/activity_my_cellar_page"
              android:padding="16dp"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:focusable="true"
              android:focusableInTouchMode="true"&gt;
              &lt;android.support.design.widget.TextInputLayout
                  android:layout_below="@+id/signup_color"
                  android:id="@+id/signup_number"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
                  &lt;EditText
                      android:id="@+id/number"
                      android:hint="Enter the amount of beer"
                      android:inputType="textCapWords"
                      android:maxLines="1"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content" /&gt;
              &lt;/android.support.design.widget.TextInputLayout&gt;
              &lt;LinearLayout
                  android:layout_below="@+id/signup_number"
                  android:id="@+id/registration"
                  android:gravity="center"
                  android:orientation="horizontal"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
                  &lt;Button
                      android:id="@+id/Btn_lagre"
                      android:text="Lagre"
                      android:background="#6C2334"
                      style="@style/Widget.AppCompat.Button.Colored"
                      android:layout_width="50dp"
                      android:layout_height="35dp" /&gt;
              &lt;/LinearLayout&gt;
              &lt;ListView
                  android:id="@+id/list_data"
                  android:layout_below="@+id/registration"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content" /&gt;
              &lt;ProgressBar
                  android:layout_below="@+id/list_data"
                  android:id="@+id/circularProgress"
                  android:visibility="invisible"
                  android:layout_centerInParent="true"
                  android:theme="@style/CircularProgress"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  style="@style/Widget.AppCompat.ProgressBar" /&gt;
              &lt;LinearLayout
                  android:layout_below="@+id/circularProgress"
                  android:id="@+id/mycellar_inventory3"
                  android:gravity="center"
                  android:orientation="horizontal"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
                  &lt;View
                      android:layout_width="50dp"
                      android:layout_height="1dp"
                      android:background="#6C2334"
                      android:layout_margin="5dp" /&gt;
                  &lt;Button
                      android:id="@+id/Btn_inventartilbake"
                      android:text="Tilbake"
                      android:background="#6C2334"
                      style="@style/Widget.AppCompat.Button.Colored"
                      android:layout_width="150dp"
                      android:layout_height="50dp" /&gt;
                  &lt;View
                      android:layout_width="50dp"
                      android:layout_height="1dp"
                      android:background="#6C2334"
                      android:layout_margin="5dp" /&gt;
              &lt;/LinearLayout&gt;
          &lt;/RelativeLayout&gt;
      &lt;/ScrollView&gt;
  </code></pre>