diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2012-07-28 13:48:57 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-08-06 10:23:05 +0100 |
commit | 863ae327df416bcad34fc5bb30ae9bb5327c36d5 (patch) | |
tree | a08ed88f3c133cef9dda287608cb1ed69b84f3a2 /android | |
parent | 610fc391cbf3a20f316f960526b2da29b6f9109c (diff) |
Styled the options activity.
Change-Id: Ideef94c978ae3bad536c9eb4ce740f985441cea1
Diffstat (limited to 'android')
-rw-r--r-- | android/sdremote/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | android/sdremote/res/drawable/icon_options.png | bin | 0 -> 454 bytes | |||
-rw-r--r-- | android/sdremote/res/drawable/up_indicator_white.png | bin | 0 -> 244 bytes | |||
-rw-r--r-- | android/sdremote/res/values/styles.xml | 10 | ||||
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java | 5 | ||||
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java | 13 |
6 files changed, 23 insertions, 8 deletions
diff --git a/android/sdremote/AndroidManifest.xml b/android/sdremote/AndroidManifest.xml index 0f8b0fbe1813..14f457ba52b2 100644 --- a/android/sdremote/AndroidManifest.xml +++ b/android/sdremote/AndroidManifest.xml @@ -11,9 +11,7 @@ android:targetSdkVersion="14" /> <application - android:icon="@drawable/ic_launcher" android:label="@string/app_name" - android:logo="@drawable/empty" android:theme="@style/Theme.ImpressRemote" > <activity android:name="TestClient" @@ -34,6 +32,7 @@ </activity> <activity android:name=".SettingsActivity" + android:icon="@drawable/icon_options" android:label="@string/options" > </activity> </application> diff --git a/android/sdremote/res/drawable/icon_options.png b/android/sdremote/res/drawable/icon_options.png Binary files differnew file mode 100644 index 000000000000..ab79d1307c48 --- /dev/null +++ b/android/sdremote/res/drawable/icon_options.png diff --git a/android/sdremote/res/drawable/up_indicator_white.png b/android/sdremote/res/drawable/up_indicator_white.png Binary files differnew file mode 100644 index 000000000000..9a72a2363648 --- /dev/null +++ b/android/sdremote/res/drawable/up_indicator_white.png diff --git a/android/sdremote/res/values/styles.xml b/android/sdremote/res/values/styles.xml index 04143c4958ef..8fa0c2d42041 100644 --- a/android/sdremote/res/values/styles.xml +++ b/android/sdremote/res/values/styles.xml @@ -11,8 +11,14 @@ <color name="thumbnail_border">#B4B4B4</color> <color name="thumbnail_border_selected">#EE4400</color> + <style name="Theme.ImpressRemote.ActionBar.Title" parent="android:style/Widget.Holo.Light.ActionBar"> + <item name="android:textColor">@color/white</item> + <item name="android:textSize">18dp</item> + </style> + <style name="Theme.ImpressRemote.ActionBar" parent="android:style/Widget.Holo.Light.ActionBar"> <item name="android:background">@color/orange</item> + <item name="android:titleTextStyle">@style/Theme.ImpressRemote.ActionBar.Title</item> </style> <style name="Theme.ImpressRemote.ActionBarWidget" parent="android:style/Widget.Holo.Light"> @@ -35,11 +41,11 @@ <style name="Theme.ImpressRemote" parent="android:style/Theme.Holo.Light"> <item name="android:actionBarStyle">@style/Theme.ImpressRemote.ActionBar</item> <item name="android:popupMenuStyle">@style/Theme.ImpressRemote.ActionBarMenu</item> - <item name="android:dropDownListViewStyle">@style/Theme.ImpressRemote.ActionBarMenuItem</item> - <item name="android:textAppearanceLargePopupMenu">@style/Theme.ImpressRemote.ActionBarMenuItem</item> <!-- <item name="android:actionBarWidgetTheme">@style/Theme.ImpressRemote.ActionBarWidget</item> --> + <item name="android:textAppearanceLargePopupMenu">@style/Theme.ImpressRemote.ActionBarMenuItem</item> <!-- <item name="android:actionBarWidgetTheme">@style/Theme.ImpressRemote.ActionBarWidget</item> --> <item name="android:actionDropDownStyle">@style/Theme.ImpressRemote.ActionBarMenu</item> <item name="android:windowBackground">@color/light_grey</item> + <item name="android:homeAsUpIndicator">@drawable/up_indicator_white</item> </style> </resources>
\ No newline at end of file diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java index 893452031da5..8cbfcfdfa4d6 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java +++ b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java @@ -167,10 +167,7 @@ public class PresentationActivity extends Activity { public ActionBarManager() { ActionBar aBar = getActionBar(); - aBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, - ActionBar.DISPLAY_SHOW_CUSTOM - | ActionBar.DISPLAY_SHOW_TITLE - | ActionBar.DISPLAY_USE_LOGO); + aBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); aBar.setCustomView(R.layout.presentation_actionbar); mThumbnailButton = (ToggleButton) aBar.getCustomView() diff --git a/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java b/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java index 6bdc9fcd344b..d0119a0d874f 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java +++ b/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java @@ -2,6 +2,7 @@ package org.libreoffice.impressremote; import android.app.Activity; import android.os.Bundle; +import android.view.MenuItem; public class SettingsActivity extends Activity { @@ -10,5 +11,17 @@ public class SettingsActivity extends Activity { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); + getActionBar().setDisplayHomeAsUpEnabled(true); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + finish(); + return true; + default: + return super.onOptionsItemSelected(item); + } } } |