From 5e69c37523e60d1893fe01cad29397c0cfcceb22 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Wed, 20 Nov 2013 22:24:46 +0100 Subject: [PATCH 01/12] Add title / description and icon in the empty view --- res/layout/reader_fragment_post_list.xml | 39 +++++++++++++++---- res/values/colors.xml | 1 + res/values/dimens.xml | 3 ++ res/values/reader_styles.xml | 3 +- res/values/strings.xml | 3 ++ res/values/styles.xml | 19 ++++++++- .../reader_native/ReaderPostListFragment.java | 22 +++++++---- 7 files changed, 73 insertions(+), 17 deletions(-) diff --git a/res/layout/reader_fragment_post_list.xml b/res/layout/reader_fragment_post_list.xml index 5835ce35c13e..16dbb70d3d7e 100644 --- a/res/layout/reader_fragment_post_list.xml +++ b/res/layout/reader_fragment_post_list.xml @@ -16,13 +16,36 @@ android:text="@string/reader_label_new_posts_one" android:visibility="gone" /> - + + + + + + + + + \ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index 5a6444c68faf..108ffe0e5960 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -69,6 +69,7 @@ #eeeeee #dddddd #999999 + #777777 #333333 #222222 diff --git a/res/values/dimens.xml b/res/values/dimens.xml index fd45e9131a92..3282cfebd10f 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -61,6 +61,9 @@ 96dp + 24sp + 18sp + 12dp 4dp 4dp diff --git a/res/values/reader_styles.xml b/res/values/reader_styles.xml index 6d8de16e0d6d..821bdb6e6b5c 100644 --- a/res/values/reader_styles.xml +++ b/res/values/reader_styles.xml @@ -137,8 +137,9 @@ wrap_content @dimen/reader_text_sz_large center - @color/grey_medium + @color/grey_dark + + + + + + + \ No newline at end of file diff --git a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java index 9e0a6c6779c8..e1f7b44b08c1 100644 --- a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java +++ b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java @@ -51,7 +51,7 @@ public class ReaderPostListFragment extends Fragment implements View.OnTouchList private ReaderActionBarTagAdapter mActionBarAdapter; private TextView mNewPostsBar; - private TextView mEmptyMessage; + private View mEmptyView; private View mFooterProgress; private String mCurrentTag; @@ -219,13 +219,13 @@ public void onClick(View view) { }); // textView that appears when current tag has no posts - mEmptyMessage = (TextView) view.findViewById(R.id.text_empty); + mEmptyView = view.findViewById(R.id.empty_view); // move the "new posts" bar and "empty" textView down when the translucent ActionBar is enabled if (isTranslucentActionBarEnabled) { RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mNewPostsBar.getLayoutParams(); params.setMargins(0, actionbarHeight, 0, 0); - mEmptyMessage.setPadding(0, actionbarHeight, 0, 0); + mEmptyView.setPadding(0, actionbarHeight, 0, 0); } if (useGridView) { @@ -304,12 +304,20 @@ public void onItemClick(AdapterView adapterView, View view, int position, lon @Override public void onDataLoaded(boolean isEmpty) { if (isEmpty) { - // different empty text depending on whether this tag has ever been updated boolean hasTagEverUpdated = ReaderTagTable.hasEverUpdatedTag(mCurrentTag); - mEmptyMessage.setText(hasTagEverUpdated ? R.string.reader_empty_posts_in_tag : R.string.reader_empty_posts_in_tag_never_updated); - mEmptyMessage.setVisibility(View.VISIBLE); + final TextView title = (TextView) getActivity().findViewById(R.id.title_empty); + title.setText(hasTagEverUpdated ? + R.string.reader_empty_followed_tags_title : + R.string.reader_empty_posts_in_tag_never_updated); + final TextView description = (TextView) getActivity().findViewById(R.id.description_empty); + if (hasTagEverUpdated) { + description.setText(R.string.reader_empty_followed_tags_description); + } else { + description.setVisibility(View.GONE); + } + mEmptyView.setVisibility(View.VISIBLE); } else { - mEmptyMessage.setVisibility(View.GONE); + mEmptyView.setVisibility(View.GONE); // restore previous scroll position if (mScrollToIndex > 0) { final ListView listView = (ListView) getActivity().findViewById(android.R.id.list); From a807c64fcdcb94b6f55d1c65ef603085dd51d447 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Thu, 21 Nov 2013 12:58:08 +0100 Subject: [PATCH 02/12] add new assets and animations to the reader "Blogs I Follow" empty list --- res/anim/box_with_pages_slide_up_page1.xml | 8 +++ res/anim/box_with_pages_slide_up_page2.xml | 8 +++ res/anim/box_with_pages_slide_up_page3.xml | 8 +++ res/drawable-xhdpi/box_with_pages_bottom.png | Bin 0 -> 97 bytes res/drawable-xhdpi/box_with_pages_page1.png | Bin 0 -> 227 bytes res/drawable-xhdpi/box_with_pages_page2.png | Bin 0 -> 117 bytes res/drawable-xhdpi/box_with_pages_page3.png | Bin 0 -> 161 bytes res/drawable-xhdpi/box_with_pages_top.png | Bin 0 -> 772 bytes res/layout/reader_fragment_post_list.xml | 55 ++++++++++++++++-- .../reader_native/ReaderPostListFragment.java | 20 +++++++ 10 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 res/anim/box_with_pages_slide_up_page1.xml create mode 100644 res/anim/box_with_pages_slide_up_page2.xml create mode 100644 res/anim/box_with_pages_slide_up_page3.xml create mode 100644 res/drawable-xhdpi/box_with_pages_bottom.png create mode 100644 res/drawable-xhdpi/box_with_pages_page1.png create mode 100644 res/drawable-xhdpi/box_with_pages_page2.png create mode 100644 res/drawable-xhdpi/box_with_pages_page3.png create mode 100644 res/drawable-xhdpi/box_with_pages_top.png diff --git a/res/anim/box_with_pages_slide_up_page1.xml b/res/anim/box_with_pages_slide_up_page1.xml new file mode 100644 index 000000000000..a85fc5429e96 --- /dev/null +++ b/res/anim/box_with_pages_slide_up_page1.xml @@ -0,0 +1,8 @@ + + + diff --git a/res/anim/box_with_pages_slide_up_page2.xml b/res/anim/box_with_pages_slide_up_page2.xml new file mode 100644 index 000000000000..782df4db5f27 --- /dev/null +++ b/res/anim/box_with_pages_slide_up_page2.xml @@ -0,0 +1,8 @@ + + + diff --git a/res/anim/box_with_pages_slide_up_page3.xml b/res/anim/box_with_pages_slide_up_page3.xml new file mode 100644 index 000000000000..bb4f315d8983 --- /dev/null +++ b/res/anim/box_with_pages_slide_up_page3.xml @@ -0,0 +1,8 @@ + + + diff --git a/res/drawable-xhdpi/box_with_pages_bottom.png b/res/drawable-xhdpi/box_with_pages_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..ec010b34f01e1bfecd2994d30d6eca6d5e798e85 GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^Yk)Y1kr_yy6+f*Hq?iMILR_0$TH8!EJqB_mJzX3_ sDj44$G-L$w4k`RzzU>%aLL~!(4CfXG#;^7h`GLX=p00i_>zopr06W+j1^@s6 literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/box_with_pages_page1.png b/res/drawable-xhdpi/box_with_pages_page1.png new file mode 100644 index 0000000000000000000000000000000000000000..d691dcd8d3dcc6148d84359c43300d61a243aa07 GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0vp^1wcHRg&9aLk!uJ6QqloFA+G=b{|7RsPMtb?_Ut)x z=3KdQ1;_@H8#iuL)mJiweYTm4G+CG;-fW;ApZeP)hSaz;Kful*mf+4!$Sjdayzd}H} O89ZJ6T-G@yGywoxMN%06 literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/box_with_pages_page2.png b/res/drawable-xhdpi/box_with_pages_page2.png new file mode 100644 index 0000000000000000000000000000000000000000..cf50edec81116ca702c0babb9114d9eb639aec0b GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^SwP&w$P6UceOl)Yq}T#{LR_z0xw3KN#+vmrQh_2` zo-U3d6^zLeZ4E#F|Nmbv@uTrcyW(-#r+hi58XNh)Jm!-$;Bq^tA;HS9i`%ZiVb7&v Ppe_baS3j3^P6-&IlxToYi0hRrSGH`~vSY`NOP4Nf z-n@C^#*K>?FV6UWY8g<0yQhm|NCo5DtBQgQ3IYs{S`MOG0gYT=`VX9*t}mH(e*L~_ zubv)T&2u{o^ BJUjpZ literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/box_with_pages_top.png b/res/drawable-xhdpi/box_with_pages_top.png new file mode 100644 index 0000000000000000000000000000000000000000..b284f25d1f2768c550fd5fa98167099ab7b1c37d GIT binary patch literal 772 zcmeAS@N?(olHy`uVBq!ia0vp^Yk)Y1gBeI3U|$)>z`)2I;1l8s8|Xry5D)>i0L6hSfdHrs z2!L9Ee2^|U0xJfJ13_P3Uvo>V>Cu$6K%HSFL4LsuUv`%{S$H*_`29&nVd}5FdUqxs zTzvVq@?Z1xU5~A*U(4+h=VNDPV&UMIeA3T#q>NE$6DPNT6q{bz)<=Kk!*6nYnSG&s z-wqa$+n+Leer?kc5Hl@1@>_R#^GaaA2YI?UhE&A8y>UE<$x+1Zq1zepVyD1B2LV^s zWIhSzX9mCi`6mT#o;Pcs^gEq%l}-5?#=l0uPPM$EiEjUC!B5uQGqDWIl zd!zca8<&lze!Wws8I!SQy6@wq1xpXa&CcH-o&P$Q>Dt@aquswg%;?bkccp82*u3~j zpH5z^$=$ox-O1i=|GxSkc1$oo!aa+dQMRl8+Xl}{m8JzLpv2gTe~DWM4f4< - + android:layout_marginBottom="8dp"> + + + + + + + + + + + + + adapterView, View view, int position, lon return view; } + private void startBoxAndPagesAnimation() { + Animation animPage1 = AnimationUtils.loadAnimation(getActivity(), + R.anim.box_with_pages_slide_up_page1); + ImageView page1 = (ImageView) getActivity().findViewById(R.id.empty_tags_box_page1); + page1.startAnimation(animPage1); + + Animation animPage2 = AnimationUtils.loadAnimation(getActivity(), + R.anim.box_with_pages_slide_up_page2); + ImageView page2 = (ImageView) getActivity().findViewById(R.id.empty_tags_box_page2); + page2.startAnimation(animPage2); + + Animation animPage3 = AnimationUtils.loadAnimation(getActivity(), + R.anim.box_with_pages_slide_up_page3); + ImageView page3 = (ImageView) getActivity().findViewById(R.id.empty_tags_box_page3); + page3.startAnimation(animPage3); + } + /* * called by post adapter when data has been loaded */ @@ -310,6 +329,7 @@ public void onDataLoaded(boolean isEmpty) { R.string.reader_empty_followed_tags_title : R.string.reader_empty_posts_in_tag_never_updated); final TextView description = (TextView) getActivity().findViewById(R.id.description_empty); + startBoxAndPagesAnimation(); if (hasTagEverUpdated) { description.setText(R.string.reader_empty_followed_tags_description); } else { From 391100a30f0113c1d274a6062008af88de4be5ab Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Thu, 21 Nov 2013 13:00:33 +0100 Subject: [PATCH 03/12] add box animation assets in drawable-mdpi --- res/drawable-mdpi/box_with_pages_bottom.png | Bin 0 -> 86 bytes res/drawable-mdpi/box_with_pages_page1.png | Bin 0 -> 190 bytes res/drawable-mdpi/box_with_pages_page2.png | Bin 0 -> 105 bytes res/drawable-mdpi/box_with_pages_page3.png | Bin 0 -> 121 bytes res/drawable-mdpi/box_with_pages_top.png | Bin 0 -> 439 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 res/drawable-mdpi/box_with_pages_bottom.png create mode 100644 res/drawable-mdpi/box_with_pages_page1.png create mode 100644 res/drawable-mdpi/box_with_pages_page2.png create mode 100644 res/drawable-mdpi/box_with_pages_page3.png create mode 100644 res/drawable-mdpi/box_with_pages_top.png diff --git a/res/drawable-mdpi/box_with_pages_bottom.png b/res/drawable-mdpi/box_with_pages_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..2e685cb30597e979bd5c1ad76e7a68b00a42ab94 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^VL)ug$P6UYbN;*oQp^E9A+F6Wt!*Zo9s{|2o-U3d h6^zLeED0h#ObkpN42-dHiO+yC44$rjF6*2Ung9nu6XyT` literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/box_with_pages_page1.png b/res/drawable-mdpi/box_with_pages_page1.png new file mode 100644 index 0000000000000000000000000000000000000000..fb7b3315b06dbc17fe3012070ea8f19d77ee3ade GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^7C`L9!3-pCZc2X!q@)9ULR|m<{|{tNojP^SoH!XzR&wb+di{)@wkWA?eex`kGsad5Pc%Sz;mpz%-=%66LVZs#r hnq!xk0LLCq?SeN^4!g?T&H>G3@O1TaS?83{1OTkVMNj|$ literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/box_with_pages_page2.png b/res/drawable-mdpi/box_with_pages_page2.png new file mode 100644 index 0000000000000000000000000000000000000000..0e61552067c608947f389c55ffa83c577b86afab GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^ragTe~DWM4f D(K#V@ literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/box_with_pages_page3.png b/res/drawable-mdpi/box_with_pages_page3.png new file mode 100644 index 0000000000000000000000000000000000000000..fb3181f32af8064ad21ad7fc9957400c3fac2a11 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^WXFcrA$`?sRqwx>B_X$0Yzxd?e9LWXFHn`)s$8Ie8N;RZ8*bk) RxjPGFrl+f)%Q~loCIGXdD4zfT literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/box_with_pages_top.png b/res/drawable-mdpi/box_with_pages_top.png new file mode 100644 index 0000000000000000000000000000000000000000..df37ace6a146b934583bb2eb930e51177bff3aa1 GIT binary patch literal 439 zcmeAS@N?(olHy`uVBq!ia0vp^VL)ug!3HE_7v-&GU|_8Cba4!+V0?SS(EG51#IcXc zu3K2GyKX&r^zM<;u8g_?TR^G<5HeOI`G@G(#`sr6M$_3QLmv+P-=)c5w>EJK9 z6b-A$;>))Bf9xIV-V62#9}e8}BR_K5LU~594GpdhtU3vT37;9bBUmC1^c{a3x&C_f zi;_G&>E6wY_g~A2n^Q6GI`85azNfyNu8LTCB}srq|7lUBKgUC{z|~i?J}g=mc9<>k z$2!BVb#eB#DvNeb-SF#hwrTl&mNoCreP`BA{QdXfWHy6Hr!SeZIon^~)lQX0=&vX+5E#K>z$69_ cmy1RBw>vF4ZJw8K2^b*^p00i_>zopr0Ql>^K>z>% literal 0 HcmV?d00001 From f87a6b1aca60f20fa329134bbd177c15e4810213 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Thu, 21 Nov 2013 16:32:58 +0100 Subject: [PATCH 04/12] fix hidden description doesn't come back --- .../android/ui/reader_native/ReaderPostListFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java index 3d990a4ed776..9270b01c707a 100644 --- a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java +++ b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java @@ -332,6 +332,7 @@ public void onDataLoaded(boolean isEmpty) { startBoxAndPagesAnimation(); if (hasTagEverUpdated) { description.setText(R.string.reader_empty_followed_tags_description); + description.setVisibility(View.VISIBLE); } else { description.setVisibility(View.GONE); } From 535b84485b1f794c519bc21da5c5c31daa42afd6 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Fri, 22 Nov 2013 09:26:55 +0100 Subject: [PATCH 05/12] Detect defaults _tags_ in Reader (Blogs I Follow, Posts I Like) and change the default empty view texts accordingly --- res/layout/reader_fragment_post_list.xml | 6 ++- res/values/strings.xml | 6 +-- .../reader_native/ReaderPostListFragment.java | 49 +++++++++++++++---- 3 files changed, 46 insertions(+), 15 deletions(-) diff --git a/res/layout/reader_fragment_post_list.xml b/res/layout/reader_fragment_post_list.xml index ee297e64b45f..a50a6ae4f249 100644 --- a/res/layout/reader_fragment_post_list.xml +++ b/res/layout/reader_fragment_post_list.xml @@ -73,8 +73,6 @@ android:layout_height="54dp" android:src="@drawable/box_with_pages_top" android:layout_alignParentBottom="true" /> - - diff --git a/res/values/strings.xml b/res/values/strings.xml index f3c1768b4476..c761eb49b82f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -727,9 +727,9 @@ No articles with this tag yet You don\'t follow any tags No popular tags - - You are not following any blogs yet. - But don\'t worry, just tap the plus icon in the top menu to explore and follow blogs. They\'ll show up right here! + You\'re not following any blogs yet. + But don\'t worry, just tap the plus icon to start exploring! + You have not liked any posts. Create an account on WordPress.com diff --git a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java index 5957df0c9602..bea3b3cfa0c0 100644 --- a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java +++ b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java @@ -308,6 +308,33 @@ private void startBoxAndPagesAnimation() { page3.startAnimation(animPage3); } + private String[] getEmptyTitleAndDecription() { + int tagIndex = mActionBarAdapter.getIndexOfTagName(mCurrentTag); + boolean hasTagEverUpdated = ReaderTagTable.hasEverUpdatedTag(mCurrentTag); + int title, description = -1; + switch (tagIndex) { + case 0: // Blogs I Follow + title = R.string.reader_empty_followed_blogs_title; + description = R.string.reader_empty_followed_blogs_description; + break; + case 2: // Posts I Like + title = R.string.reader_empty_posts_liked; + break; + default: // Freshly Pressed and other Tags + if (hasTagEverUpdated) { + title = R.string.reader_empty_posts_in_tag; + } else { + title = R.string.reader_empty_posts_in_tag_never_updated; + } + break; + } + if (description == -1) { + return new String[]{getString(title), null}; + } else { + return new String[]{getString(title), getString(description)}; + } + } + /* * called by post adapter when data has been loaded */ @@ -315,18 +342,20 @@ private void startBoxAndPagesAnimation() { @Override public void onDataLoaded(boolean isEmpty) { if (isEmpty) { - boolean hasTagEverUpdated = ReaderTagTable.hasEverUpdatedTag(mCurrentTag); - final TextView title = (TextView) getActivity().findViewById(R.id.title_empty); - title.setText(hasTagEverUpdated ? - R.string.reader_empty_followed_tags_title : - R.string.reader_empty_posts_in_tag_never_updated); - final TextView description = (TextView) getActivity().findViewById(R.id.description_empty); + TextView titleView = (TextView) getActivity().findViewById(R.id.title_empty); + TextView descriptionView = (TextView) getActivity(). + findViewById(R.id.description_empty); + String title, description; + String[] titleAndDesc = getEmptyTitleAndDecription(); + title = titleAndDesc[0]; + description = titleAndDesc[1]; startBoxAndPagesAnimation(); - if (hasTagEverUpdated) { - description.setText(R.string.reader_empty_followed_tags_description); - description.setVisibility(View.VISIBLE); + titleView.setText(title); + if (description == null) { + descriptionView.setVisibility(View.GONE); } else { - description.setVisibility(View.GONE); + descriptionView.setText(description); + descriptionView.setVisibility(View.VISIBLE); } mEmptyView.setVisibility(View.VISIBLE); } else { From d2c17f8bf26ada2433f99182876f6de6b6f1b64c Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Fri, 22 Nov 2013 10:32:48 +0100 Subject: [PATCH 06/12] include empty_view in both list and grid reader post list views --- res/layout/reader_empty_view.xml | 78 +++++++++++++++++++++++ res/layout/reader_fragment_post_grid.xml | 3 + res/layout/reader_fragment_post_list.xml | 81 +----------------------- 3 files changed, 83 insertions(+), 79 deletions(-) create mode 100644 res/layout/reader_empty_view.xml diff --git a/res/layout/reader_empty_view.xml b/res/layout/reader_empty_view.xml new file mode 100644 index 000000000000..50d4c5f631cd --- /dev/null +++ b/res/layout/reader_empty_view.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/reader_fragment_post_grid.xml b/res/layout/reader_fragment_post_grid.xml index 75c22a28849a..95eff736bee6 100644 --- a/res/layout/reader_fragment_post_grid.xml +++ b/res/layout/reader_fragment_post_grid.xml @@ -33,4 +33,7 @@ android:text="@string/reader_empty_posts_in_tag" android:visibility="gone" /> + + \ No newline at end of file diff --git a/res/layout/reader_fragment_post_list.xml b/res/layout/reader_fragment_post_list.xml index a50a6ae4f249..a3422975e6ad 100644 --- a/res/layout/reader_fragment_post_list.xml +++ b/res/layout/reader_fragment_post_list.xml @@ -16,85 +16,8 @@ android:text="@string/reader_label_new_posts_one" android:visibility="gone" /> - - - - - - - - - - - - - - - - - - - - + layout="@layout/reader_empty_view"/> \ No newline at end of file From 76df44bb9512d1dfefaa43b8bfa6c62e6c4225e1 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Fri, 22 Nov 2013 12:07:28 +0100 Subject: [PATCH 07/12] add arrow tip and animation --- res/anim/up_and_down.xml | 8 + res/drawable-mdpi/tip_up_arrow.png | Bin 0 -> 1323 bytes res/layout/reader_empty_view.xml | 148 ++++++++++-------- res/values/dimens.xml | 1 + .../android/ui/reader/ReaderActivity.java | 3 - .../reader_native/NativeReaderActivity.java | 28 ++++ .../reader_native/ReaderPostListFragment.java | 54 ++++--- 7 files changed, 158 insertions(+), 84 deletions(-) create mode 100644 res/anim/up_and_down.xml create mode 100644 res/drawable-mdpi/tip_up_arrow.png diff --git a/res/anim/up_and_down.xml b/res/anim/up_and_down.xml new file mode 100644 index 000000000000..fbaa372412af --- /dev/null +++ b/res/anim/up_and_down.xml @@ -0,0 +1,8 @@ + + diff --git a/res/drawable-mdpi/tip_up_arrow.png b/res/drawable-mdpi/tip_up_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..4196a2b9c29e812e69a21b841510c3a7f965d1ba GIT binary patch literal 1323 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%qp275hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|81#=KlDb#X~hD#E>34K5C;EJ)Q4 zN-fSWElLJPT$(b-ssbzLqSVBa{GyQj{2W*)24v)y-fM)1rW~Nw~8o8P|o13|rI9UM0-PPF9($UDp(a^%c)zsA0 z(ajvD*Cju>G&eP`1g19yuGicEr(RHE$SnZc?2=lPS(cjOR+OKs0QR(1CT_R5;4}}a zHwC9#%v^Em)dxC89~8AnQ4JFUrXLU!o^XL2c+yYJ1E%*PV8X7i)6!vJV4Ume;uunK z>rMFWu0sX_zL&%V=l_}TZ%RkT)%6=iy!Asgek3fkzsfEz;<&LZXp{9smcm@$nDW-U zd>z7*PR^OLbIHLeL0|k7Uz}Yu-8aWr+Yj8&M-L?y1;ra zU!IAS&-u?WQ!*qwyx1<8EPeeos;BYWs;_gF#;sRB#HcFe8mQS3#NavUg3jrPAVH@K z6*kjemDTVaN|a!`T)tcO^$ahbf?JMlhZmNt-WzxM{dZT31<6|N3_|Bje3v}>6K7Ge zQ!CbO`^jaG{@h}F6gSn{<*CW}6Uxzl)#rr0{W|IO5C2-hs|;BTrVUaDZZkgEbbRG2 mVefDMc5FTT|6l1J#RCjgF{esC?&#nF6 - + android:visibility="gone" + > - + + android:layout_width="@dimen/arrow_tip_size" + android:layout_height="@dimen/arrow_tip_size" + android:id="@+id/empty_arrow_tip" + android:src="@drawable/tip_up_arrow" + android:visibility="invisible" /> - + - + - + - - + - + - + + + + + + + + + + + \ No newline at end of file diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 3282cfebd10f..11f511946da7 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -63,6 +63,7 @@ 24sp 18sp + 32dp 12dp 4dp diff --git a/src/org/wordpress/android/ui/reader/ReaderActivity.java b/src/org/wordpress/android/ui/reader/ReaderActivity.java index b8524556b437..f46c1195a42e 100644 --- a/src/org/wordpress/android/ui/reader/ReaderActivity.java +++ b/src/org/wordpress/android/ui/reader/ReaderActivity.java @@ -3,11 +3,9 @@ import android.app.Dialog; import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; import android.content.res.Configuration; import android.net.Uri; import android.os.Bundle; -import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; @@ -28,7 +26,6 @@ import org.wordpress.android.R; import org.wordpress.android.WordPress; import org.wordpress.android.ui.WPActionBarActivity; -import org.wordpress.android.ui.posts.PostsActivity; import org.wordpress.android.ui.reader.ReaderBaseFragment.ChangeTopicListener; import org.wordpress.android.ui.reader.ReaderBaseFragment.GetLastSelectedItemListener; import org.wordpress.android.ui.reader.ReaderBaseFragment.GetLoadedItemsListener; diff --git a/src/org/wordpress/android/ui/reader_native/NativeReaderActivity.java b/src/org/wordpress/android/ui/reader_native/NativeReaderActivity.java index 3e0f47bfa5e8..097837346b13 100644 --- a/src/org/wordpress/android/ui/reader_native/NativeReaderActivity.java +++ b/src/org/wordpress/android/ui/reader_native/NativeReaderActivity.java @@ -7,6 +7,8 @@ import android.os.Bundle; import android.support.v4.app.Fragment; import android.text.TextUtils; +import android.view.View; +import android.view.ViewTreeObserver; import android.view.Window; import com.actionbarsherlock.view.MenuInflater; @@ -48,6 +50,7 @@ public class NativeReaderActivity extends WPActionBarActivity implements ReaderP private int mPrevActionBarAlpha = 0; private MenuItem mRefreshMenuItem; + private int[] mTagMenuItemLocation; private boolean mHasPerformedInitialUpdate = false; private boolean mHasPerformedPurge = false; @@ -203,6 +206,30 @@ protected void setIsUpdating(boolean isUpdating) { } } + private void hookTagItemMenuLocationWatcher() { + final ViewTreeObserver viewTreeObserver = getWindow().getDecorView().getViewTreeObserver(); + if (viewTreeObserver != null) { + viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { + @Override + public void onGlobalLayout() { + View menuButton = findViewById(R.id.menu_tags); + if (menuButton != null) { + mTagMenuItemLocation = new int[2]; + menuButton.getLocationInWindow(mTagMenuItemLocation); + // We want the center position + mTagMenuItemLocation[0] += menuButton.getWidth() / 2; + mTagMenuItemLocation[1] += menuButton.getHeight() / 2; + } + viewTreeObserver.removeOnGlobalLayoutListener(this); + } + }); + } + } + + public int[] getTagMenuItemLocation() { + return mTagMenuItemLocation; + } + @Override public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) { super.onCreateOptionsMenu(menu); @@ -213,6 +240,7 @@ public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) { shouldAnimateRefreshButton = false; startAnimatingRefreshButton(mRefreshMenuItem); } + hookTagItemMenuLocationWatcher(); return true; } diff --git a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java index bea3b3cfa0c0..74cab33532c4 100644 --- a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java +++ b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java @@ -17,6 +17,7 @@ import android.widget.AbsListView; import android.widget.AdapterView; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.TextView; @@ -220,7 +221,9 @@ public void onClick(View view) { // move the "new posts" bar and "empty" textView down when the translucent ActionBar is enabled if (isTranslucentActionBarEnabled) { RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mNewPostsBar.getLayoutParams(); - params.setMargins(0, actionbarHeight, 0, 0); + if (params != null) { + params.setMargins(0, actionbarHeight, 0, 0); + } mEmptyView.setPadding(0, actionbarHeight, 0, 0); } @@ -308,14 +311,16 @@ private void startBoxAndPagesAnimation() { page3.startAnimation(animPage3); } - private String[] getEmptyTitleAndDecription() { + private void setEmptyTitleAndDecriptionForCurrentTag() { int tagIndex = mActionBarAdapter.getIndexOfTagName(mCurrentTag); boolean hasTagEverUpdated = ReaderTagTable.hasEverUpdatedTag(mCurrentTag); int title, description = -1; + setEmptyViewTipArrowVisible(View.GONE); switch (tagIndex) { case 0: // Blogs I Follow title = R.string.reader_empty_followed_blogs_title; description = R.string.reader_empty_followed_blogs_description; + setEmptyViewTipArrowVisible(View.VISIBLE); break; case 2: // Posts I Like title = R.string.reader_empty_posts_liked; @@ -328,10 +333,36 @@ private String[] getEmptyTitleAndDecription() { } break; } + TextView titleView = (TextView) getActivity().findViewById(R.id.title_empty); + TextView descriptionView = (TextView) getActivity().findViewById(R.id.description_empty); + titleView.setText(getString(title)); if (description == -1) { - return new String[]{getString(title), null}; + descriptionView.setVisibility(View.INVISIBLE); } else { - return new String[]{getString(title), getString(description)}; + descriptionView.setText(getString(description)); + descriptionView.setVisibility(View.VISIBLE); + } + } + + private void setEmptyViewTipArrowVisible(int visibility) { + if (hasActivity() && getActivity() instanceof NativeReaderActivity) { + View view = getActivity().findViewById(R.id.empty_arrow_tip); + int[] location = ((NativeReaderActivity) getActivity()).getTagMenuItemLocation(); + if (location == null || location[0] == 0) { + view.setVisibility(View.INVISIBLE); + return; + } + if (visibility == View.VISIBLE) { + Animation animArrow = AnimationUtils.loadAnimation(getActivity(), R.anim.up_and_down); + view.startAnimation(animArrow); + } + LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) view.getLayoutParams(); + if (params != null) { + float iconWidth = getResources().getDimension(R.dimen.arrow_tip_size); + params.setMargins(location[0] - (int) (iconWidth / 2.), 0, 0, 0); + view.setLayoutParams(params); + } + view.setVisibility(visibility); } } @@ -342,21 +373,8 @@ private String[] getEmptyTitleAndDecription() { @Override public void onDataLoaded(boolean isEmpty) { if (isEmpty) { - TextView titleView = (TextView) getActivity().findViewById(R.id.title_empty); - TextView descriptionView = (TextView) getActivity(). - findViewById(R.id.description_empty); - String title, description; - String[] titleAndDesc = getEmptyTitleAndDecription(); - title = titleAndDesc[0]; - description = titleAndDesc[1]; startBoxAndPagesAnimation(); - titleView.setText(title); - if (description == null) { - descriptionView.setVisibility(View.GONE); - } else { - descriptionView.setText(description); - descriptionView.setVisibility(View.VISIBLE); - } + setEmptyTitleAndDecriptionForCurrentTag(); mEmptyView.setVisibility(View.VISIBLE); } else { mEmptyView.setVisibility(View.GONE); From 838c677fae6d43982ac89758ac999a9d33f25146 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Fri, 22 Nov 2013 13:06:06 +0100 Subject: [PATCH 08/12] fix arrow clipping --- res/layout/reader_empty_view.xml | 7 ++++--- res/values/dimens.xml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/res/layout/reader_empty_view.xml b/res/layout/reader_empty_view.xml index 6d7dcfe87ee7..3b57e1fd2f1b 100644 --- a/res/layout/reader_empty_view.xml +++ b/res/layout/reader_empty_view.xml @@ -4,8 +4,7 @@ android:layout_height="match_parent" android:orientation="vertical" android:gravity="center" - android:visibility="gone" - > + android:visibility="gone"> + android:visibility="invisible" + android:adjustViewBounds="false" + android:padding="4dp" /> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 11f511946da7..25d38ab8e609 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -63,7 +63,7 @@ 24sp 18sp - 32dp + 36dp 12dp 4dp From 317df684288baaa907ab299810622b2197f630d8 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Fri, 22 Nov 2013 17:51:08 +0100 Subject: [PATCH 09/12] rewrite "Blogs I Follow" tag detection with a stronger one using endpoints suffix as tag string id --- .../wordpress/android/models/ReaderTag.java | 16 ++++++++++++++ .../reader_native/ReaderPostListFragment.java | 22 +++++++++---------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/org/wordpress/android/models/ReaderTag.java b/src/org/wordpress/android/models/ReaderTag.java index c1a447f98a17..62ea9e4430f9 100644 --- a/src/org/wordpress/android/models/ReaderTag.java +++ b/src/org/wordpress/android/models/ReaderTag.java @@ -50,6 +50,22 @@ public void setEndpoint(String endpoint) { this.endpoint = StringUtils.notNullStr(endpoint); } + /** + * Extract tag Id from endpoint, only works for ReaderTagType.DEFAULT + * + * @return a string Id if tagType is ReaderTagType.DEFAULT, empty string else + */ + public String getTagStringId() { + if (tagType != ReaderTagType.DEFAULT) { + return ""; + } + String[] splitted = endpoint.split("/"); + if (splitted != null && splitted.length > 0) { + return splitted[splitted.length - 1]; + } + return ""; + } + public String getTagName() { return StringUtils.notNullStr(tagName); } diff --git a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java index 74cab33532c4..f7254927e960 100644 --- a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java +++ b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java @@ -312,26 +312,26 @@ private void startBoxAndPagesAnimation() { } private void setEmptyTitleAndDecriptionForCurrentTag() { - int tagIndex = mActionBarAdapter.getIndexOfTagName(mCurrentTag); boolean hasTagEverUpdated = ReaderTagTable.hasEverUpdatedTag(mCurrentTag); int title, description = -1; setEmptyViewTipArrowVisible(View.GONE); - switch (tagIndex) { - case 0: // Blogs I Follow - title = R.string.reader_empty_followed_blogs_title; - description = R.string.reader_empty_followed_blogs_description; - setEmptyViewTipArrowVisible(View.VISIBLE); - break; - case 2: // Posts I Like + int tagIndex = mActionBarAdapter.getIndexOfTagName(mCurrentTag); + ReaderTag tag = (ReaderTag) getActionBarAdapter().getItem(tagIndex); + String tagId = tag.getTagStringId(); + if (tagId.equals("following")) { + title = R.string.reader_empty_followed_blogs_title; + description = R.string.reader_empty_followed_blogs_description; + setEmptyViewTipArrowVisible(View.VISIBLE); + } else { + if (tagId.equals("liked")) { title = R.string.reader_empty_posts_liked; - break; - default: // Freshly Pressed and other Tags + } else { if (hasTagEverUpdated) { title = R.string.reader_empty_posts_in_tag; } else { title = R.string.reader_empty_posts_in_tag_never_updated; } - break; + } } TextView titleView = (TextView) getActivity().findViewById(R.id.title_empty); TextView descriptionView = (TextView) getActivity().findViewById(R.id.description_empty); From c1180d5ae73bba23fe522629d26978e0c9719bed Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Fri, 22 Nov 2013 19:17:20 +0100 Subject: [PATCH 10/12] hdpi and xxhpid assets for the box and pages animation --- res/drawable-hdpi/box_with_pages_bottom.png | Bin 0 -> 91 bytes res/drawable-hdpi/box_with_pages_page1.png | Bin 0 -> 171 bytes res/drawable-hdpi/box_with_pages_page2.png | Bin 0 -> 110 bytes res/drawable-hdpi/box_with_pages_page3.png | Bin 0 -> 126 bytes res/drawable-hdpi/box_with_pages_top.png | Bin 0 -> 687 bytes res/drawable-xxhdpi/box_with_pages_bottom.png | Bin 0 -> 100 bytes res/drawable-xxhdpi/box_with_pages_page1.png | Bin 0 -> 226 bytes res/drawable-xxhdpi/box_with_pages_page2.png | Bin 0 -> 127 bytes res/drawable-xxhdpi/box_with_pages_page3.png | Bin 0 -> 154 bytes res/drawable-xxhdpi/box_with_pages_top.png | Bin 0 -> 1161 bytes 10 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 res/drawable-hdpi/box_with_pages_bottom.png create mode 100644 res/drawable-hdpi/box_with_pages_page1.png create mode 100644 res/drawable-hdpi/box_with_pages_page2.png create mode 100644 res/drawable-hdpi/box_with_pages_page3.png create mode 100644 res/drawable-hdpi/box_with_pages_top.png create mode 100644 res/drawable-xxhdpi/box_with_pages_bottom.png create mode 100644 res/drawable-xxhdpi/box_with_pages_page1.png create mode 100644 res/drawable-xxhdpi/box_with_pages_page2.png create mode 100644 res/drawable-xxhdpi/box_with_pages_page3.png create mode 100644 res/drawable-xxhdpi/box_with_pages_top.png diff --git a/res/drawable-hdpi/box_with_pages_bottom.png b/res/drawable-hdpi/box_with_pages_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..6c00746b5ccedf75feb4b2bd008dd99eb2487d8d GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^jX)g8$P6UU2ZY-IDdqs55ZC6G);5z(kAYlaPZ!6K m3dUp!r38_lra%KOH%125O$>}1gxWoT(hQ!ielF{r5}E)>rxa5F literal 0 HcmV?d00001 diff --git a/res/drawable-hdpi/box_with_pages_page1.png b/res/drawable-hdpi/box_with_pages_page1.png new file mode 100644 index 0000000000000000000000000000000000000000..c237a01e9d64570a00ec048754e571599f182eef GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^AwZnZ!VDxEe*BsPr1%4TLR_bU!IdjlHg4PqB;CSe ze1KA{B|(0{4GjPPGsGFz?*R(9dAc};R4~51v{95nK!D|9wj+0m1NZHEUnBmLoQ1{@ z_sOrTTzc`i$^26O)@f$p*EL!0a(Vo0nD4kSKtqJ9)k$@))53rZc1;%VTAiLUHx3v IIVCg!0DA%gsBU6i{PkW@d45F_5dKrk0qPSXWmEWEU0|0!;=o z8XFrSh6CAfcLGK50H8`-vdt|ZPhGqJ=^;>2NJ)@iFvG8XbNc4)`TDs|Q%0lZqJjD4 zQ_5QB-soApEvR}brTlXG!f0tBPG&|{UWp7xF&3TxD|RUlKat2H{_5@AOnd*Ts;%Fc znjIeT`(HOt?~5KwK7NZ9ofirXz|iLKba4!+hG zdr&V+W7^;RR#uOqb$)sk&!P`jnDeDN z#QND3JX9VAYpvBg@#MknYuh#@q>DRM|K8Qa+#$P)t1nC7^fOb|;}Z^dE_)!tz;)F4 zw&DL`ujk?n1uHdoFcs7$@A<96AnJQiH=v{^K9sxE*OA#*ImFdF_`^E|+?6@+Tu(?*{R=xjcJ+G2gp)_5Z;ai{J2S)b}=3WWK8~ie;Hm o`+tY`j}XlT4NP1bScwF_@DJPjrWEg-2n=%uPgg&ebxsLQ0R99EYybcN literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/box_with_pages_bottom.png b/res/drawable-xxhdpi/box_with_pages_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..c46ce05ea14a6d032d837cd061b623a4f1daef65 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yU}OTa7cnve$qBClJ%JQ+fKP~Pb4zQR$)?9Zu8gOP uV@L(#+k=LTK;9vR-^6X{Q}e9>n=?WvW|a@ zy`SCmb$e%YGm5pr-cD8%JyvUU!DYHo_taMP(y^Pv^GFviz$!+lEqGy i*uALyu8*wZ0=KB9QA6RHe-D8UVeoYIb6Mw<&;$Tn^-(qe literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/box_with_pages_page2.png b/res/drawable-xxhdpi/box_with_pages_page2.png new file mode 100644 index 0000000000000000000000000000000000000000..d09de9d1e9e6d718ab5f8144008b30878c7f4ac3 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^^MUvhBQuc96K)U$QfvV}A+A@hT-msBW6k;*sX!4E zPZ!6K3dXlr3%Uf=?FiI8+Pqj}*41h2j{uEK aV7&JH)cVgxzjp)mGkCiCxvXVTQ+XoxOnm6 z2+^6lfa0E>E{-7;jBl?h@-irhFkJNK@S4z+VXvBMAYmrMb@-c~eZ6Yg*5g}$dQDQf o`RT;O|DKanJSTlA2aza9JYiZ!6Vt+2U!b83p00i_>zopr04J<9)Bpeg literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/box_with_pages_top.png b/res/drawable-xxhdpi/box_with_pages_top.png new file mode 100644 index 0000000000000000000000000000000000000000..b5ff7db2121d67e4693e88bc7303182718582fe1 GIT binary patch literal 1161 zcmeAS@N?(olHy`uVBq!ia0y~yU}OTa7jZBH$+^FbEr0@f0X`wF%`L5cV9?Xk)7siv zQc@BS5TLKG4^$Qy7zpG71%dKF(#_4y!^5Mktqr2SqoYGtSJ&9sxVN`A6AXYR*xK3x zNg&YB&;W{SX=$08n*-Gc1qFqLg#j70wYBy2^*{wcc1lVLSZz;5MMZUWHBdxcTwG30 z4#ioCqMkVPQu!oorz1E?NoERfLv291r4Kra2k%%@tF zKu1)S1o;L3|Nm=$ZLpELjB!Z)t43Y@rq{oF)YR{~xgOFwx>x10s`@(<(~oJH`~ErZ z+7lV~R$lS_s&&QEBE0M@ObnvszEXV5`~e06j1p{O;{IG^Z&-sFB6cwB)HB(=KQc~E z{=+3M{(VA%hwc~}-EQOI{rR#&OuVYtS(@9WY;VIaW+?^+rT|YD$B+ufHy3USIv9vB zI0&h{Tl_z1YlHshwCydqb{WZm3mgvq=N8cjSm4me#L9((;dm<6e#$Q&$>o;IBUn%G zy1M<_+ zm+ve8+4*wLx+G4!Y2DnGo&oC)T=%jR=Uk-qCp5fxLc-cMfvp{OjzQwKJG9-Xjn4mf|^CHll$u)(}R{`P;c!oo)^6$AY zEB$e$Cd_lfr+>;KadD-4L^Fi<)W7)g#P`CFAk7bF|CIe$Jn6yqSnHiZ0vro8s$TG% z@fGvqeZ=#q$NAf`1yg3PDz4`!|9xL0ttsaZbED@I`$HxX3E$++9mA$HGJRJ1pu9vJE*559PT73B97t;ejjXYLcWPg6Wb~nF$ w^kv(5>-YPVcK|a#3x|M$Lj&y?3X}FS9zPQEtc=w$2bA$VUHx3vIVCg!08MGbRsaA1 literal 0 HcmV?d00001 From 9fa3416200f70573eeaebef1e34939002623a647 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Mon, 25 Nov 2013 09:32:44 +0100 Subject: [PATCH 11/12] rename getTagStringId method --- src/org/wordpress/android/models/ReaderTag.java | 2 +- .../android/ui/reader_native/ReaderPostListFragment.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/wordpress/android/models/ReaderTag.java b/src/org/wordpress/android/models/ReaderTag.java index 62ea9e4430f9..32da4b25b8fd 100644 --- a/src/org/wordpress/android/models/ReaderTag.java +++ b/src/org/wordpress/android/models/ReaderTag.java @@ -55,7 +55,7 @@ public void setEndpoint(String endpoint) { * * @return a string Id if tagType is ReaderTagType.DEFAULT, empty string else */ - public String getTagStringId() { + public String getStringIdFromEndpoint() { if (tagType != ReaderTagType.DEFAULT) { return ""; } diff --git a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java index f7254927e960..b640480a5672 100644 --- a/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java +++ b/src/org/wordpress/android/ui/reader_native/ReaderPostListFragment.java @@ -317,7 +317,7 @@ private void setEmptyTitleAndDecriptionForCurrentTag() { setEmptyViewTipArrowVisible(View.GONE); int tagIndex = mActionBarAdapter.getIndexOfTagName(mCurrentTag); ReaderTag tag = (ReaderTag) getActionBarAdapter().getItem(tagIndex); - String tagId = tag.getTagStringId(); + String tagId = tag.getStringIdFromEndpoint(); if (tagId.equals("following")) { title = R.string.reader_empty_followed_blogs_title; description = R.string.reader_empty_followed_blogs_description; From 795d80bbd1f06940b84a28416d6cb67c732365b5 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Mon, 25 Nov 2013 09:37:02 +0100 Subject: [PATCH 12/12] remove tooltip arrow in empty _Blogs I Follow_ empty view --- res/anim/up_and_down.xml | 8 ----- res/drawable-mdpi/tip_up_arrow.png | Bin 1323 -> 0 bytes res/layout/reader_empty_view.xml | 16 ---------- .../reader_native/NativeReaderActivity.java | 28 ------------------ .../reader_native/ReaderPostListFragment.java | 25 ---------------- 5 files changed, 77 deletions(-) delete mode 100644 res/anim/up_and_down.xml delete mode 100644 res/drawable-mdpi/tip_up_arrow.png diff --git a/res/anim/up_and_down.xml b/res/anim/up_and_down.xml deleted file mode 100644 index fbaa372412af..000000000000 --- a/res/anim/up_and_down.xml +++ /dev/null @@ -1,8 +0,0 @@ - - diff --git a/res/drawable-mdpi/tip_up_arrow.png b/res/drawable-mdpi/tip_up_arrow.png deleted file mode 100644 index 4196a2b9c29e812e69a21b841510c3a7f965d1ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1323 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%qp275hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|81#=KlDb#X~hD#E>34K5C;EJ)Q4 zN-fSWElLJPT$(b-ssbzLqSVBa{GyQj{2W*)24v)y-fM)1rW~Nw~8o8P|o13|rI9UM0-PPF9($UDp(a^%c)zsA0 z(ajvD*Cju>G&eP`1g19yuGicEr(RHE$SnZc?2=lPS(cjOR+OKs0QR(1CT_R5;4}}a zHwC9#%v^Em)dxC89~8AnQ4JFUrXLU!o^XL2c+yYJ1E%*PV8X7i)6!vJV4Ume;uunK z>rMFWu0sX_zL&%V=l_}TZ%RkT)%6=iy!Asgek3fkzsfEz;<&LZXp{9smcm@$nDW-U zd>z7*PR^OLbIHLeL0|k7Uz}Yu-8aWr+Yj8&M-L?y1;ra zU!IAS&-u?WQ!*qwyx1<8EPeeos;BYWs;_gF#;sRB#HcFe8mQS3#NavUg3jrPAVH@K z6*kjemDTVaN|a!`T)tcO^$ahbf?JMlhZmNt-WzxM{dZT31<6|N3_|Bje3v}>6K7Ge zQ!CbO`^jaG{@h}F6gSn{<*CW}6Uxzl)#rr0{W|IO5C2-hs|;BTrVUaDZZkgEbbRG2 mVefDMc5FTT|6l1J#RCjgF{esC?&#nF6 - - - - - -