So, android is doing everything possible to create this good interface for every user. But I see nowhere where it shows code examples how to create these elements.
Tab UI recommendations can be found here. http://developer.android.com/design/building-blocks/tabs.html
Does anyone know how to create tabs, like this one?
Any help would be appreciated, thanks.
DECISION OPEN
So, here is what I ended up doing, probably spending about 10 hours trying to make some good tabs.
At first I gave up the whole idea of ββusing tabs in Android. For some reason, the host tab widget is supposedly outdated for the action bar, but the action bar only works with android 3 on.
Finally, I realized that if linear layout is used and as the background for the linear layout, I put the image that I wanted to use (using 9 patch images). Then create another linearlayout and textview file to place the text on top of the linearlayout vertex. Then make your linear layout clickable. Then, when you move to a more advanced level, you can make the linear layout as an xml selector in the background, and you're good to go. If you do not get everything here, this is my code.
Linearlayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="50dp" android:background="@color/main_screen_bg_color" android:orientation="horizontal" android:padding="2dp" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:background="@drawable/selector_not_current" android:clickable="true" android:onClick="onClickSub" android:orientation="horizontal" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:text="Example 1" android:textColor="@color/black" android:textSize="18sp" android:textStyle="bold" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:background="@drawable/selector_current" android:clickable="true" android:onClick="onClickFoodDetails" android:orientation="horizontal" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="center" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:text="Example 2" android:textColor="@color/black" android:textSize="18sp" android:textStyle="bold" /> </LinearLayout> </LinearLayout> </LinearLayout>
Parameter selector
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/selected_pressed_tab" /> <item android:state_focused="true" android:drawable="@drawable/selected_pressed_tab" /> <item android:drawable="@drawable/selected_tab" />
Hope this helps everyone. Android bookmarks were too complicated, and it was unpleasant to work with the fact that it was easier to just make your own from scratch. Good luck