Add back to home function to the actionbar icon for apis >=11 (fixes #291)
This commit is contained in:
parent
948dfa55ec
commit
686403d978
@ -53,7 +53,8 @@
|
||||
<activity android:name="Settings" />
|
||||
<activity
|
||||
android:name="AppDetails"
|
||||
android:exported="true" >
|
||||
android:exported="true"
|
||||
android:parentActivityName="FDroid" >
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
@ -61,12 +62,22 @@
|
||||
|
||||
<data android:scheme="fdroid.app" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="FDroid" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name="Preferences"
|
||||
android:parentActivityName="FDroid" >
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="FDroid" />
|
||||
</activity>
|
||||
<activity android:name="Preferences" />
|
||||
<activity
|
||||
android:name="SearchResults"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop" >
|
||||
android:launchMode="singleTop"
|
||||
android:parentActivityName="FDroid" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
</intent-filter>
|
||||
@ -74,6 +85,9 @@
|
||||
<meta-data
|
||||
android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable" />
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="FDroid" />
|
||||
</activity>
|
||||
|
||||
<receiver android:name="StartupReceiver" >
|
||||
|
@ -30,6 +30,7 @@ import org.fdroid.fdroid.compat.MenuManager;
|
||||
import org.fdroid.fdroid.DB.CommaSeparatedList;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ListActivity;
|
||||
import android.app.ProgressDialog;
|
||||
@ -180,6 +181,8 @@ public class AppDetails extends ListActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
if (Utils.hasApi(11))
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
setContentView(R.layout.appdetails);
|
||||
|
||||
|
@ -20,6 +20,7 @@ package org.fdroid.fdroid;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
@ -33,6 +34,8 @@ public class Preferences extends PreferenceActivity implements
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (Utils.hasApi(11))
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
for (String prefkey : new String[] { "reset", "ignoreTouchscreen",
|
||||
"showIncompatible" }) {
|
||||
|
@ -21,6 +21,7 @@ package org.fdroid.fdroid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.ListActivity;
|
||||
import android.app.SearchManager;
|
||||
import android.content.Intent;
|
||||
@ -47,6 +48,8 @@ public class SearchResults extends ListActivity {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (Utils.hasApi(11))
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
applist = new AvailableAppListAdapter(this);
|
||||
setContentView(R.layout.searchresults);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user