diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-06-28 17:44:11 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-06-28 17:44:11 +0200 |
commit | 6e188be81e428fe2b57894dd21bc5eab796a4896 (patch) | |
tree | e8a69b542d5c12dbb45d23fb2fb5d875fbf30bbb /OpenKeychain/src/main | |
parent | 3f3e1cdb05ee0e5ab9a5a4aed8ac3ef4ef581f24 (diff) | |
parent | 2da5bfabd37260d009047ea2f54314a1264c1c6c (diff) | |
download | open-keychain-6e188be81e428fe2b57894dd21bc5eab796a4896.tar.gz open-keychain-6e188be81e428fe2b57894dd21bc5eab796a4896.tar.bz2 open-keychain-6e188be81e428fe2b57894dd21bc5eab796a4896.zip |
Merge pull request #699 from da-kid/master
Partial fix for #597 (Navbar)
Diffstat (limited to 'OpenKeychain/src/main')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java | 26 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/drawable-hdpi/ic_action_not_secure.png | bin | 0 -> 373 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/drawable-hdpi/ic_action_view_as_list.png | bin | 308 -> 309 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/drawable-mdpi/ic_action_not_secure.png | bin | 0 -> 321 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/drawable-mdpi/ic_action_view_as_list.png | bin | 246 -> 245 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/drawable-xhdpi/ic_action_not_secure.png | bin | 0 -> 483 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/drawable-xhdpi/ic_action_view_as_list.png | bin | 337 -> 341 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_not_secure.png | bin | 0 -> 619 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_view_as_list.png | bin | 431 -> 441 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/layout/drawer_list_item.xml | 12 |
10 files changed, 20 insertions, 18 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java index 9a5050eba..586442bb0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DrawerActivity.java @@ -37,8 +37,7 @@ import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; - -import com.beardedhen.androidbootstrap.FontAwesomeText; +import android.widget.ImageView; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; @@ -79,10 +78,10 @@ public class DrawerActivity extends ActionBarActivity { } NavItem mItemIconTexts[] = new NavItem[]{ - new NavItem("fa-user", getString(R.string.nav_keys)), - new NavItem("fa-lock", getString(R.string.nav_encrypt)), - new NavItem("fa-unlock", getString(R.string.nav_decrypt)), - new NavItem("fa-android", getString(R.string.nav_apps))}; + new NavItem(R.drawable.ic_action_person, getString(R.string.nav_keys)), + new NavItem(R.drawable.ic_action_secure, getString(R.string.nav_encrypt)), + 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))}; mDrawerList.setAdapter(new NavigationDrawerAdapter(this, R.layout.drawer_list_item, mItemIconTexts)); @@ -239,10 +238,15 @@ public class DrawerActivity extends ActionBarActivity { } private class NavItem { - public String icon; + public int icon; // res-id public String title; - public NavItem(String icon, String title) { + /** + * NavItem constructor + * @param icon The icons resource-id + * @param title The title of the menu entry + */ + public NavItem(int icon, String title) { super(); this.icon = icon; this.title = title; @@ -271,7 +275,7 @@ public class DrawerActivity extends ActionBarActivity { row = inflater.inflate(mLayoutResourceId, parent, false); holder = new NavItemHolder(); - holder.mImg = (FontAwesomeText) row.findViewById(R.id.drawer_item_icon); + holder.mImg = (ImageView) row.findViewById(R.id.drawer_item_icon); holder.mTxtTitle = (TextView) row.findViewById(R.id.drawer_item_text); row.setTag(holder); @@ -281,7 +285,7 @@ public class DrawerActivity extends ActionBarActivity { NavItem item = mData[position]; holder.mTxtTitle.setText(item.title); - holder.mImg.setIcon(item.icon); + holder.mImg.setImageResource(item.icon); return row; } @@ -289,7 +293,7 @@ public class DrawerActivity extends ActionBarActivity { } static class NavItemHolder { - FontAwesomeText mImg; + ImageView mImg; TextView mTxtTitle; } diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_not_secure.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_not_secure.png Binary files differnew file mode 100644 index 000000000..5ee148080 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_not_secure.png diff --git a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_view_as_list.png b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_view_as_list.png Binary files differindex 86da228e9..e08afae85 100644 --- a/OpenKeychain/src/main/res/drawable-hdpi/ic_action_view_as_list.png +++ b/OpenKeychain/src/main/res/drawable-hdpi/ic_action_view_as_list.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_not_secure.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_not_secure.png Binary files differnew file mode 100644 index 000000000..dd5289ee4 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_not_secure.png diff --git a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_view_as_list.png b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_view_as_list.png Binary files differindex ccb4c7d7b..4fe0edfa3 100644 --- a/OpenKeychain/src/main/res/drawable-mdpi/ic_action_view_as_list.png +++ b/OpenKeychain/src/main/res/drawable-mdpi/ic_action_view_as_list.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_not_secure.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_not_secure.png Binary files differnew file mode 100644 index 000000000..312a230e7 --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_not_secure.png diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_view_as_list.png b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_view_as_list.png Binary files differindex b9c93c8c2..a38638e4d 100644 --- a/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_view_as_list.png +++ b/OpenKeychain/src/main/res/drawable-xhdpi/ic_action_view_as_list.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_not_secure.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_not_secure.png Binary files differnew file mode 100644 index 000000000..4aa9dc85c --- /dev/null +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_not_secure.png diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_view_as_list.png b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_view_as_list.png Binary files differindex 460041640..b00a85f6d 100644 --- a/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_view_as_list.png +++ b/OpenKeychain/src/main/res/drawable-xxhdpi/ic_action_view_as_list.png diff --git a/OpenKeychain/src/main/res/layout/drawer_list_item.xml b/OpenKeychain/src/main/res/layout/drawer_list_item.xml index 72f4fec50..4719483da 100644 --- a/OpenKeychain/src/main/res/layout/drawer_list_item.xml +++ b/OpenKeychain/src/main/res/layout/drawer_list_item.xml @@ -3,17 +3,15 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - <com.beardedhen.androidbootstrap.FontAwesomeText + <ImageView android:id="@+id/drawer_item_icon" + android:gravity="center_vertical" android:layout_width="30dp" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:textSize="24sp" android:layout_marginLeft="8dp" - fontawesometext:fa_icon="fa-github" - android:layout_centerVertical="true" + android:layout_alignParentStart="true" android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" /> + android:layout_centerVertical="true" /> <TextView android:id="@+id/drawer_item_text" @@ -28,6 +26,6 @@ android:textAppearance="@android:style/TextAppearance.Medium" android:textColor="#111" android:layout_alignParentTop="true" - android:layout_toRightOf="@+id/drawer_item_icon" /> + android:layout_toRightOf="@id/drawer_item_icon"/> </RelativeLayout> |