Home | History | Annotate | Download | only in layout
      1 <!--
      2   Copyright 2012 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 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     18     android:layout_width="match_parent"
     19     android:layout_height="?android:listPreferredItemHeightSmall"
     20     android:orientation="horizontal"
     21     android:showDividers="middle"
     22     android:divider="?android:dividerVertical"
     23     android:dividerPadding="8dp"
     24     android:gravity="center">
     25 
     26     <!-- Dummy text view that will display the name of a random country. -->
     27     <TextView android:id="@android:id/text1"
     28         style="?android:textAppearanceMedium"
     29         android:layout_width="0dp"
     30         android:layout_weight="1"
     31         android:layout_height="wrap_content"
     32         android:paddingLeft="?android:listPreferredItemPaddingLeft" />
     33 
     34     <!-- A button that, when pressed, will delete this list item row from its container. -->
     35     <ImageButton android:id="@+id/delete_button"
     36         android:layout_width="48dp"
     37         android:layout_height="match_parent"
     38         android:src="@drawable/ic_list_remove"
     39         android:background="?android:selectableItemBackground"
     40         android:contentDescription="@string/action_remove_item" />
     41 
     42 </LinearLayout>
     43