summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/inputmethod
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-07-23 15:03:32 -0700
committerTadashi G. Takaoka <takaoka@google.com>2014-07-27 14:26:57 +0900
commit1671fbbc9d8f58c35056fcb0bc61d58a7dc11f3a (patch)
tree2ec9969d2b1e7d388386f5d88cdaef144b35705d /src/com/android/settings/inputmethod
parent1a77577da755b0921a3b77fc66ff9b99b50b59f6 (diff)
downloadpackages_apps_Settings-1671fbbc9d8f58c35056fcb0bc61d58a7dc11f3a.zip
packages_apps_Settings-1671fbbc9d8f58c35056fcb0bc61d58a7dc11f3a.tar.gz
packages_apps_Settings-1671fbbc9d8f58c35056fcb0bc61d58a7dc11f3a.tar.bz2
Show "up navigate" icon in input method subtype enabler
Since API 16 (and API 14 with support library) and later, we started supporting "up navigation" model. http://developer.android.com/training/implementing-navigation/ancestral.html As a part of Settings app and a part of an IME's settings activity, the input method subtype enabler should have a "up navigate icon on its action bar. Bug: 16595009 Change-Id: Iaaadd970395b9c9254ab60b2e8fee22dffb8c7f6
Diffstat (limited to 'src/com/android/settings/inputmethod')
-rw-r--r--src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java b/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
index b664540..bafae2b 100644
--- a/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
+++ b/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
@@ -15,7 +15,9 @@
*/
package com.android.settings.inputmethod;
+import android.app.ActionBar;
import android.content.Intent;
+import android.os.Bundle;
import com.android.settings.SettingsActivity;
@@ -23,6 +25,22 @@ public class InputMethodAndSubtypeEnablerActivity extends SettingsActivity {
private static final String FRAGMENT_NAME = InputMethodAndSubtypeEnabler.class.getName();
@Override
+ protected void onCreate(final Bundle savedState) {
+ super.onCreate(savedState);
+ final ActionBar actionBar = getActionBar();
+ if (actionBar != null) {
+ actionBar.setDisplayHomeAsUpEnabled(true);
+ actionBar.setHomeButtonEnabled(true);
+ }
+ }
+
+ @Override
+ public boolean onNavigateUp() {
+ finish();
+ return true;
+ }
+
+ @Override
public Intent getIntent() {
final Intent modIntent = new Intent(super.getIntent());
if (!modIntent.hasExtra(EXTRA_SHOW_FRAGMENT)) {