diff options
author | Artur Dryomov <artur.dryomov@gmail.com> | 2013-07-30 15:55:38 +0300 |
---|---|---|
committer | Artur Dryomov <artur.dryomov@gmail.com> | 2013-07-30 23:51:49 +0300 |
commit | c01a2c8284b17c1a28501f25caeedeace62494c9 (patch) | |
tree | d8301889fa306f1b67e92c87f60664261f33c5a1 /android | |
parent | 2ba929e40cc4e128de51468c9e9315c3c851544a (diff) |
Fix application and first activity titles bug.
Change-Id: I066af1301c8e5525b5ade310c770273f72007b10
Diffstat (limited to 'android')
-rw-r--r-- | android/sdremote/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | android/sdremote/res/values/themes.xml | 4 | ||||
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java | 12 |
3 files changed, 15 insertions, 4 deletions
diff --git a/android/sdremote/AndroidManifest.xml b/android/sdremote/AndroidManifest.xml index 73f3c2319232..938e0e6418b9 100644 --- a/android/sdremote/AndroidManifest.xml +++ b/android/sdremote/AndroidManifest.xml @@ -21,10 +21,9 @@ <activity android:name=".activity.ComputersActivity" - android:label="@string/title_computers" android:theme="@style/Theme.ImpressRemote.Computers"> - <intent-filter android:label="@string/application_name"> + <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> diff --git a/android/sdremote/res/values/themes.xml b/android/sdremote/res/values/themes.xml index 20a4b2226722..bdf73a3ab341 100644 --- a/android/sdremote/res/values/themes.xml +++ b/android/sdremote/res/values/themes.xml @@ -31,8 +31,8 @@ <item name="android:navigationMode">tabMode</item> <item name="navigationMode">tabMode</item> - <item name="android:displayOptions">showTitle|showHome|useLogo</item> - <item name="displayOptions">showTitle|showHome|useLogo</item> + <item name="android:displayOptions">showHome|useLogo</item> + <item name="displayOptions">showHome|useLogo</item> </style> <style name="Theme.ImpressRemote.ComputerCreation" parent="Theme.ImpressRemote"> diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java index 2dd3b0b994b3..8054b893cac0 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java +++ b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java @@ -31,9 +31,21 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + setUpTitle(); setUpContent(); } + private void setUpTitle() { + // Looks hacky but it seems to be the best way to set activity title + // different to application’s label. The other way is setting title + // to intents filter but it shows wrong label for recent apps screen. + + ActionBar aActionBar = getSupportActionBar(); + + aActionBar.setTitle(R.string.title_computers); + aActionBar.setDisplayShowTitleEnabled(true); + } + private void setUpContent() { if (BluetoothOperator.isAvailable()) { setUpComputersLists(); |