0

I have a custom action bar for which I have used Sherlock Implementation and I tend to find that the tab widget is placed at the top every time rather than in the middle.

I have tried the following in XML but it seems to set the action bar at the top :

<TabWidget 
        android:id="@android:id/tabs"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:layout_alignParentBottom="true"
       ></TabWidget>

I want it somewhere in the middle. I have provided with an example image below :

As you can clearly see that the action bar is located at the top which is not what I want. So,how do I place it after the Followers list. Any ideas ??

enter image description here

San
  • 2,078
  • 1
  • 24
  • 42

1 Answers1

0

Is the parent View of you TabWidget a LinearLayout? If so, you may try your luck with a RelativeLayout.

Kirby
  • 86
  • 1
  • 8
  • Its in RelativeLayout only. Any other ideas or arguments that might be added in the TabWidget ? – San Feb 04 '14 at 15:14
  • Alright. What about your second View? Try to set its 'layout_above' argument to '@android:id/tabs'. – Kirby Feb 04 '14 at 15:37
  • I have only one view in which all are depicted. – San Feb 04 '14 at 15:43
  • Take a look at this post: http://stackoverflow.com/a/3533787/3008467 - You may edit your XML like that and put any other elements (like your Followers list) into that FrameLayout. – Kirby Feb 04 '14 at 16:01