| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright (C) 2011 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <!-- |
| Note: Because this item layout contains the header too, we don't want to highlight the entire |
| thing when pressed or set the activated background to it. So we disable the default hilighting |
| by setting transparent to android:listSelector for the list view in |
| group_browse_list_fragment.xml, and make the body part "duplicateParentState", and then set the |
| state list drawable to its background, which has the "activated" background (the drawable with |
| the triangular thing on the right side). Because of this structure, the item view can't have |
| paddingRight, as the body part should touch the right edge. Instead we make each child have |
| either marginRight or paddingRight. |
| --> |
| |
| <LinearLayout |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| android:orientation="vertical" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:paddingLeft="?attr/list_item_padding_left" |
| android:paddingStart="?attr/list_item_padding_left" |
| android:minHeight="@dimen/detail_min_line_item_height" > |
| |
| <View |
| android:id="@+id/divider" |
| android:layout_width="match_parent" |
| android:layout_height="1dip" |
| android:layout_marginRight="?attr/list_item_padding_right" |
| android:layout_marginEnd="?attr/list_item_padding_right" |
| android:background="@color/secondary_header_separator_color" /> |
| |
| <include |
| android:id="@+id/group_list_header" |
| layout="@layout/group_browse_list_account_header" |
| android:visibility="gone" /> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:paddingTop="8dip" |
| android:paddingLeft="8dip" |
| android:paddingStart="8dip" |
| android:paddingBottom="8dip" |
| android:orientation="vertical" |
| android:duplicateParentState="true" |
| android:background="@drawable/group_list_item_background"> |
| |
| <TextView |
| android:id="@+id/label" |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:textAppearance="?android:attr/textAppearanceMedium" |
| android:ellipsize="end" |
| android:singleLine="true" /> |
| |
| <TextView |
| android:id="@+id/count" |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:textAppearance="?android:attr/textAppearanceSmall" |
| android:textColor="?android:attr/textColorSecondary" |
| android:ellipsize="end" |
| android:singleLine="true" /> |
| |
| </LinearLayout> |
| </LinearLayout> |
| |