1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2011 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<!-- Hover event handling demo. --> 18<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 android:id="@+id/container" 20 android:orientation="vertical" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent"> 23 24 <TextView 25 android:id="@+id/description" 26 android:layout_width="match_parent" 27 android:layout_height="wrap_content" 28 android:text="@string/hover_description" 29 android:padding="12dip" /> 30 31 <TextView 32 android:id="@+id/message" 33 android:layout_width="match_parent" 34 android:layout_height="wrap_content" 35 android:text="@string/hover_message_initial" 36 android:padding="12dip" /> 37 38 <CheckBox 39 android:id="@+id/intercept_checkbox" 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 android:text="@string/hover_intercept_checkbox" /> 43 44 <com.example.android.apis.view.HoverInterceptorView 45 android:id="@+id/interceptor" 46 android:orientation="vertical" 47 android:layout_width="match_parent" 48 android:layout_height="wrap_content"> 49 <TextView 50 android:id="@+id/intercept_message" 51 android:layout_width="match_parent" 52 android:layout_height="wrap_content" 53 android:text="@string/hover_intercept_message_initial" 54 android:padding="12dip" /> 55 56 <!-- This button uses a state-list drawable to select among 57 different shapes based on its current hover state. --> 58 <Button 59 android:layout_width="wrap_content" 60 android:layout_height="wrap_content" 61 android:background="@drawable/hover_background" 62 android:text="@string/hover_button" /> 63 </com.example.android.apis.view.HoverInterceptorView> 64</LinearLayout> 65