Commit 2e2dfb1c authored by Grigory Fedorov's avatar Grigory Fedorov

"Up" buttons for PhraseEditor and PhraseList activities.

parent a8914c67
...@@ -279,10 +279,21 @@ ...@@ -279,10 +279,21 @@
<activity <activity
android:name="com.xabber.android.ui.preferences.PhraseList" android:name="com.xabber.android.ui.preferences.PhraseList"
android:label="@string/events_phrases_title" android:label="@string/events_phrases_title"
/> android:parentActivityName="com.xabber.android.ui.preferences.PreferenceEditor">
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xabber.android.ui.preferences.PreferenceEditor" />
</activity>
<activity <activity
android:name="com.xabber.android.ui.preferences.PhraseEditor" android:name="com.xabber.android.ui.preferences.PhraseEditor"
/> android:parentActivityName="com.xabber.android.ui.preferences.PhraseList">
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xabber.android.ui.preferences.PhraseList" />
</activity>
<activity <activity
android:name="com.xabber.android.ui.ReconnectionActivity" android:name="com.xabber.android.ui.ReconnectionActivity"
/> />
......
...@@ -36,7 +36,14 @@ public class PhraseEditor extends BaseSettingsActivity { ...@@ -36,7 +36,14 @@ public class PhraseEditor extends BaseSettingsActivity {
private Phrase phrase; private Phrase phrase;
@Override @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
protected void onInflate(Bundle savedInstanceState) { protected void onInflate(Bundle savedInstanceState) {
addPreferencesFromResource(R.xml.phrase_editor); addPreferencesFromResource(R.xml.phrase_editor);
Integer index = getPhraseIndex(getIntent()); Integer index = getPhraseIndex(getIntent());
......
...@@ -27,7 +27,14 @@ import com.xabber.androiddev.R; ...@@ -27,7 +27,14 @@ import com.xabber.androiddev.R;
public class PhraseList extends BaseListEditor<Integer> { public class PhraseList extends BaseListEditor<Integer> {
@Override @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
protected int getAddTextResourceId() { protected int getAddTextResourceId() {
return R.string.phrase_add; return R.string.phrase_add;
} }
......
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