Advertisement
Guest User

tabhost

a guest
Jul 31st, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. main.xml
  2.  
  3. <?xml version="1.0" encoding="utf-8"?>
  4.  
  5. <TabHost xmlns:android="http://schemas.android.com/apk/res/android"
  6. android:layout_width="fill_parent"
  7. android:layout_height="300dip"
  8. android:id="@android:id/tabhost">
  9.  
  10. <LinearLayout
  11. android:id="@+id/LinearLayout01"
  12. android:orientation="vertical"
  13. android:layout_height="fill_parent"
  14. android:layout_width="fill_parent">
  15.  
  16. <TabWidget
  17. android:id="@android:id/tabs"
  18. android:layout_height="wrap_content"
  19. android:layout_width="fill_parent">
  20. </TabWidget>
  21.  
  22. <FrameLayout
  23. android:id="@android:id/tabcontent"
  24. android:layout_height="fill_parent"
  25. android:layout_width="fill_parent">
  26. </FrameLayout>
  27.  
  28. </LinearLayout>
  29.  
  30. </TabHost>
  31.  
  32. tab_indicator
  33.  
  34. <?xml version="1.0" encoding="utf-8"?>
  35. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  36. android:layout_width="match_parent"
  37. android:layout_height="match_parent"
  38. android:orientation="vertical" >
  39.  
  40. <RelativeLayout
  41. android:layout_width="match_parent"
  42. android:layout_height="match_parent" >
  43.  
  44. <ImageView
  45. android:id="@+id/imageView1"
  46. android:layout_width="wrap_content"
  47. android:layout_height="wrap_content"
  48. android:layout_alignParentLeft="true"
  49. android:layout_alignParentTop="true"
  50. android:src="@drawable/ic_launcher" />
  51.  
  52. <TextView
  53. android:id="@+id/textView1"
  54. android:layout_width="wrap_content"
  55. android:layout_height="wrap_content"
  56. android:layout_alignParentLeft="true"
  57. android:layout_below="@+id/imageView1"
  58. android:text="TextView" />
  59.  
  60. </RelativeLayout>
  61.  
  62. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement