Add None-entry to ListPreference
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="openpgp_list_preference_none">None</string>
|
||||
|
||||
</resources>
|
||||
@@ -33,6 +33,8 @@ import android.widget.TextView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.sufficientlysecure.keychain.api.R;
|
||||
|
||||
public class OpenPgpListPreference extends DialogPreference {
|
||||
ArrayList<OpenPgpProviderEntry> mProviderList = new ArrayList<OpenPgpProviderEntry>();
|
||||
private String mSelectedPackage;
|
||||
@@ -55,6 +57,10 @@ public class OpenPgpListPreference extends DialogPreference {
|
||||
mProviderList.add(new OpenPgpProviderEntry(packageName, simpleName, icon));
|
||||
}
|
||||
}
|
||||
|
||||
// add "none"
|
||||
mProviderList.add(0, new OpenPgpProviderEntry("", context.getString(R.string.openpgp_list_preference_none),
|
||||
context.getResources().getDrawable(R.drawable.ic_action_cancel_launchersize)));
|
||||
}
|
||||
|
||||
public OpenPgpListPreference(Context context) {
|
||||
|
||||
Reference in New Issue
Block a user