1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2016 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<ScrollView 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:id="@+id/container" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent"> 23 <LinearLayout 24 android:layout_width="match_parent" 25 android:layout_height="wrap_content" 26 android:orientation="vertical"> 27 <View 28 android:id="@+id/for_focus" 29 android:layout_width="match_parent" 30 android:layout_height="4dp" 31 android:focusable="true" /> 32 33 <androidx.appcompat.widget.AppCompatButton 34 style="@style/TextStyleAllCapsOn" 35 android:id="@+id/button_caps1" 36 android:layout_width="match_parent" 37 android:layout_height="wrap_content" 38 android:text="@string/sample_text1" 39 android:focusable="false" /> 40 41 <androidx.appcompat.widget.AppCompatButton 42 style="@style/TextStyleAllCapsOff" 43 android:id="@+id/button_caps2" 44 android:layout_width="match_parent" 45 android:layout_height="wrap_content" 46 android:text="@string/sample_text2" 47 android:focusable="false" /> 48 49 <androidx.appcompat.widget.AppCompatButton 50 android:id="@+id/button_app_allcaps_false" 51 android:layout_width="match_parent" 52 android:layout_height="wrap_content" 53 android:text="@string/sample_text2" 54 app:textAllCaps="false" 55 android:focusable="false"/> 56 57 <androidx.appcompat.widget.AppCompatButton 58 android:id="@+id/view_tinted_no_background" 59 android:layout_width="match_parent" 60 android:layout_height="wrap_content" 61 android:text="@string/sample_text1" 62 app:backgroundTint="@color/color_state_list_lilac" 63 app:backgroundTintMode="src_in" 64 android:focusable="false" /> 65 66 <androidx.appcompat.widget.AppCompatButton 67 android:id="@+id/view_tinted_background" 68 android:layout_width="match_parent" 69 android:layout_height="wrap_content" 70 android:text="@string/sample_text2" 71 android:background="@drawable/test_drawable" 72 app:backgroundTint="@color/color_state_list_lilac" 73 app:backgroundTintMode="src_in" 74 android:focusable="false" /> 75 76 <androidx.appcompat.widget.AppCompatButton 77 android:id="@+id/view_untinted_no_background" 78 android:layout_width="match_parent" 79 android:layout_height="wrap_content" 80 android:text="@string/sample_text2" 81 android:focusable="false" /> 82 83 <androidx.appcompat.widget.AppCompatButton 84 android:id="@+id/view_untinted_background" 85 android:layout_width="match_parent" 86 android:layout_height="wrap_content" 87 android:text="@string/sample_text2" 88 android:background="@drawable/test_background_green" 89 android:focusable="false" /> 90 91 <androidx.appcompat.widget.AppCompatButton 92 android:id="@+id/button_colored_untinted" 93 android:layout_width="match_parent" 94 android:layout_height="wrap_content" 95 android:text="@string/sample_text2" 96 android:focusable="false" 97 style="@style/Widget.AppCompat.Button.Colored"/> 98 99 <androidx.appcompat.widget.AppCompatButton 100 android:id="@+id/button_untinted" 101 android:layout_width="match_parent" 102 android:layout_height="wrap_content" 103 android:text="@string/sample_text2" 104 android:focusable="false"/> 105 106 <androidx.appcompat.widget.AppCompatButton 107 android:id="@+id/button_fontresource" 108 android:layout_width="match_parent" 109 android:layout_height="wrap_content" 110 android:text="@string/sample_text1" 111 app:fontFamily="@font/samplefont" 112 android:focusable="false" /> 113 114 </LinearLayout> 115 116</ScrollView> 117