From a6374b399bc7171c2f9030de6d66267793f559fe Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 25 Nov 2014 22:05:08 +0000 Subject: [PATCH] Change icons and Add refresh --- .../main/java/org/openlp/android2/OpenLP.java | 9 ++++++--- .../android2/fragments/LiveListFragment.java | 4 ++-- app/src/main/res/drawable-xxhdpi/ic_dvr.png | Bin 305 -> 522 bytes .../main/res/layout/fragment_livelist_list.xml | 14 +++++++------- .../res/layout/fragment_navigation_drawer.xml | 4 ++-- .../main/res/layout/fragment_service_list.xml | 1 + 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/org/openlp/android2/OpenLP.java b/app/src/main/java/org/openlp/android2/OpenLP.java index 71b05a3..023db12 100644 --- a/app/src/main/java/org/openlp/android2/OpenLP.java +++ b/app/src/main/java/org/openlp/android2/OpenLP.java @@ -130,7 +130,6 @@ public class OpenLP extends Activity // as you specify a parent activity in AndroidManifest.xml. Intent intent; switch (item.getItemId()) { - case R.id.action_preferences: intent = new Intent(this, SettingsActivity.class); startActivity(intent); @@ -140,9 +139,13 @@ public class OpenLP extends Activity startActivity(intent); return true; case R.id.action_refresh: - if (mTitle.equals(R.string.service_list)){ + if (this.mTitle.equals(getString(R.string.service_list))) { ServiceListFragment fragment = (ServiceListFragment) - getFragmentManager().findFragmentByTag("ServiceListFragment"); + getFragmentManager().findFragmentById(R.id.container); + fragment.refreshDisplay(); + } else if (this.mTitle.equals(getString(R.string.live_list)) ) { + LiveListFragment fragment = (LiveListFragment) + getFragmentManager().findFragmentById(R.id.container); fragment.refreshDisplay(); } return true; diff --git a/app/src/main/java/org/openlp/android2/fragments/LiveListFragment.java b/app/src/main/java/org/openlp/android2/fragments/LiveListFragment.java index ad52826..e64e690 100644 --- a/app/src/main/java/org/openlp/android2/fragments/LiveListFragment.java +++ b/app/src/main/java/org/openlp/android2/fragments/LiveListFragment.java @@ -90,10 +90,10 @@ public class LiveListFragment extends OpenLPFragment { HashMap hm = new HashMap(); hm.put("tag", item.getString("tag")); if (item.getString("selected").equals("true")) { - hm.put("liveListNormal", Html.fromHtml(item.getString("html")).toString()); + hm.put("liveListSelected", Html.fromHtml(item.getString("html")).toString()); selected = i; } else { - hm.put("liveListSelected", Html.fromHtml(item.getString("html")).toString()); + hm.put("liveListNormal", Html.fromHtml(item.getString("html")).toString()); } aList.add(hm); } diff --git a/app/src/main/res/drawable-xxhdpi/ic_dvr.png b/app/src/main/res/drawable-xxhdpi/ic_dvr.png index b0ee7343b40b4edd6196e3ff9af90e8111c1696e..b2d0a0f7dd69d0d077e73399dc5d2abc64e378f8 100644 GIT binary patch delta 453 zcmdnU)WxFM8Q|y6%O%Cdz`(%k>ERLtq!U1xg9S)>Ox(YDqGDh@W0R+gV@SoVx3dlX z4m$|A{%`A;pp@<~hhb@-K#-P{AEQ#Pl$0LhB<@KaZIk+%m^73MS-dk|)iUcSV~r0?mhj5RMDi9M+#oVcu=D_eId|)3;5z&&C9I z_BGiRte*JG>#tya#w*1SZ@t}Y?`EIopOB&7wdMZxo%{=A|Ga$u>S^2xQL)DpFLrWY z=v`G+7TfT41w+}syjSn!^fyS{r8O}?&G8ZiDT+j9OtH{xB@}u6{1-oD!M<0bR0n delta 234 zcmV9_1TUC7xpTOd2%=p$Yel4WV;vI28nSA^yhV!q2oSU-82Aqm zKnx{JNF^av9StCW0 + android:textStyle="normal"/> + android:textStyle="bold|italic"/> diff --git a/app/src/main/res/layout/fragment_navigation_drawer.xml b/app/src/main/res/layout/fragment_navigation_drawer.xml index 25e67cf..c1b86f3 100644 --- a/app/src/main/res/layout/fragment_navigation_drawer.xml +++ b/app/src/main/res/layout/fragment_navigation_drawer.xml @@ -5,9 +5,9 @@ android:choiceMode="singleChoice" android:divider="@android:color/darker_gray" android:dividerHeight="2dp" - android:background="#c8ffffff" android:textStyle="bold" - android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="#000000" + android:textAppearance="?android:attr/textAppearanceSmallInverse" tools:context=".NavigationDrawerFragment" android:drawSelectorOnTop="false" android:paddingLeft="20dp" diff --git a/app/src/main/res/layout/fragment_service_list.xml b/app/src/main/res/layout/fragment_service_list.xml index f098ba6..3a4eaf4 100644 --- a/app/src/main/res/layout/fragment_service_list.xml +++ b/app/src/main/res/layout/fragment_service_list.xml @@ -2,6 +2,7 @@