Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get this tab image to take up the full area
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/WIrDI.jpg" alt="enter image description here"></p> <p>In this picture I am trying to get the image to take up the whole top and bottom area that is black. I looked into these links here but I am just not having any luck so far:</p> <p><a href="http://joshclemm.com/blog/?p=136" rel="nofollow noreferrer">http://joshclemm.com/blog/?p=136</a></p> <p><a href="https://stackoverflow.com/questions/5799320/android-remove-space-between-tabs-in-tabwidget/5804436#5804436">Android remove space between tabs in tabwidget</a></p> <p><a href="https://stackoverflow.com/questions/4507718/how-to-change-the-tabs-images-in-the-tabhost-in-android">How to change the Tabs Images in the TabHost</a></p> <p>The code:</p> <p>MainActivity:</p> <pre><code>// Add the Tabs///////////////////////////////////////////// th = (TabHost) findViewById(R.id.tabhost); th.setup(); specs = th.newTabSpec("tag1"); specs.setContent(R.id.tab1); specs.setIndicator("", getResources().getDrawable(R.drawable.b_news)); th.addTab(specs); specs = th.newTabSpec("tag2"); specs.setContent(R.id.tab2); specs.setIndicator("Library"); th.addTab(specs); specs = th.newTabSpec("tag3"); specs.setContent(R.id.tab3); specs.setIndicator("Community"); th.addTab(specs); </code></pre> <p>main_activity.xml</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;TabHost android:id="@+id/tabhost" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" &gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;FrameLayout android:id="@android:id/tabcontent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:background="#ffffff" &gt; &lt;LinearLayout android:id="@+id/tab1" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;WebView android:id="@+id/webView1" android:layout_width="match_parent" android:layout_height="match_parent" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/tab2" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000000" &gt; &lt;ListView android:id="@+id/libraryListView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" tools:ignore="InefficientWeight" &gt; &lt;/ListView&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/tab3" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000000" &gt; &lt;ListView android:id="@+id/communityListView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" tools:ignore="InefficientWeight" &gt; &lt;/ListView&gt; &lt;/LinearLayout&gt; &lt;/FrameLayout&gt; &lt;TabWidget android:id="@android:id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="-4dp" android:layout_weight="0" &gt; &lt;/TabWidget&gt; &lt;/LinearLayout&gt; &lt;/TabHost&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload