1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2015 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<!-- layoutDirection set to ltr as a workaround to a framework bug (b/22010411) causing view with
17     layout_centerInParent inside a RelativeLayout to expand to screen width when RTL is active -->
18<RelativeLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    android:layout_width="match_parent"
21    android:layout_height="match_parent"
22    android:background="@drawable/view_pager_tab_background"
23    android:layoutDirection="ltr">
24    <!-- The tab icon -->
25    <ImageView
26        android:id="@+id/icon"
27        android:layout_width="wrap_content"
28        android:layout_height="wrap_content"
29        android:layout_centerInParent="true"/>
30    <TextView
31        android:id="@+id/count"
32        android:layout_width="wrap_content"
33        android:layout_height="@dimen/tab_unread_count_background_size"
34        android:layout_marginTop="@dimen/tab_unread_count_margin_top"
35        android:layout_marginStart="@dimen/tab_unread_count_margin_left"
36        android:layout_toStartOf="@id/icon"
37        android:paddingLeft="@dimen/tab_unread_count_text_padding"
38        android:paddingRight="@dimen/tab_unread_count_text_padding"
39        android:background="@drawable/unread_count_background"
40        android:fontFamily="sans-serif-medium"
41        android:importantForAccessibility="no"
42        android:minWidth="@dimen/tab_unread_count_background_size"
43        android:textAlignment="center"
44        android:textColor="@color/tab_accent_color"
45        android:textSize="@dimen/tab_unread_count_text_size"
46        android:layoutDirection="locale"/>
47</RelativeLayout>
48
49