Merge branch 'merge-requests/39'
This commit is contained in:
commit
2a1b28821b
@ -138,6 +138,8 @@
|
||||
<string name="antinonfreedep">Dependencies</string>
|
||||
<string name="antinonfreedeplong">Show apps that depend on other non-free apps</string>
|
||||
|
||||
<string name="display">Display</string>
|
||||
|
||||
<string name="expert">Expert</string>
|
||||
<string name="expert_mode">Enable expert mode</string>
|
||||
|
||||
@ -174,5 +176,7 @@
|
||||
<string name="showPermissions">Show permissions</string>
|
||||
<string name="showPermissions_long">Display a list of permissions an app needs</string>
|
||||
<string name="no_handler_app">You don\'t have any app installed that can handle %s</string>
|
||||
<string name="compactlayout">Compact Layout</string>
|
||||
<string name="compactlayout_long">Hide app summaries when listing apps</string>
|
||||
|
||||
</resources>
|
||||
|
@ -26,6 +26,14 @@
|
||||
android:summary="@string/update_history_desc"
|
||||
android:title="@string/update_history" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/display">
|
||||
<CheckBoxPreference android:title="@string/showPermissions"
|
||||
android:defaultValue="false" android:summary="@string/showPermissions_long"
|
||||
android:key="showPermissions"/>
|
||||
<CheckBoxPreference android:title="@string/compactlayout"
|
||||
android:defaultValue="false" android:summary="@string/compactlayout_long"
|
||||
android:key="compactlayout"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/antifeatures">
|
||||
<CheckBoxPreference android:title="@string/antiads"
|
||||
android:defaultValue="false" android:summary="@string/antiadslong"
|
||||
@ -53,7 +61,6 @@
|
||||
<CheckBoxPreference android:title="@string/ignoreTouch"
|
||||
android:defaultValue="false" android:summary="@string/ignoreTouch_long"
|
||||
android:key="ignoreTouchscreen" />
|
||||
<CheckBoxPreference android:key="showPermissions" android:summary="@string/showPermissions_long" android:title="@string/showPermissions" android:defaultValue="false"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/maintenance">
|
||||
<Preference android:title="@string/reset" android:summary="@string/clear_all_cached_data"
|
||||
|
@ -6,6 +6,8 @@ import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.content.SharedPreferences;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -18,8 +20,13 @@ public class AppListAdapter extends BaseAdapter {
|
||||
private List<DB.App> items = new ArrayList<DB.App>();
|
||||
private Context mContext;
|
||||
|
||||
private boolean pref_compact;
|
||||
|
||||
public AppListAdapter(Context context) {
|
||||
mContext = context;
|
||||
SharedPreferences prefs = PreferenceManager
|
||||
.getDefaultSharedPreferences(mContext);
|
||||
pref_compact = prefs.getBoolean("compactlayout", false);
|
||||
}
|
||||
|
||||
public void addItem(DB.App app) {
|
||||
@ -79,6 +86,9 @@ public class AppListAdapter extends BaseAdapter {
|
||||
license.setText(app.license);
|
||||
|
||||
TextView summary = (TextView) v.findViewById(R.id.summary);
|
||||
if (pref_compact)
|
||||
summary.setVisibility(View.GONE);
|
||||
else
|
||||
summary.setText(app.summary);
|
||||
|
||||
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||
|
@ -38,13 +38,14 @@ public class SearchResults extends ListActivity {
|
||||
|
||||
private static final int SEARCH = Menu.FIRST;
|
||||
|
||||
private AppListAdapter applist = new AppListAdapter(this);
|
||||
private AppListAdapter applist;
|
||||
|
||||
private String mQuery;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
applist = new AppListAdapter(this);
|
||||
setContentView(R.layout.searchresults);
|
||||
|
||||
Intent intent = getIntent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user