Hi, I use the following View to customize my icon & text position of
the tab, but I failed, could you give some hint to me??

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:gravity="center_vertical"
                android:background="@color/row_bg_color">

        <TextView
        android:id="@+id/tab_1_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text = "Expense"

        >

        <ImageView
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:src="@drawable/ic_tab_selected"
        />

</LinearLayout>

On Oct 6, 4:31 pm, Mark Murphy <[email protected]> wrote:
> On Wed, Oct 6, 2010 at 9:30 AM, xi developer <[email protected]> wrote:
> > Where can I change my icon position on a tab to be in the center of
> > the tab. Currently, my icon is located  on top of the tab by default...
>
> Use the version of setIndicator() that takes a View as its parameter,
> and you can make the tab look however you wish.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 3.0.1 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to