Use support library up-navigation
This commit is contained in:
parent
e38746f906
commit
f7ec854c67
|
@ -57,6 +57,9 @@
|
|||
android:configChanges="keyboardHidden|orientation"
|
||||
android:label="@string/add_new_feed_label"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MainActivity" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
|
@ -108,6 +111,9 @@
|
|||
<activity
|
||||
android:name="de.danoeh.antennapod.activity.FeedItemlistActivity"
|
||||
android:configChanges="orientation|screenSize">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MainActivity" />
|
||||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value="de.danoeh.antennapod.activity.SearchActivity"/>
|
||||
|
@ -120,7 +126,11 @@
|
|||
android:configChanges="keyboard|orientation"/>
|
||||
<activity
|
||||
android:name="de.danoeh.antennapod.activity.DownloadActivity"
|
||||
android:label="@string/downloads_label"/>
|
||||
android:label="@string/downloads_label">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.AudioplayerActivity"
|
||||
android:launchMode="singleTop">
|
||||
|
@ -152,10 +162,16 @@
|
|||
android:name=".activity.PreferenceActivity"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
android:label="@string/settings_label">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.DownloadLogActivity"
|
||||
android:label="@string/download_log_label">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.DownloadActivity" />
|
||||
</activity>
|
||||
|
||||
<receiver
|
||||
|
@ -279,6 +295,9 @@
|
|||
<activity
|
||||
android:name=".activity.MiroGuideMainActivity"
|
||||
android:label="@string/miro_guide_label">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.AddFeedActivity" />
|
||||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value="de.danoeh.antennapod.activity.MiroGuideSearchActivity"/>
|
||||
|
@ -301,11 +320,17 @@
|
|||
<activity
|
||||
android:name=".activity.MiroGuideCategoryActivity"
|
||||
android:configChanges="keyboardHidden|orientation">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MiroGuideMainActiviy" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.MiroGuideChannelViewActivity"
|
||||
android:configChanges="keyboard|orientation"
|
||||
android:label="@string/miro_guide_label">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MiroGuideCategoryActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.VideoplayerActivity"
|
||||
|
@ -323,14 +348,31 @@
|
|||
</activity>
|
||||
<activity
|
||||
android:name=".activity.PlaybackHistoryActivity"
|
||||
android:label="@string/playback_history_label"/>
|
||||
android:label="@string/playback_history_label">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MainActivity" />
|
||||
</activity>
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MainActiviy" />
|
||||
<activity
|
||||
android:name=".activity.DirectoryChooserActivity"
|
||||
android:label="@string/choose_data_directory"/>
|
||||
android:label="@string/choose_data_directory">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.PreferenceActivity" />
|
||||
</activity>
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.PreferenceActivity" />
|
||||
<activity
|
||||
android:name=".activity.OrganizeQueueActivity"
|
||||
android:configChanges="orientation"
|
||||
android:label="@string/organize_queue_label">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="de.danoeh.antennapod.activity.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.gpoddernet.GpodnetMainActivity"
|
||||
|
|
|
@ -2,6 +2,7 @@ package de.danoeh.antennapod.activity;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -216,10 +217,7 @@ public class AddFeedActivity extends ActionBarActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
| Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.FileObserver;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
|
@ -298,7 +299,7 @@ public class DirectoryChooserActivity extends ActionBarActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
return true;
|
||||
case R.id.new_folder_item:
|
||||
openNewFolderDialog();
|
||||
|
|
|
@ -11,6 +11,7 @@ import android.content.res.TypedArray;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.view.ActionMode;
|
||||
|
@ -197,10 +198,7 @@ public class DownloadActivity extends ActionBarActivity implements
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
| Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
break;
|
||||
case MENU_SHOW_LOG:
|
||||
startActivity(new Intent(this, DownloadLogActivity.class));
|
||||
|
|
|
@ -3,6 +3,7 @@ package de.danoeh.antennapod.activity;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
|
||||
import android.util.Log;
|
||||
|
@ -67,7 +68,7 @@ public class DownloadLogActivity extends ActionBarActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.os.AsyncTask;
|
|||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.widget.SearchView;
|
||||
|
@ -195,9 +196,7 @@ public class FeedItemlistActivity extends ActionBarActivity {
|
|||
conDialog.createNewDialog().show();
|
||||
break;
|
||||
case android.R.id.home:
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(intent);
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.os.Bundle;
|
|||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
@ -59,7 +60,7 @@ public class MiroGuideCategoryActivity extends ActionBarActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -8,6 +8,7 @@ import android.content.Intent;
|
|||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
|
@ -159,7 +160,7 @@ public class MiroGuideChannelViewActivity extends ActionBarActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
return true;
|
||||
case R.id.visit_website_item:
|
||||
Uri uri = Uri.parse(channel.getWebsiteUrl());
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.widget.SearchView;
|
||||
|
@ -151,7 +152,7 @@ public class MiroGuideMainActivity extends ActionBarActivity implements AdapterV
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.os.AsyncTask;
|
|||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.view.*;
|
||||
import android.util.Log;
|
||||
|
@ -145,7 +146,7 @@ public class OrganizeQueueActivity extends ActionBarActivity implements
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -3,6 +3,7 @@ package de.danoeh.antennapod.activity;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
@ -31,10 +32,7 @@ public class PlaybackHistoryActivity extends ActionBarActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
| Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
return true;
|
||||
case R.id.clear_history_item:
|
||||
DBWriter.clearPlaybackHistory(this);
|
||||
|
|
|
@ -15,6 +15,7 @@ import android.preference.Preference;
|
|||
import android.preference.Preference.OnPreferenceChangeListener;
|
||||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -324,9 +325,7 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(intent);
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue