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 7893905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:15:15+00:00 2026-06-03T07:15:15+00:00

I was looking through the example posted in http://bakhtiyor.com/2009/10/iphonish-tabs/ , actually here they have

  • 0

I was looking through the example posted in http://bakhtiyor.com/2009/10/iphonish-tabs/, actually here they have placed Radio button as replacement for Tabview.

But the problem is, i am unable to set the image to the centre. Its always getting aligned to left.

Here is the screenshot. I want my view should look like this but instead i want image to be in center.
enter image description here

This is how my layout XML file looks

    <?xml version="1.0" encoding="utf-8"?>
<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">

  <LinearLayout android:orientation="vertical"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent">

    <FrameLayout android:id="@android:id/tabcontent"
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content"
      android:layout_weight="1" 
      android:padding="20dip"/>

    <RadioGroup android:layout_width="fill_parent"
      android:layout_height="wrap_content" 
      android:orientation="horizontal"
      android:checkedButton="@+id/allcontacts"
      android:gravity="center"
      android:id="@+id/contactgroup">


      <RadioButton android:id="@+id/allcontacts" 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:orientation="vertical"
      android:background="@drawable/button_radio"/>


      <RadioButton
          android:id="@+id/categories"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:background="@drawable/button_radio"
          android:orientation="vertical"
          android:layout_gravity="center|right"/>

      <RadioButton android:id="@+id/favourites" 
   android:layout_width="fill_parent"
          android:layout_height="wrap_content"

    android:gravity="center"
    android:orientation="vertical"
      android:layout_weight="1" 
      android:background="@drawable/button_radio"/>

    </RadioGroup>

    <TabWidget android:id="@android:id/tabs"
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content"
      android:layout_weight="0" android:visibility="gone" />
  </LinearLayout>
</TabHost>

Please advice me

UPDATED image after using Default tab widget
enter image description here

Is it possible to customize like above radio button in default tabview.?

  • 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-06-03T07:15:16+00:00Added an answer on June 3, 2026 at 7:15 am

    Not actiually making the image centered, but you could make it appear that way… You could modify the image to have blank space on the left and cut off immediately to the right of the image.

    EDIT

    I don’t know if you’ve seen any of these, but you made me curious so I went looking and found several links that might be helpful towards your ultimate goal of tabs on the bottom:

    Niko’s Blog

    SO Question Answer

    Another SO Question Answer

    Good Luck!

    Edit 2

    Ok, found it. You will have to extend a new class from RadioButton and override onDraw(), then create an attrs.xml file you need to put in res/values so the code can get at platform-defined
    attributes.

    Specific code here

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

Sidebar

Related Questions

I'm looking through the PageControl example from Apple. They have a class called ContentController.
I have been looking through the source code for the Flash-based Google TV example
Looking through the massive android source code, anyone on here who know where exactly
I am looking through some example Fibonacci sequence clojure code: (def fibs (lazy-cat [1
While looking through a 3rd party JavaScript API and example code I noticed the
In looking through samples I have seen a number of examples where it is
Looking through style sheets from popular & unpopular websites I have found the div
I was looking through new stuff added to jQuery 1.7 and I saw they
I was looking through Josh Smith's MVVM Example and I noticed he defines a
I've been looking through the Blackberry documentation and they outline 3 different mechanisms for

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.