1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 Copyright (C) 2015 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16 --> 17 18 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent" 22 android:orientation="vertical"> 23 24 <android.support.v7.widget.Toolbar 25 android:id="@+id/toolbar" 26 android:layout_height="?attr/actionBarSize" 27 android:layout_width="match_parent" 28 android:background="?attr/colorPrimary" 29 android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 30 app:contentInsetStart="72dp" 31 app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> 32 33 <android.support.design.widget.TabLayout 34 android:id="@+id/tabs" 35 android:layout_height="wrap_content" 36 android:layout_width="match_parent" 37 android:background="?attr/colorPrimary" 38 android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 39 app:tabMode="scrollable" 40 app:tabContentStart="72dp"/> 41 42 <android.support.v4.view.ViewPager 43 android:id="@+id/tabs_viewpager" 44 android:layout_height="0px" 45 android:layout_width="match_parent" 46 android:layout_weight="1"/> 47 48 <LinearLayout 49 android:layout_width="match_parent" 50 android:layout_height="wrap_content" 51 android:layout_margin="16dp"> 52 53 <Button 54 android:id="@+id/btn_add_tab" 55 android:layout_width="wrap_content" 56 android:layout_height="wrap_content" 57 android:text="@string/add_tab"/> 58 59 <Button 60 android:id="@+id/btn_remove_tab" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:text="@string/remove_tab"/> 64 65 </LinearLayout> 66 67 <RadioGroup 68 android:id="@+id/radiogroup_tab_mode" 69 android:layout_width="match_parent" 70 android:layout_height="wrap_content" 71 android:orientation="horizontal" 72 android:gravity="center_horizontal" 73 android:padding="8dp"> 74 75 <RadioButton 76 android:id="@+id/rb_tab_fixed" 77 android:layout_width="wrap_content" 78 android:layout_height="wrap_content" 79 android:text="@string/tabs_fixed"/> 80 81 <RadioButton 82 android:id="@+id/rb_tab_scrollable" 83 android:layout_width="wrap_content" 84 android:layout_height="wrap_content" 85 android:text="@string/tabs_scrollable"/> 86 </RadioGroup> 87 88 <RadioGroup 89 android:id="@+id/radiogroup_tab_gravity" 90 android:layout_width="match_parent" 91 android:layout_height="wrap_content" 92 android:orientation="horizontal" 93 android:gravity="center_horizontal" 94 android:padding="8dp"> 95 96 <RadioButton 97 android:id="@+id/rb_tab_g_center" 98 android:layout_width="wrap_content" 99 android:layout_height="wrap_content" 100 android:text="@string/tabs_gravity_center"/> 101 102 <RadioButton 103 android:id="@+id/rb_tab_g_fill" 104 android:layout_width="wrap_content" 105 android:layout_height="wrap_content" 106 android:text="@string/tabs_gravity_fill"/> 107 108 </RadioGroup> 109 110 </LinearLayout> 111