Exemple #1
0
 /// <summary><p>Call setup() before adding tabs if loading TabHost using findViewById().
 ///     </summary>
 /// <remarks>
 /// <p>Call setup() before adding tabs if loading TabHost using findViewById().
 /// <i><b>However</i></b>: You do not need to call setup() after getTabHost()
 /// in
 /// <see cref="android.app.TabActivity">TabActivity</see>
 /// .
 /// Example:</p>
 /// <pre>mTabHost = (TabHost)findViewById(R.id.tabhost);
 /// mTabHost.setup();
 /// mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");
 /// </remarks>
 public virtual void setup()
 {
     mTabWidget = (android.widget.TabWidget)findViewById([email protected]);
     if (mTabWidget == null)
     {
         throw new java.lang.RuntimeException("Your TabHost must have a TabWidget whose id attribute is 'android.R.id.tabs'"
                                              );
     }
     mTabKeyListener = new _OnKeyListener_130(this);
     mTabWidget.setTabSelectionListener(new _OnTabSelectionChanged_148(this));
     mTabContent = (android.widget.FrameLayout)findViewById([email protected]
                                                            );
     if (mTabContent == null)
     {
         throw new java.lang.RuntimeException("Your TabHost must have a FrameLayout whose id attribute is "
                                              + "'android.R.id.tabcontent'");
     }
 }
Exemple #2
0
		/// <summary><p>Call setup() before adding tabs if loading TabHost using findViewById().
		/// 	</summary>
		/// <remarks>
		/// <p>Call setup() before adding tabs if loading TabHost using findViewById().
		/// <i><b>However</i></b>: You do not need to call setup() after getTabHost()
		/// in
		/// <see cref="android.app.TabActivity">TabActivity</see>
		/// .
		/// Example:</p>
		/// <pre>mTabHost = (TabHost)findViewById(R.id.tabhost);
		/// mTabHost.setup();
		/// mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");
		/// </remarks>
		public virtual void setup()
		{
			mTabWidget = (android.widget.TabWidget)findViewById([email protected]);
			if (mTabWidget == null)
			{
				throw new java.lang.RuntimeException("Your TabHost must have a TabWidget whose id attribute is 'android.R.id.tabs'"
					);
			}
			mTabKeyListener = new _OnKeyListener_130(this);
			mTabWidget.setTabSelectionListener(new _OnTabSelectionChanged_148(this));
			mTabContent = (android.widget.FrameLayout)findViewById([email protected]
				);
			if (mTabContent == null)
			{
				throw new java.lang.RuntimeException("Your TabHost must have a FrameLayout whose id attribute is "
					 + "'android.R.id.tabcontent'");
			}
		}