aboutsummaryrefslogtreecommitdiff
path: root/WordPress/src/main/res/layout/stats_widget_layout.xml
diff options
context:
space:
mode:
Diffstat (limited to 'WordPress/src/main/res/layout/stats_widget_layout.xml')
-rw-r--r--WordPress/src/main/res/layout/stats_widget_layout.xml264
1 files changed, 264 insertions, 0 deletions
diff --git a/WordPress/src/main/res/layout/stats_widget_layout.xml b/WordPress/src/main/res/layout/stats_widget_layout.xml
new file mode 100644
index 000000000..a90e68a7e
--- /dev/null
+++ b/WordPress/src/main/res/layout/stats_widget_layout.xml
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/stats_widget_outer_container"
+ android:background="@drawable/stats_widget_background"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ tools:showIn="@layout/stats_widget_info">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/stats_widget_header_background"
+ android:gravity="start|center_vertical"
+ android:padding="2dp"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="@dimen/stats_widget_icon_size"
+ android:layout_height="@dimen/stats_widget_icon_size"
+ app:srcCompat="@drawable/ic_tab_sites_pressed" />
+
+ <TextView
+ android:id="@+id/blog_title"
+ style="@style/StatsModuleTitle"
+ android:textSize="@dimen/stats_widget_text_sz"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:textColor="@color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginLeft="4dp"
+ android:text="@string/stats_widget_name" >
+ </TextView>
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:orientation="horizontal"
+ android:background="@color/grey_lighten_30" />
+
+ <LinearLayout
+ android:id="@+id/stats_widget_values_container"
+ android:layout_height="@dimen/stats_widget_main_container_size"
+ android:minHeight="@dimen/stats_widget_main_container_min_size"
+ android:layout_width="match_parent"
+ android:gravity="center_vertical"
+ android:orientation="horizontal">
+
+ <!-- Views -->
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:background="@drawable/stats_visitors_and_views_button_white"
+ android:clickable="false">
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="@dimen/stats_widget_image_layout_size"
+ android:layout_height="@dimen/stats_widget_image_layout_size"
+ android:layout_marginRight="@dimen/stats_widget_image_layout_margin"
+ android:layout_marginEnd="@dimen/stats_widget_image_layout_margin"
+ app:srcCompat="@drawable/stats_icon_views" />
+
+ <TextView
+ android:textColor="@color/grey_dark"
+ android:textSize="@dimen/stats_widget_text_sz_small"
+ android:textAllCaps="true"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:text="@string/stats_views"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/stats_widget_views"
+ android:textColor="@color/blue_wordpress"
+ android:textSize="@dimen/stats_widget_text_sz"
+ android:paddingTop="@dimen/margin_extra_small"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:text="@string/stats_default_number_zero"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+ <!-- Visitors -->
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:background="@drawable/stats_visitors_and_views_button_white"
+ android:clickable="false">
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="@dimen/stats_widget_image_layout_size"
+ android:layout_height="@dimen/stats_widget_image_layout_size"
+ android:layout_marginRight="@dimen/stats_widget_image_layout_margin"
+ android:layout_marginEnd="@dimen/stats_widget_image_layout_margin"
+ app:srcCompat="@drawable/stats_icon_visitors" />
+
+ <TextView
+ android:textColor="@color/grey_dark"
+ android:textSize="@dimen/stats_widget_text_sz_small"
+ android:textAllCaps="true"
+ android:maxLines="1"
+ android:text="@string/stats_visitors"
+ android:ellipsize="end"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/stats_widget_visitors"
+ android:textColor="@color/blue_wordpress"
+ android:textSize="@dimen/stats_widget_text_sz"
+ android:paddingTop="@dimen/margin_extra_small"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:text="@string/stats_default_number_zero"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+ <!-- Likes -->
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:background="@drawable/stats_visitors_and_views_button_white"
+ android:clickable="false">
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="@dimen/stats_widget_image_layout_size"
+ android:layout_height="@dimen/stats_widget_image_layout_size"
+ android:layout_marginRight="@dimen/stats_widget_image_layout_margin"
+ android:layout_marginEnd="@dimen/stats_widget_image_layout_margin"
+ app:srcCompat="@drawable/stats_icon_likes" />
+
+ <TextView
+ android:textColor="@color/grey_dark"
+ android:textSize="@dimen/stats_widget_text_sz_small"
+ android:textAllCaps="true"
+ android:maxLines="1"
+ android:text="@string/stats_likes"
+ android:ellipsize="end"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/stats_widget_likes"
+ android:textColor="@color/blue_wordpress"
+ android:textSize="@dimen/stats_widget_text_sz"
+ android:paddingTop="@dimen/margin_extra_small"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:text="@string/stats_default_number_zero"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+ <!-- Comments -->
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:background="@drawable/stats_visitors_and_views_button_latest_white"
+ android:clickable="false">
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="@dimen/stats_widget_image_layout_size"
+ android:layout_height="@dimen/stats_widget_image_layout_size"
+ android:layout_marginRight="@dimen/stats_widget_image_layout_margin"
+ android:layout_marginEnd="@dimen/stats_widget_image_layout_margin"
+ app:srcCompat="@drawable/stats_icon_comments" />
+
+ <TextView
+ android:textColor="@color/grey_dark"
+ android:textSize="@dimen/stats_widget_text_sz_small"
+ android:textAllCaps="true"
+ android:maxLines="1"
+ android:text="@string/stats_comments"
+ android:ellipsize="end"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/stats_widget_comments"
+ android:textColor="@color/blue_wordpress"
+ android:textSize="@dimen/stats_widget_text_sz"
+ android:paddingTop="@dimen/margin_extra_small"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:text="@string/stats_default_number_zero"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+ </LinearLayout>
+
+
+ <LinearLayout
+ android:id="@+id/stats_widget_error_container"
+ android:visibility="gone"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/stats_widget_main_container_size"
+ android:minHeight="@dimen/stats_widget_main_container_min_size"
+ android:gravity="center_vertical"
+ android:orientation="horizontal">
+ <TextView
+ android:id="@+id/stats_widget_error_text"
+ android:textSize="@dimen/stats_widget_text_sz"
+ android:textColor="@color/grey_darken_20"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center_horizontal|center_vertical"
+ android:layout_margin="4dip"
+ android:text="@string/stats_widget_loading_data" >
+ </TextView>
+ </LinearLayout>
+
+</LinearLayout>
+
+