diff options
author | Danilo Ercoli <ercoli@gmail.com> | 2015-08-11 18:04:07 +0200 |
---|---|---|
committer | Danilo Ercoli <ercoli@gmail.com> | 2015-08-11 18:04:07 +0200 |
commit | 3627a281f387c7f9a5d50f5904ccbcececf1b101 (patch) | |
tree | 372b7f75ef575fdaa254fc88ccf5930ea8f7d9e3 /WordPress/src/main/res/layout | |
parent | b9111e0c6b37c8fdb7c886c144822a70f0494807 (diff) | |
download | gradle-perf-android-medium-3627a281f387c7f9a5d50f5904ccbcececf1b101.tar.gz |
Add most of the code for "Latest Post Summary" module.
I changed a bit of other things while adding the module since some of the required code was already there, but in private class/method.
Diffstat (limited to 'WordPress/src/main/res/layout')
6 files changed, 186 insertions, 102 deletions
diff --git a/WordPress/src/main/res/layout/stats_activity.xml b/WordPress/src/main/res/layout/stats_activity.xml index 928da8d3a..b37176fd0 100644 --- a/WordPress/src/main/res/layout/stats_activity.xml +++ b/WordPress/src/main/res/layout/stats_activity.xml @@ -55,6 +55,13 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/margin_large" /> + <!-- LATEST POST SUMMARY SECTION --> + <FrameLayout + android:id="@+id/stats_insights_latest_post_summary_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/margin_large" /> + <org.wordpress.android.widgets.WPTextView android:textAppearance="?android:attr/textAppearance" android:textSize="@dimen/text_sz_large" diff --git a/WordPress/src/main/res/layout/stats_activity_single_post_details.xml b/WordPress/src/main/res/layout/stats_activity_single_post_details.xml index 0c7efe0a0..bdfeef2f2 100644 --- a/WordPress/src/main/res/layout/stats_activity_single_post_details.xml +++ b/WordPress/src/main/res/layout/stats_activity_single_post_details.xml @@ -25,6 +25,8 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/margin_large" android:layout_marginBottom="@dimen/margin_medium" + android:layout_marginLeft="@dimen/content_margin" + android:layout_marginRight="@dimen/content_margin" android:textColor="@color/grey_darken_20" android:gravity="center" android:text="Title"/> diff --git a/WordPress/src/main/res/layout/stats_insights_generic_fragment.xml b/WordPress/src/main/res/layout/stats_insights_generic_fragment.xml index 74c521a5f..1a72e9103 100644 --- a/WordPress/src/main/res/layout/stats_insights_generic_fragment.xml +++ b/WordPress/src/main/res/layout/stats_insights_generic_fragment.xml @@ -25,8 +25,6 @@ android:paddingBottom="@dimen/margin_small" style="@style/StatsModuleTitle" /> - <include layout="@layout/stats_insights_header_line" /> - <include android:id="@+id/stats_empty_module_placeholder" layout="@layout/stats_empty_module_placeholder" diff --git a/WordPress/src/main/res/layout/stats_insights_latest_post_item.xml b/WordPress/src/main/res/layout/stats_insights_latest_post_item.xml new file mode 100644 index 000000000..66ea0d4fb --- /dev/null +++ b/WordPress/src/main/res/layout/stats_insights_latest_post_item.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/stats_pager_tabs" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="@dimen/margin_large" + android:paddingBottom="@dimen/margin_medium" + android:layout_marginLeft="@dimen/content_margin" + android:layout_marginRight="@dimen/content_margin" + android:orientation="horizontal"> + + <org.wordpress.android.widgets.WPTextView + android:id="@+id/stats_post_trend_label" + android:background="?android:selectableItemBackground" + android:textAppearance="?android:attr/textAppearance" + android:textColor="@color/stats_module_content_list_header" + android:textSize="@dimen/text_sz_small" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center"/> + + </LinearLayout> + + <include layout="@layout/stats_insights_header_line" /> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/stats_latest_post_tabs" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + <!-- VIEWS tab--> + <include + layout="@layout/stats_visitors_and_views_tab" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="horizontal" /> + + <!-- LIKES tab --> + <include + layout="@layout/stats_visitors_and_views_tab" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="horizontal" /> + + <!-- COMMENTS tab --> + <include + layout="@layout/stats_visitors_and_views_tab" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="horizontal" /> + </LinearLayout> +</LinearLayout>
\ No newline at end of file diff --git a/WordPress/src/main/res/layout/stats_insights_most_popular_item.xml b/WordPress/src/main/res/layout/stats_insights_most_popular_item.xml index 6f6e45134..caf4a5e24 100644 --- a/WordPress/src/main/res/layout/stats_insights_most_popular_item.xml +++ b/WordPress/src/main/res/layout/stats_insights_most_popular_item.xml @@ -1,91 +1,100 @@ <?xml version="1.0" encoding="utf-8"?> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:baselineAligned="false" - android:padding="@dimen/margin_extra_large" - android:gravity="center_vertical|center_horizontal" android:orientation="vertical"> - <LinearLayout + <include layout="@layout/stats_insights_header_line" /> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingBottom="@dimen/margin_medium" - android:gravity="center_vertical|center_horizontal" > + android:baselineAligned="false" + android:padding="@dimen/margin_extra_large" + android:gravity="center_vertical|center_horizontal" + android:orientation="vertical"> - <org.wordpress.android.widgets.WPAutoResizeTextView - style="@style/StatsInsightsLabel" - android:gravity="center_vertical|center_horizontal" - android:layout_width="0dp" - android:layout_weight="1" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/stats_insights_most_popular_day" - android:textAllCaps="true" /> + android:paddingBottom="@dimen/margin_medium" + android:gravity="center_vertical|center_horizontal" > - <org.wordpress.android.widgets.WPAutoResizeTextView - style="@style/StatsInsightsLabel" - android:gravity="center_vertical|center_horizontal" - android:layout_height="wrap_content" - android:layout_width="0dp" - android:layout_weight="1" - android:text="@string/stats_insights_most_popular_hour" - android:textAllCaps="true" /> - </LinearLayout> + <org.wordpress.android.widgets.WPAutoResizeTextView + style="@style/StatsInsightsLabel" + android:gravity="center_vertical|center_horizontal" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:text="@string/stats_insights_most_popular_day" + android:textAllCaps="true" /> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical|center_horizontal"> + <org.wordpress.android.widgets.WPAutoResizeTextView + style="@style/StatsInsightsLabel" + android:gravity="center_vertical|center_horizontal" + android:layout_height="wrap_content" + android:layout_width="0dp" + android:layout_weight="1" + android:text="@string/stats_insights_most_popular_hour" + android:textAllCaps="true" /> + </LinearLayout> - <org.wordpress.android.widgets.WPAutoResizeTextView - android:gravity="center_vertical|center_horizontal" - android:layout_gravity="center_vertical|center_horizontal" - android:id="@+id/stats_most_popular_day" - style="@style/StatsInsightsValues" - android:layout_width="0dp" - android:layout_weight="1" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="0" - android:textColor="@color/grey_darken_30" /> + android:orientation="horizontal" + android:gravity="center_vertical|center_horizontal"> - <org.wordpress.android.widgets.WPAutoResizeTextView - android:gravity="center_vertical|center_horizontal" - android:layout_gravity="center_vertical|center_horizontal" - android:id="@+id/stats_most_popular_hour" - style="@style/StatsInsightsValues" - android:layout_width="0dp" - android:layout_weight="1" - android:layout_height="wrap_content" - android:text="0" - android:textColor="@color/grey_darken_30" /> - </LinearLayout> + <org.wordpress.android.widgets.WPAutoResizeTextView + android:gravity="center_vertical|center_horizontal" + android:layout_gravity="center_vertical|center_horizontal" + android:id="@+id/stats_most_popular_day" + style="@style/StatsInsightsValues" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:text="0" + android:textColor="@color/grey_darken_30" /> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="@dimen/margin_medium" - android:gravity="center_vertical|center_horizontal" > + <org.wordpress.android.widgets.WPAutoResizeTextView + android:gravity="center_vertical|center_horizontal" + android:layout_gravity="center_vertical|center_horizontal" + android:id="@+id/stats_most_popular_hour" + style="@style/StatsInsightsValues" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:text="0" + android:textColor="@color/grey_darken_30" /> + </LinearLayout> - <org.wordpress.android.widgets.WPAutoResizeTextView - style="@style/StatsInsightsLabel" - android:id="@+id/stats_most_popular_day_percent" - android:gravity="center_vertical|center_horizontal" - android:layout_width="0dp" - android:layout_weight="1" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/stats_insights_most_popular_percent_views" - android:textColor="@color/grey_darken_10" /> + android:paddingTop="@dimen/margin_medium" + android:gravity="center_vertical|center_horizontal" > - <org.wordpress.android.widgets.WPAutoResizeTextView - style="@style/StatsInsightsLabel" - android:id="@+id/stats_most_popular_hour_percent" - android:gravity="center_vertical|center_horizontal" - android:layout_height="wrap_content" - android:layout_width="0dp" - android:layout_weight="1" - android:text="@string/stats_insights_most_popular_percent_views" - android:textColor="@color/grey_darken_10" /> - </LinearLayout> + <org.wordpress.android.widgets.WPAutoResizeTextView + style="@style/StatsInsightsLabel" + android:id="@+id/stats_most_popular_day_percent" + android:gravity="center_vertical|center_horizontal" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:text="@string/stats_insights_most_popular_percent_views" + android:textColor="@color/grey_darken_10" /> + + <org.wordpress.android.widgets.WPAutoResizeTextView + style="@style/StatsInsightsLabel" + android:id="@+id/stats_most_popular_hour_percent" + android:gravity="center_vertical|center_horizontal" + android:layout_height="wrap_content" + android:layout_width="0dp" + android:layout_weight="1" + android:text="@string/stats_insights_most_popular_percent_views" + android:textColor="@color/grey_darken_10" /> + </LinearLayout> + </LinearLayout> </LinearLayout>
\ No newline at end of file diff --git a/WordPress/src/main/res/layout/stats_insights_today_item.xml b/WordPress/src/main/res/layout/stats_insights_today_item.xml index 5c016458d..5c0fabc8f 100644 --- a/WordPress/src/main/res/layout/stats_insights_today_item.xml +++ b/WordPress/src/main/res/layout/stats_insights_today_item.xml @@ -1,40 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/stats_pager_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal"> + android:orientation="vertical"> - <!-- VIEWS tab--> - <include - layout="@layout/stats_visitors_and_views_tab" - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="horizontal" /> + <include layout="@layout/stats_insights_header_line" /> - <!-- VISITORS tab --> - <include - layout="@layout/stats_visitors_and_views_tab" - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="horizontal" /> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/stats_post_tabs" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> - <!-- LIKES tab --> - <include - layout="@layout/stats_visitors_and_views_tab" - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="horizontal" /> + <!-- VIEWS tab--> + <include + layout="@layout/stats_visitors_and_views_tab" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="horizontal" /> - <!-- COMMENTS tab --> - <include - layout="@layout/stats_visitors_and_views_tab" - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="horizontal" /> + <!-- VISITORS tab --> + <include + layout="@layout/stats_visitors_and_views_tab" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="horizontal" /> + <!-- LIKES tab --> + <include + layout="@layout/stats_visitors_and_views_tab" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="horizontal" /> + + <!-- COMMENTS tab --> + <include + layout="@layout/stats_visitors_and_views_tab" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="horizontal" /> + + </LinearLayout> </LinearLayout>
\ No newline at end of file |