Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:id="@+id/drawerLayout"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent" >
  6.  
  7. <!-- Main layout -->
  8.  
  9. <LinearLayout
  10. android:layout_width="match_parent"
  11. android:layout_height="match_parent"
  12. android:background="@color/app_background"
  13. android:orientation="vertical" >
  14.  
  15. <include
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. layout="@layout/layout_location_spinners_campaigns" />
  19.  
  20. <include
  21. android:layout_width="match_parent"
  22. android:layout_height="wrap_content"
  23. layout="@layout/layout_campaignslistview" />
  24. </LinearLayout>
  25.  
  26. <!-- Slider menu -->
  27.  
  28. <LinearLayout
  29. android:id="@+id/preferencesDrawer"
  30. android:layout_width="290dp"
  31. android:layout_height="match_parent"
  32. android:layout_gravity="end"
  33. android:background="@color/app_background"
  34. android:orientation="vertical" >
  35.  
  36. <android.support.v4.app.FragmentTabHost
  37. android:id="@android:id/tabhost"
  38. android:layout_width="match_parent"
  39. android:layout_height="match_parent" >
  40.  
  41. <LinearLayout
  42. android:layout_width="match_parent"
  43. android:layout_height="match_parent"
  44. android:orientation="vertical" >
  45.  
  46. <TabWidget
  47. android:id="@android:id/tabs"
  48. android:layout_width="match_parent"
  49. android:layout_height="wrap_content"
  50. android:layout_weight="0"
  51. android:orientation="horizontal" />
  52.  
  53. <FrameLayout
  54. android:id="@android:id/tabcontent"
  55. android:layout_width="0dp"
  56. android:layout_height="0dp"
  57. android:layout_weight="0" />
  58.  
  59. <FrameLayout
  60. android:id="@+id/realtabcontent"
  61. android:layout_width="match_parent"
  62. android:layout_height="0dp"
  63. android:layout_weight="1" />
  64. </LinearLayout>
  65. </android.support.v4.app.FragmentTabHost>
  66. </LinearLayout>
  67.  
  68. </android.support.v4.widget.DrawerLayout>
  69.  
  70. FragmentTabHost tabhost;
  71.  
  72. void buildTabs() {
  73. tabhost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);
  74. tabhost.addTab(tabhost.newTabSpec("locations").setIndicator(getString(R.string.locations)), FragmentPreferencesLocations.class, null);
  75. tabhost.addTab(tabhost.newTabSpec("categories").setIndicator(getString(R.string.categories)),FragmentPreferencesCategories.class, null);
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement