More UI rework
This commit is contained in:
@@ -88,14 +88,14 @@ public final class Constants {
|
||||
|
||||
public static final class DrawerItems {
|
||||
public static final Class KEY_LIST = KeyListActivity.class;
|
||||
public static final Class ENCRYPT_FILE = EncryptFileActivity.class;
|
||||
public static final Class ENCRYPT_TEXT = EncryptTextActivity.class;
|
||||
public static final Class ENCRYPT_FILE = EncryptFileActivity.class;
|
||||
public static final Class DECRYPT = DecryptActivity.class;
|
||||
public static final Class REGISTERED_APPS_LIST = AppsListActivity.class;
|
||||
public static final Class[] ARRAY = new Class[]{
|
||||
KEY_LIST,
|
||||
ENCRYPT_FILE,
|
||||
ENCRYPT_TEXT,
|
||||
ENCRYPT_FILE,
|
||||
DECRYPT,
|
||||
REGISTERED_APPS_LIST
|
||||
};
|
||||
|
||||
@@ -83,8 +83,8 @@ public class DrawerActivity extends ActionBarActivity {
|
||||
|
||||
NavItem mItemIconTexts[] = new NavItem[]{
|
||||
new NavItem(R.drawable.ic_action_person, getString(R.string.nav_keys)),
|
||||
new NavItem(R.drawable.ic_action_secure, getString(R.string.nav_encrypt_files)),
|
||||
new NavItem(R.drawable.ic_action_secure, getString(R.string.nav_encrypt_text)),
|
||||
new NavItem(R.drawable.ic_action_secure, getString(R.string.nav_encrypt_files)),
|
||||
new NavItem(R.drawable.ic_action_not_secure, getString(R.string.nav_decrypt)),
|
||||
new NavItem(R.drawable.ic_action_view_as_list, getString(R.string.nav_apps))};
|
||||
|
||||
@@ -248,7 +248,8 @@ public class DrawerActivity extends ActionBarActivity {
|
||||
|
||||
/**
|
||||
* NavItem constructor
|
||||
* @param icon The icons resource-id
|
||||
*
|
||||
* @param icon The icons resource-id
|
||||
* @param title The title of the menu entry
|
||||
*/
|
||||
public NavItem(int icon, String title) {
|
||||
|
||||
@@ -210,9 +210,7 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView {
|
||||
}
|
||||
|
||||
public String getPrimary() {
|
||||
if (mUserId[0] != null && mUserId[2] != null) {
|
||||
return mUserId[0] + " (" + mUserId[2] + ")";
|
||||
} else if (mUserId[0] != null) {
|
||||
if (mUserId[0] != null) {
|
||||
return mUserId[0];
|
||||
} else {
|
||||
return mUserId[1];
|
||||
@@ -220,7 +218,7 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView {
|
||||
}
|
||||
|
||||
public String getSecondary() {
|
||||
if (mUserId[0] != null) {
|
||||
if (mUserId[1] != null) {
|
||||
return mUserId[1];
|
||||
} else {
|
||||
return getKeyIdHex();
|
||||
|
||||
@@ -133,7 +133,7 @@ public abstract class KeySpinner extends Spinner implements LoaderManager.Loader
|
||||
inner = new CursorAdapter(null, null, 0) {
|
||||
@Override
|
||||
public View newView(Context context, Cursor cursor, ViewGroup parent) {
|
||||
return View.inflate(getContext(), R.layout.keyspinner_key, null);
|
||||
return View.inflate(getContext(), R.layout.keyspinner_item, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -210,7 +210,7 @@ public abstract class KeySpinner extends Spinner implements LoaderManager.Loader
|
||||
} else {
|
||||
v = convertView;
|
||||
}
|
||||
((TextView) v.findViewById(R.id.keyspinner_key_name)).setText("None");
|
||||
((TextView) v.findViewById(R.id.keyspinner_key_name)).setText(R.string.choice_none);
|
||||
v.findViewById(R.id.keyspinner_key_email).setVisibility(View.GONE);
|
||||
v.findViewById(R.id.keyspinner_key_id).setVisibility(View.GONE);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user