Show navigation Hide navigation
MediaRouter / res / layout /

media_item.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<!-- Copyright (C) 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
<!-- Layout for list item in Library or Playlist view. Displays ImageButton
18
     instead of radio button to the right of the item. -->
19
 
20
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
21
        android:layout_width="match_parent"
22
        android:layout_height="match_parent"
23
        android:orientation="horizontal"
24
        android:clickable="true"
25
        android:background="@drawable/list_background"
26
        android:gravity="center_vertical">
27
 
28
    <ImageButton android:id="@+id/item_action"
29
        android:layout_width="wrap_content"
30
        android:layout_height="wrap_content"
31
        android:minWidth="48dp"
32
        android:minHeight="48dp"
33
        android:layout_alignParentRight="true"
34
        android:layout_centerVertical="true"
35
        android:background="@null"/>
36
 
37
    <TextView android:id="@+id/item_text"
38
        android:layout_width="fill_parent"
39
        android:layout_height="wrap_content"
40
        android:textAppearance="?android:attr/textAppearanceMedium"
41
        android:layout_centerVertical="true"
42
        android:layout_toLeftOf="@id/item_action"
43
        android:layout_gravity="left"
44
        android:gravity="left"/>
45
</RelativeLayout>