From 28d592a2a19e6ee2e38a369df4d07460171b0411 Mon Sep 17 00:00:00 2001 From: Adin Kwok Date: Sun, 21 Oct 2018 00:49:17 -0700 Subject: [PATCH] HAFR: Add activity title and back button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently reads "Settings". Change-Id: I369252d80beb0f3b7761ad0d86ca15db1facf739 Signed-off-by: Hưng Phan --- res/values/cherish_strings.xml | 2 +- src/com/cherish/settings/fragments/HAFRAppListActivity.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml index aba503a..632ad06 100644 --- a/res/values/cherish_strings.xml +++ b/res/values/cherish_strings.xml @@ -1324,7 +1324,7 @@ Hide apps from recents - Prevent apps from appearing in recents + Hide apps from appearing in recents Add app Recents diff --git a/src/com/cherish/settings/fragments/HAFRAppListActivity.java b/src/com/cherish/settings/fragments/HAFRAppListActivity.java index 1f9cb7c..61d1cfe 100644 --- a/src/com/cherish/settings/fragments/HAFRAppListActivity.java +++ b/src/com/cherish/settings/fragments/HAFRAppListActivity.java @@ -41,6 +41,8 @@ public class HAFRAppListActivity extends Activity { @SuppressLint("WorldReadableFiles") protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + setTitle(getResources().getText(R.string.hide_apps_from_recents_title)); + getActionBar().setDisplayHomeAsUpEnabled(true); mPref = getSharedPreferences(KEY_PREFERENCE_APPS, MODE_PRIVATE); loadList(); initAppList(); @@ -69,6 +71,9 @@ public class HAFRAppListActivity extends Activity { case ID_ADD_APP: dDialog.show(ID_ADD_APP); break; + case android.R.id.home: + finish(); + return true; } return false; }