summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2016-04-14 20:32:14 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2016-04-14 20:32:14 +0200
commit080e4a61889b0824406e88aae686a3bdd1300105 (patch)
tree7307a76db9df851f6d8d7c7854e1468d744d1817
parent8ae09aee876092f6407dab4f89075787e8dedbc5 (diff)
show logo in ComputersActivity actionbar
for some reason appcompat doesn't add padding, so take the detour using a drawable definition that adds some padding Change-Id: Ibe2a5d3a49b83dde8fbb68d33f9ddd1cf443e2e3
-rw-r--r--android/sdremote/mobile/src/main/java/org/libreoffice/impressremote/activity/ComputersActivity.java3
-rw-r--r--android/sdremote/mobile/src/main/res/drawable/ic_logo_padding.xml6
-rw-r--r--android/sdremote/mobile/src/main/res/values/themes.xml1
3 files changed, 9 insertions, 1 deletions
diff --git a/android/sdremote/mobile/src/main/java/org/libreoffice/impressremote/activity/ComputersActivity.java b/android/sdremote/mobile/src/main/java/org/libreoffice/impressremote/activity/ComputersActivity.java
index e6199ed..b0f90c3 100644
--- a/android/sdremote/mobile/src/main/java/org/libreoffice/impressremote/activity/ComputersActivity.java
+++ b/android/sdremote/mobile/src/main/java/org/libreoffice/impressremote/activity/ComputersActivity.java
@@ -52,7 +52,8 @@ public class ComputersActivity extends AppCompatActivity {
// to intents filter but it shows wrong label for recent apps screen then.
assert aActionBar != null;
aActionBar.setTitle(R.string.title_computers);
- aActionBar.setDisplayHomeAsUpEnabled(false);
+ aActionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME,
+ ActionBar.DISPLAY_SHOW_HOME|ActionBar.DISPLAY_HOME_AS_UP);
computersPagerAdapter.addFragment(Type.BLUETOOTH);
computersPagerAdapter.addFragment(Type.WIFI);
diff --git a/android/sdremote/mobile/src/main/res/drawable/ic_logo_padding.xml b/android/sdremote/mobile/src/main/res/drawable/ic_logo_padding.xml
new file mode 100644
index 0000000..119d17d
--- /dev/null
+++ b/android/sdremote/mobile/src/main/res/drawable/ic_logo_padding.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:drawable="@drawable/ic_logo"
+ android:right="12dp"/>
+</layer-list>
diff --git a/android/sdremote/mobile/src/main/res/values/themes.xml b/android/sdremote/mobile/src/main/res/values/themes.xml
index 83a43ee..6840a91 100644
--- a/android/sdremote/mobile/src/main/res/values/themes.xml
+++ b/android/sdremote/mobile/src/main/res/values/themes.xml
@@ -28,6 +28,7 @@
<style name="Theme.ImpressRemote.ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="displayOptions">showTitle|homeAsUp|useLogo</item>
+ <item name="logo">@drawable/ic_logo_padding</item>
</style>
<style name="Theme.ImpressRemote.ActionBar.Tab" parent="Widget.Design.TabLayout">