From 566c56378602c11570be96f7f6e0143bb651d48e Mon Sep 17 00:00:00 2001 From: jendib Date: Sun, 10 May 2015 14:44:45 +0200 Subject: [PATCH] Android: metadata in right drawer --- .../com/sismics/docs/MainApplication.java | 2 +- .../docs/activity/DocumentViewActivity.java | 11 ++ .../res/drawable-xhdpi/ic_info_white_24dp.png | Bin 0 -> 530 bytes .../drawable-xxhdpi/ic_info_white_24dp.png | Bin 0 -> 736 bytes .../res/layout/document_view_activity.xml | 173 ++++++++++-------- .../main/res/menu/document_view_activity.xml | 7 + .../app/src/main/res/values/strings.xml | 1 + 7 files changed, 117 insertions(+), 77 deletions(-) create mode 100644 docs-android/app/src/main/res/drawable-xhdpi/ic_info_white_24dp.png create mode 100644 docs-android/app/src/main/res/drawable-xxhdpi/ic_info_white_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 232f224b..340abdbf 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,7 +20,7 @@ public class MainApplication extends Application { JSONObject json = PreferenceUtil.getCachedJson(getApplicationContext(), PreferenceUtil.PREF_CACHED_USER_INFO_JSON); ApplicationContext.getInstance().setUserInfo(getApplicationContext(), json); - // TODO Fullscreen preview + // TODO google docs app: right drawer with all actions, with acls, with deep metadatas // TODO Provide documents to intent action get content super.onCreate(); diff --git a/docs-android/app/src/main/java/com/sismics/docs/activity/DocumentViewActivity.java b/docs-android/app/src/main/java/com/sismics/docs/activity/DocumentViewActivity.java index f927e9ae..82c17698 100644 --- a/docs-android/app/src/main/java/com/sismics/docs/activity/DocumentViewActivity.java +++ b/docs-android/app/src/main/java/com/sismics/docs/activity/DocumentViewActivity.java @@ -12,7 +12,9 @@ import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.support.v4.app.DialogFragment; +import android.support.v4.view.GravityCompat; import android.support.v4.view.ViewPager; +import android.support.v4.widget.DrawerLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.text.TextUtils; @@ -202,6 +204,15 @@ public class DocumentViewActivity extends AppCompatActivity { @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { + case R.id.info: + DrawerLayout drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); + if (drawerLayout.isDrawerVisible(GravityCompat.END)) { + drawerLayout.closeDrawer(GravityCompat.END); + } else { + drawerLayout.openDrawer(GravityCompat.END); + } + return true; + case R.id.download_file: downloadCurrentFile(); return true; diff --git a/docs-android/app/src/main/res/drawable-xhdpi/ic_info_white_24dp.png b/docs-android/app/src/main/res/drawable-xhdpi/ic_info_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..bee33abb780f054d0a6a66240da9a1f96c9c3c39 GIT binary patch literal 530 zcmV+t0`2{YP)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00002VoOIv0RM-N%)bBt010qN zS#tmY3ljhU3ljkVnw%H_00D|gL_t(o!|m8lPQpMKhvAB4Av*(Mp~5X7a1at%a1Q<) z0F*6+G(k^5!p4wzj;0ro;6|u!X*aJ6V$@9AnNEl3f?v0E9%yI2`34K?xR-STOaM8W z3|Qjf6B6R%v7}FfTy~(!m{;Pm;f{(vP-aeuECCKB9iYQIs_|*31M)nQHV(EbP~aJz ztSG1edClPuge?ai$Pz~ebjX_9B%sVkW?)A#9+*pR{`y>UW^q7Ox~$ZIfa_>rEdBXv z0F0u5TtdxB3#>U4fhHzX7lDCMpeF)LqrgH0Jfnas0=~j+sxKL~A`lt{fDusl2nZS!oad#JO7YyV4x~LbZLjH6GMd{PxKQkT$y%GpD6< zgeo#4kPg0Q@_S;YI|SY^Vx3TPhCf%W{xP;rj|DDU0s^+UEa+1EE@`K~68k literal 0 HcmV?d00001 diff --git a/docs-android/app/src/main/res/drawable-xxhdpi/ic_info_white_24dp.png b/docs-android/app/src/main/res/drawable-xxhdpi/ic_info_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..185d18d1a98cde6a127feb1839064d4d92a9e1da GIT binary patch literal 736 zcmV<60w4W}P)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00002VoOIv0RM-N%)bBt010qN zS#tmY3ljhU3ljkVnw%H_00LM^L_t(&-tF4YN*hrW$MI|$t7%-BMtqc3qS&g-LbLEG z6m+BHAzG+~cBO_^Xm^S(3JRkJLy*u%2-$~0+&Potw~JB`>z%p(Cx!XVI>U#|+&gE^ znF58;Itn=`2j!r@M~P(`H0jVMBqk=LPlqNAmYDDfs;X5YTXWAxcg&RzBP2CP?jL+E0Hbqm=Bmp*a!ZQ<4g`e0?mx?ZE z(gEiWsjLGUvwX4c=Tv+zi9w%mnGdR<6 - - - - - - - - - - - - - - - - + + android:layout_height="match_parent"> - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs-android/app/src/main/res/menu/document_view_activity.xml b/docs-android/app/src/main/res/menu/document_view_activity.xml index 1a3a4d20..3c943f47 100644 --- a/docs-android/app/src/main/res/menu/document_view_activity.xml +++ b/docs-android/app/src/main/res/menu/document_view_activity.xml @@ -2,6 +2,13 @@ + + + Before date Search tags All languages + Toggle informations