From 0c1b740fc48c14d784df63cac605150af19b3390 Mon Sep 17 00:00:00 2001 From: Mario Zorz <mariozorz@gmail.com> Date: Fri, 27 Oct 2017 10:17:54 -0300 Subject: [PATCH] Revert "changed Publish button to row1, and View button to row 2" This reverts commit 74fc93a5ae4a305a2929b7c28c95abb86ddeee1f. --- .../android/ui/posts/adapters/PostsListAdapter.java | 8 ++++---- WordPress/src/main/res/layout/post_cardview.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java b/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java index 0183c37e1bc6..3a567667e3f5 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java @@ -543,7 +543,7 @@ private void configurePostButtons(final PostViewHolder holder, // edit / view are always visible holder.btnEdit.setVisibility(View.VISIBLE); - holder.btnPublish.setVisibility(View.VISIBLE); + holder.btnView.setVisibility(View.VISIBLE); // if we have enough room to show all buttons, hide the back/more buttons and show stats/trash/publish if (mAlwaysShowAllButtons || numVisibleButtons <= 3) { @@ -561,7 +561,7 @@ private void configurePostButtons(final PostViewHolder holder, holder.btnBack.setVisibility(View.GONE); holder.btnTrash.setVisibility(View.GONE); holder.btnStats.setVisibility(View.GONE); - holder.btnView.setVisibility(View.GONE); + holder.btnPublish.setVisibility(View.GONE); } View.OnClickListener btnClickListener = new View.OnClickListener() { @@ -615,11 +615,11 @@ public void onAnimationEnd(Animator animation) { // row 1 holder.btnEdit.setVisibility(showRow1 ? View.VISIBLE : View.GONE); - holder.btnPublish.setVisibility(showRow1 && canPublishPost(post) ? View.VISIBLE : View.GONE); + holder.btnView.setVisibility(showRow1 ? View.VISIBLE : View.GONE); holder.btnMore.setVisibility(showRow1 ? View.VISIBLE : View.GONE); // row 2 - holder.btnView.setVisibility(!showRow1 ? View.VISIBLE : View.GONE); holder.btnStats.setVisibility(!showRow1 && canShowStatsForPost(post) ? View.VISIBLE : View.GONE); + holder.btnPublish.setVisibility(!showRow1 && canPublishPost(post) ? View.VISIBLE : View.GONE); holder.btnTrash.setVisibility(!showRow1 ? View.VISIBLE : View.GONE); holder.btnBack.setVisibility(!showRow1 ? View.VISIBLE : View.GONE); diff --git a/WordPress/src/main/res/layout/post_cardview.xml b/WordPress/src/main/res/layout/post_cardview.xml index 6e9aa4d3eca8..7d71a4062bdf 100644 --- a/WordPress/src/main/res/layout/post_cardview.xml +++ b/WordPress/src/main/res/layout/post_cardview.xml @@ -116,20 +116,20 @@ wp:wpPostButtonType="edit" /> <org.wordpress.android.widgets.PostListButton - android:id="@+id/btn_publish" + android:id="@+id/btn_view" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" - wp:wpPostButtonType="publish" /> + wp:wpPostButtonType="view" /> <org.wordpress.android.widgets.PostListButton - android:id="@+id/btn_view" + android:id="@+id/btn_publish" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" - wp:wpPostButtonType="view" /> + wp:wpPostButtonType="publish" /> <org.wordpress.android.widgets.PostListButton android:id="@+id/btn_stats"