Commit b9414c6b authored by Max Lv's avatar Max Lv

Merge pull request #249 from Mygod/master

Providing up navigation
parents 730efbaf 0d54d9cd
......@@ -65,7 +65,8 @@
<activity
android:name=".AppManager"
android:theme="@style/Theme.AppManager"
android:label="@string/app_name">
android:label="@string/app_name"
android:parentActivityName=".Shadowsocks">
<intent-filter>
<action android:name="com.github.shadowsocks.AppManager"/>
<category android:name="android.intent.category.DEFAULT"/>
......
......@@ -259,6 +259,9 @@ class AppManager extends Activity with OnCheckedChangeListener with OnClickListe
}
Toast.makeText(this, R.string.action_import_err, Toast.LENGTH_SHORT).show()
return false
case android.R.id.home =>
navigateUpTo(getParentActivityIntent)
return true
}
super.onOptionsItemSelected(item)
}
......@@ -274,7 +277,9 @@ class AppManager extends Activity with OnCheckedChangeListener with OnClickListe
handler = new Handler()
getActionBar.setTitle(R.string.proxied_help)
val actionBar = getActionBar()
actionBar.setTitle(R.string.proxied_help)
actionBar.setDisplayHomeAsUpEnabled(true)
this.setContentView(R.layout.layout_apps)
this.overlay = View.inflate(this, R.layout.overlay, null).asInstanceOf[TextView]
getWindowManager.addView(overlay, new
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment