Note that there are some explanatory texts on larger screens.

plurals
  1. POCustomizing Text in tab title for android
    primarykey
    data
    text
    <p><strong>What my current work :</strong>:</p> <p>I have designed a tab activity which has four tabs in bottom </p> <hr> <p><strong>snapshot</strong></p> <p><img src="https://i.stack.imgur.com/xq3Do.png" alt="enter image description here"></p> <hr> <p><strong>BreakfastLunchDinnerIndividualListOfItems.java</strong></p> <pre><code>public class BreakfastLunchDinnerIndividualListOfItems extends TabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.breakfast_lunch_dinner_individual_list_of_items); Resources res = getResources(); // Resource object to get Drawables TabHost tabHost = getTabHost(); // The activity TabHost TabHost.TabSpec spec; // Reusable TabSpec for each tab Intent intent; // Reusable Intent for each tab // Create an Intent to launch an Activity for the tab (to be reused) intent = new Intent().setClass(this, BLD_IndividualListOfItems_Starters.class); spec = tabHost.newTabSpec("STARTERS").setIndicator("Starters").setContent(intent); tabHost.addTab(spec); // Do the same for the other tabs intent = new Intent().setClass(this, BLD_IndividualListOfItems_MainCourse.class); spec = tabHost.newTabSpec("MAIN_COURSE").setIndicator("Main Course").setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, BLD_IndividualListOfItems_SideCourse.class); spec = tabHost.newTabSpec("SIDE_COURSE").setIndicator("Side course").setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, BLD_IndividualListOfItems_Others.class); spec = tabHost.newTabSpec("OTHERS").setIndicator("Others").setContent(intent); tabHost.addTab(spec); intent = new Intent().setClass(this, BLD_IndividualListOfItems_Desert.class); spec = tabHost.newTabSpec("DESERT").setIndicator("Deserts").setContent(intent); tabHost.addTab(spec); //set tab which one you want open first time 0 or 1 or 2 tabHost.setCurrentTab(0); } } </code></pre> <p><strong>breakfast_lunch_dinner_individual_list_of_items.java</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1"/&gt; &lt;TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0" android:layout_marginBottom="-4dp"/&gt; &lt;/LinearLayout&gt; &lt;/TabHost&gt; </code></pre> <hr> <p><strong>Problem</strong>:: </p> <ul> <li>Notice my text of second tab text is half cutout</li> </ul> <hr> <p><strong>What i am trying to achieve</strong> ::</p> <p><img src="https://i.stack.imgur.com/K4ro4.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    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.
 

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