From f1b77bf3715b7a28cf4a9afd5f47b3e20d50ca36 Mon Sep 17 00:00:00 2001 From: Artur Dryomov Date: Mon, 29 Jul 2013 04:09:29 +0300 Subject: [PATCH] Add timer support. Show the timer as a dialog, plus update all following information as it should be. Change-Id: Idae00b009ce098cfd482ec79629fc8f674502c9a --- .../res/drawable-hdpi/ic_action_timer.png | Bin 0 -> 1794 bytes .../res/drawable-mdpi/ic_action_timer.png | Bin 0 -> 1408 bytes .../res/drawable-xhdpi/ic_action_timer.png | Bin 0 -> 2284 bytes .../res/menu/menu_action_bar_slide_show.xml | 27 +++ .../menu/menu_action_bar_slide_show_grid.xml | 10 -- .../menu/menu_action_bar_slide_show_pager.xml | 10 -- android/sdremote/res/values/strings.xml | 10 ++ android/sdremote/res/values/themes.xml | 2 +- .../activity/ComputersActivity.java | 2 +- .../activity/SlideShowActivity.java | 155 +++++++++++++++--- .../communication/CommunicationService.java | 10 +- .../communication/SlideShow.java | 4 +- .../impressremote/communication/Timer.java | 138 ++++++---------- .../fragment/TimerEditingDialog.java | 136 +++++++++++++++ .../fragment/TimerSettingDialog.java | 72 ++++++++ .../impressremote/util/FragmentOperator.java | 24 ++- .../impressremote/util/Intents.java | 29 ++++ 17 files changed, 486 insertions(+), 143 deletions(-) create mode 100755 android/sdremote/res/drawable-hdpi/ic_action_timer.png create mode 100755 android/sdremote/res/drawable-mdpi/ic_action_timer.png create mode 100755 android/sdremote/res/drawable-xhdpi/ic_action_timer.png create mode 100644 android/sdremote/res/menu/menu_action_bar_slide_show.xml delete mode 100644 android/sdremote/res/menu/menu_action_bar_slide_show_grid.xml delete mode 100644 android/sdremote/res/menu/menu_action_bar_slide_show_pager.xml create mode 100644 android/sdremote/src/org/libreoffice/impressremote/fragment/TimerEditingDialog.java create mode 100644 android/sdremote/src/org/libreoffice/impressremote/fragment/TimerSettingDialog.java diff --git a/android/sdremote/res/drawable-hdpi/ic_action_timer.png b/android/sdremote/res/drawable-hdpi/ic_action_timer.png new file mode 100755 index 0000000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ab|)1_ppnS{5hdZ6e;!t?5V z7kn~j?ml#+9llj2V-^^u#u_(2^Gf)=#m(z{(zX?ChFb3B4d7WQ{zYPS!LcTdbwa~- z7mOJ4BLd?8EIivJ{a8Qi#Dc!hTUS}s0I|9LiQ-A`eVc)vLZ{j;XtRU)uOtyiifTd= G^Zo%Fg0y%5 literal 0 HcmV?d00001 diff --git a/android/sdremote/res/drawable-mdpi/ic_action_timer.png b/android/sdremote/res/drawable-mdpi/ic_action_timer.png new file mode 100755 index 0000000000000000000000000000000000000000..a09df2b99c581835a832607283549ae1b8950e27 GIT binary patch literal 1408 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|8hm3bwJ6}oxF$}kgLQj3#|G7CyF^YauyCMG83 zmzLNn0bL65LT&-v*t}wBFaZNhzap_f-%!s00+w{G(#^lGsViq+{Dqv!obwj$-vFf(ACh=#L&{!#L3yw z&D7A`#K{n**Cju>G&eP`1g19yq1OzjUQlAlEdbi=l3J8mmYU*Ll%J~r_Ow+dZnqfY zG!Lpb1-DyFaO%|uIz}H9wMbD769T3m5EGtofgE_!Pt60S_ab1zUfZG*%fP_+$HEEz5+#nm-y|P3$>rG8M$N5DJF~L|XPB6!eMxtzcMvc!*iZJDV4@s39yC8R#w zIglZ5sJMY`TH~>7-wO=>3v4x*1vjv7J17+XzPq^Y19#j(-5o6NjTWs+kxDzL*wHAZ z(V$hqoSeY7&&iuFZ`;~9FJ$s~ z`7F(WbB*+or4pAHxW%(QbDWt!*`w{Ir1=evrHx2@H_`*=yb2vBwdifAjj z&dlmM%k?8yXsy>;QFS(xUHOq5-J%lgm(AFsu3WnFj&=S6>68PjZl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=cfJv>g+mH)l9|{rq^?c(gO+ zq|*tHnGvdlqI0h?udi%B9-7}XQX+0&((uOIO*^or^m>b-wQ^qxckQ^gV{v3XAoRJm zS~AS+Jmr@e&RxR}?I7{qENVkISO2;nH&Psj&kDZ%6KRQl&&iCH?bqLaSANyk8~AJ; eNqO`wdJ@X@Vdb*Xtyw#5{~x^YWgLBIg6@ABS+Irx literal 0 HcmV?d00001 diff --git a/android/sdremote/res/menu/menu_action_bar_slide_show.xml b/android/sdremote/res/menu/menu_action_bar_slide_show.xml new file mode 100644 index 000000000000..eaa2b3d0ea3c --- /dev/null +++ b/android/sdremote/res/menu/menu_action_bar_slide_show.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/android/sdremote/res/menu/menu_action_bar_slide_show_grid.xml b/android/sdremote/res/menu/menu_action_bar_slide_show_grid.xml deleted file mode 100644 index d65c782669e2..000000000000 --- a/android/sdremote/res/menu/menu_action_bar_slide_show_grid.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/sdremote/res/menu/menu_action_bar_slide_show_pager.xml b/android/sdremote/res/menu/menu_action_bar_slide_show_pager.xml deleted file mode 100644 index 023dcd5e3301..000000000000 --- a/android/sdremote/res/menu/menu_action_bar_slide_show_pager.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/sdremote/res/values/strings.xml b/android/sdremote/res/values/strings.xml index 16c1de821d6f..f315add6ce86 100644 --- a/android/sdremote/res/values/strings.xml +++ b/android/sdremote/res/values/strings.xml @@ -10,6 +10,7 @@ Connection Creation Slide Show + Timer Open source licenses Reconnect @@ -17,9 +18,13 @@ Remove Slides grid Slides pager + Timer + Stop slide show Cancel Save + Start + Reset Go to “Slide Show → Impress Remote” in LibreOffice Impress and enter the code. Connection failed @@ -28,6 +33,7 @@ If you have Bluetooth pairing issues check instructions related to your desktop OS. You should type a valid IP address. Name is optional — IP address would be used instead if you wish. + Time is up IP address Name @@ -35,5 +41,9 @@ Notes Slide %1$d from %2$d + + One minute left + %d minutes left + diff --git a/android/sdremote/res/values/themes.xml b/android/sdremote/res/values/themes.xml index da70aa8e5776..20a4b2226722 100644 --- a/android/sdremote/res/values/themes.xml +++ b/android/sdremote/res/values/themes.xml @@ -1,7 +1,7 @@ -