From 407564f28c58376427c4821372a601713c2af472 Mon Sep 17 00:00:00 2001 From: jendib Date: Sun, 23 Nov 2014 22:10:24 +0100 Subject: [PATCH] Android: show all documents from drawer --- .../com/sismics/docs/MainApplication.java | 4 +- .../sismics/docs/activity/MainActivity.java | 13 +++++ .../drawable-xhdpi/ic_work_grey600_24dp.png | Bin 0 -> 306 bytes .../drawable-xxhdpi/ic_work_grey600_24dp.png | Bin 0 -> 381 bytes .../app/src/main/res/layout/main_activity.xml | 55 +++++++++++++++++- .../app/src/main/res/values/strings.xml | 12 ++-- 6 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 docs-android/app/src/main/res/drawable-xhdpi/ic_work_grey600_24dp.png create mode 100644 docs-android/app/src/main/res/drawable-xxhdpi/ic_work_grey600_24dp.png diff --git a/docs-android/app/src/main/java/com/sismics/docs/MainApplication.java b/docs-android/app/src/main/java/com/sismics/docs/MainApplication.java index c381cec1..727b8b4e 100644 --- a/docs-android/app/src/main/java/com/sismics/docs/MainApplication.java +++ b/docs-android/app/src/main/java/com/sismics/docs/MainApplication.java @@ -20,10 +20,8 @@ public class MainApplication extends Application { JSONObject json = PreferenceUtil.getCachedJson(getApplicationContext(), PreferenceUtil.PREF_CACHED_USER_INFO_JSON); ApplicationContext.getInstance().setUserInfo(getApplicationContext(), json); - // TODO Tags in drawer & search on select // TODO Sharing - // TODO Error feedback - // TODO Printing + // TODO Error feedback (all REST request, even login) // TODO Fullscreen preview // TODO Caching preferences diff --git a/docs-android/app/src/main/java/com/sismics/docs/activity/MainActivity.java b/docs-android/app/src/main/java/com/sismics/docs/activity/MainActivity.java index d16bf54e..f87762bc 100644 --- a/docs-android/app/src/main/java/com/sismics/docs/activity/MainActivity.java +++ b/docs-android/app/src/main/java/com/sismics/docs/activity/MainActivity.java @@ -100,6 +100,19 @@ public class MainActivity extends ActionBarActivity { } }); + // Click on All documents + View allDocumentsLayout = findViewById(R.id.allDocumentsLayout); + allDocumentsLayout.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + SearchView searchView = (SearchView) searchItem.getActionView(); + searchView.setQuery(null, true); + searchView.setIconified(true); + drawerLayout.closeDrawers(); + + } + }); + handleIntent(getIntent()); } diff --git a/docs-android/app/src/main/res/drawable-xhdpi/ic_work_grey600_24dp.png b/docs-android/app/src/main/res/drawable-xhdpi/ic_work_grey600_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..00cc784563853d27bde6857fca159963bbac5ed9 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}a}tg=CK)Uj~LMH3o);76yi2K%s^g z3=E|}g|8AA7_4S6Fo+k-*%fF5lweBoc6VX;-`;;_Kaj^+;1OBOz`!jG!i)^F=12eq zS9!WPhD02Gd)<+%*+78x!W_5e@4vSTt$DQbirKDg>sZeV5u#~#PCS3V=?A|Mn;PG{ zTNX@W4vk{MDN_Y`_pk;$m^tOVWM60Ug1^!F0#~XMZm~AW%~*YIp6~?*OSy`-b}whH zd8T|V{l(R%(w_wzFRiIFlox#A(>Q@CKiDDYf%AiZ2c|PHnkukx2<%`qh}*l(WSPTM wCb{Ow+V-66pI=u9^5`w^`ue9sc*6<)HB*HT^u@9_16|GF>FVdQ&MBb@05kS%Bme*a literal 0 HcmV?d00001 diff --git a/docs-android/app/src/main/res/drawable-xxhdpi/ic_work_grey600_24dp.png b/docs-android/app/src/main/res/drawable-xxhdpi/ic_work_grey600_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..1ec33464621d1b10da65a54e19f16b753d012625 GIT binary patch literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhaw6p}rHd>I(3)EF2VS{N990fib~ zFff!FFfhDIU|_JC!N4G1FlSew4N!t9$=lt9;eUJonf*W>XMsm#F#`j)FbFd;%$g$s z6#VMx;uw-~@9ix|z9s_!)(h{}+;QBa)c7aZDIxJfx5TB^DDgZ7NfuvgwLgDyC-3vQ zJ(3KYvzO z>wMqp0iaK*5Wb3vnfV9mzA)L*a^JLp$qsPDi OVDNPHb6Mw<&;$SoL5pVq literal 0 HcmV?d00001 diff --git a/docs-android/app/src/main/res/layout/main_activity.xml b/docs-android/app/src/main/res/layout/main_activity.xml index d8fc692b..58832008 100644 --- a/docs-android/app/src/main/res/layout/main_activity.xml +++ b/docs-android/app/src/main/res/layout/main_activity.xml @@ -17,11 +17,12 @@ android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" - android:gravity="center" android:orientation="vertical" android:background="#fff" android:elevation="5dp"> + + + + + + + + + + + + + + + + + + + + Please check the server URL and try again A crash occurred, a report has been sent to resolve this problem Created date + Download current file + Downloading file number %1s + Download all files + Downloading document + Search documents + All documents + All tags Invalid email @@ -26,10 +33,5 @@ Too long (max. %d) Required Only letters and numbers - Download current file - Downloading file number %1s - Download all files - Downloading document - Search documents