aboutsummaryrefslogtreecommitdiff
path: root/WordPress/src/main/res/layout/stats_visitors_and_views_fragment.xml
blob: c563ce6da02b2c19845e38a1eaea82f302c9c45b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_gravity="center"
    android:gravity="center">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/stats_white_background"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/stats_pager_tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:visibility="gone" >

            <!-- VIEWS tab-->
            <include
                layout="@layout/stats_visitors_and_views_tab"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:layout_weight="1"/>

            <!-- VISITORS tab -->
            <include
                layout="@layout/stats_visitors_and_views_tab"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:layout_weight="1"/>

            <!-- LIKES tab -->
            <include
                layout="@layout/stats_visitors_and_views_tab"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:layout_weight="1"/>

            <!-- COMMENTS tab -->
            <include
                layout="@layout/stats_visitors_and_views_tab"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:layout_weight="1"/>

        </LinearLayout>

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">
            <LinearLayout
                android:id="@+id/stats_bar_chart_fragment_container"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:paddingTop="@dimen/margin_large"
                android:paddingLeft="@dimen/margin_medium"
                android:paddingRight="@dimen/margin_extra_small"
                android:paddingBottom="@dimen/margin_large"
                android:minHeight="@dimen/stats_barchart_height"
                android:orientation="vertical" />
            <LinearLayout
                android:id="@+id/stats_bar_chart_no_activity"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:gravity="center_horizontal|center_vertical"
                android:paddingTop="@dimen/margin_medium"
                android:paddingBottom="@dimen/margin_medium"
                android:paddingLeft="@dimen/margin_extra_large"
                android:paddingStart="@dimen/margin_extra_large"
                android:paddingRight="@dimen/margin_extra_large"
                android:paddingEnd="@dimen/margin_extra_large"
                android:visibility="gone"
                android:background="@drawable/stats_barchart_no_activity_background"
                android:orientation="horizontal">
                <ImageView
                    android:layout_width="24dp"
                    android:layout_height="24dp"
                    app:srcCompat="@drawable/stats_icon_info"
                    android:paddingEnd="@dimen/margin_medium"
                    android:paddingRight="@dimen/margin_medium"/>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="#404040"
                    android:textSize="@dimen/text_sz_medium"
                    android:text="@string/stats_no_activity_this_period"/>
            </LinearLayout>
        </RelativeLayout>

        <!-- Bottom Legend -->
        <LinearLayout
            android:id="@+id/stats_legend_container"
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:layout_marginBottom="@dimen/margin_medium">
            <LinearLayout
                android:orientation="horizontal"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:gravity="center">
                <!-- Have to use a CheckedTextView instead of a plain TextView otherwise
                there was a "jumpy UI" when the CheckBox below 'stats_checkbox_visitors' is not on the screen. This is due to the
                CheckedTextView/CheckBox touching area that is bigger than the touching area of a TextView .
                -->
                <CheckedTextView
                    android:id="@+id/stats_legend_label"
                    android:gravity="center_vertical"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:enabled="false"
                    android:checkMark="?android:attr/listChoiceIndicatorSingle"
                    android:drawableLeft="@drawable/stats_visitors_and_views_legend_background_primary"
                    android:drawableStart="@drawable/stats_visitors_and_views_legend_background_primary"
                    android:drawablePadding="@dimen/margin_medium"
                    android:textSize="@dimen/text_sz_small"
                    android:text="@string/stats_views"
                    android:textColor="@color/grey_darken_30"/>
            </LinearLayout>
            <LinearLayout
                android:id="@+id/stats_checkbox_visitors_container"
                android:orientation="horizontal"
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:visibility="gone">
                <CheckBox
                    android:id="@+id/stats_checkbox_visitors"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@drawable/stats_visitors_and_views_legend_background_secondary"
                    android:drawableStart="@drawable/stats_visitors_and_views_legend_background_secondary"
                    android:drawablePadding="@dimen/margin_medium"
                    android:textSize="@dimen/text_sz_small"
                    android:text="@string/stats_visitors"
                    android:textColor="@color/grey_darken_30"/>
            </LinearLayout>
        </LinearLayout>

    </LinearLayout>

    <org.wordpress.android.widgets.WPTextView
        android:id="@+id/stats_summary_date"
        android:textAppearance="?android:attr/textAppearance"
        android:textSize="@dimen/text_sz_large"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/margin_extra_large"
        android:layout_marginBottom="@dimen/margin_small"
        android:textColor="@color/grey_darken_20"
        tools:text="Date"/>
</LinearLayout>