1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 Copyright 2013 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 19 20 <sample> 21 <name>SlidingTabsColors</name> 22 <group>UI</group> 23 <package>com.example.android.slidingtabscolors</package> 24 25 26 <!-- change minSdk if needed--> 27 <minSdk>14</minSdk> 28 29 30 <strings> 31 <intro> 32 <![CDATA[ 33 A more advanced sample which shows how to use SlidingTabLayout to display a custom 34 ViewPager title strip, with custom coloring for each tab. 35 ]]> 36 </intro> 37 </strings> 38 39 <template src="base"/> 40 <template src="FragmentView"/> 41 <common src="logger"/> 42 <common src="activities"/> 43 <common src="view"/> 44 45 <metadata> 46 <status>PUBLISHED</status> 47 <categories>UI, Views</categories> 48 <technologies>Android</technologies> 49 <languages>Java</languages> 50 <solutions>Mobile</solutions> 51 <level>ADVANCED</level> 52 <icon>Application/src/main/res/drawable-xxhdpi/ic_launcher.png</icon> 53 <screenshots> 54 <img>screenshots/1-pre.png</img> 55 <img>screenshots/2-morph.png</img> 56 <img>screenshots/3-post.png</img> 57 </screenshots> 58 <api_refs> 59 <android>android.widget.HorizontalScrollView</android> 60 <android>android.support.v4.view.ViewPager</android> 61 </api_refs> 62 <description> 63 <![CDATA[ 64 A more advanced sample which shows how to use SlidingTabLayout to display a custom 65 ViewPager title strip, with custom coloring for each tab. 66 ]]> 67 </description> 68 <intro> 69 <![CDATA[ 70 This sample consists of a custom [HorizontalScrollView][1] called `SlidingTabLayout` that is used 71 with a [ViewPager][2] to provide a tab indicator component which gives constant feedback as to 72 the user's scroll progress. 73 74 The colors can be customized in two ways. The first and simplest is to provide an 75 array of colors and the alternative is via the `TabColorizer` interface which gives 76 complete control over which color is used for any individual position. 77 78 The views used as tabs can be customized by calling `setCustomTabView(int, int)` providing the 79 layout ID of the custom layout. 80 81 [1]: http://developer.android.com/reference/android/widget/HorizontalScrollView.html 82 [2]: http://developer.android.com/reference/android/support/v4/view/ViewPager.html 83 ]]> 84 </intro> 85 </metadata> 86 </sample> 87