Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6091429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:19:36+00:00 2026-05-23T12:19:36+00:00

I am stuck in my xml code <TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=wrap_content /> I am

  • 0

I am stuck in my xml code

<TabWidget
                android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />

I am trying to change the width to a custom set dip number but

android:layout_width="50dip"

is not making any affect to the tab width layout
any suggenstion on this one please ?

Here is the full XML file Layout on pasteBin

http://pastebin.com/7vi4Pi8Z

Thanks
Shiraz

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:19:36+00:00Added an answer on May 23, 2026 at 12:19 pm

    No body contributed the answer but after few hours of struggle i have found the way to
    set the width of tabs in java code…
    here you go, if some one may need this later

    TabWidget tabWidget = (TabWidget) findViewById(android.R.id.tabs);
    final int tabChildrenCount = tabWidget.getChildCount();
    for (int i=0; i< tabChildrenCount; i++)
    {
            // change the value 110 to whatever suits you for tab width
        tHost.getTabWidget().getChildAt(i).getLayoutParams().width = 110;
    }
    

    many thanks
    shiraz

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Really stuck on trying to write code to unzip a file or directory on
This code: println(new XStream.toXML(List(1,2,3))) produces this XML: <scala.coloncolon serialization=custom> <unserializable-parents/> <scala.coloncolon> <int>1</int> <int>2</int> <int>3</int>
I just started development for Android, and I am stuck with this code: public
I'm stuck on the following run-time error. I'm running code which read a xml
i am stuck with this small problem in my code. I am trying to
...or am I stuck rolling my own XML chopping functions. I'd like to create
I am stuck with something quite simple but really annoying: I have an xml
My PHP backend sends XML response to the client (ajax): <response> <code>0</code> <message>OK</message> </response>
I am trying to use xml documents to store data for a movie database,
My company is stuck on .Net 3.0. The task I am trying to tackle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.