Header image tryout

This commit is contained in:
Dominik Schürmann 2015-01-29 17:02:01 +01:00
parent e4e3360866
commit e0369a2f14
6 changed files with 2039 additions and 5 deletions

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 148 KiB

View File

@ -1,6 +1,7 @@
#!/bin/bash
APP_DIR=../OpenKeychain/src/main
DRAWABLE_DIR=$APP_DIR/res/drawable
MDPI_DIR=$APP_DIR/res/drawable-mdpi
HDPI_DIR=$APP_DIR/res/drawable-hdpi
XDPI_DIR=$APP_DIR/res/drawable-xhdpi
@ -63,4 +64,10 @@ inkscape -w 48 -h 48 -e "$MDPI_DIR/$NAME.png" "$SRC_DIR/$NAME.svg"
inkscape -w 64 -h 64 -e "$HDPI_DIR/$NAME.png" "$SRC_DIR/$NAME.svg"
inkscape -w 96 -h 96 -e "$XDPI_DIR/$NAME.png" "$SRC_DIR/$NAME.svg"
inkscape -w 128 -h 128 -e "$XXDPI_DIR/$NAME.png" "$SRC_DIR/$NAME.svg"
done
for NAME in "drawer_header"
do
echo $NAME
inkscape -w 512 -h 288 -e "$DRAWABLE_DIR/$NAME.png" "$SRC_DIR/$NAME.svg"
done

View File

@ -38,8 +38,7 @@ public abstract class NavDrawerActivity extends MaterialNavigationDrawer {
// set the header image
// create and set the header
View view = LayoutInflater.from(this).inflate(R.layout.drawer_custom_header, null);
setDrawerHeaderCustom(view);
setDrawerHeaderImage(R.drawable.drawer_header);
// create sections
addSection(newSection(getString(R.string.title_keys), R.drawable.ic_vpn_key_black_24dp, new KeyListFragment()));

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -19,13 +19,12 @@
<color name="primary">#4CAF50</color>
<color name="primary_dark">#388E3C</color>
<color name="primary_light">#C8E6C9</color>
<color name="accent">#536DFE</color>
<color name="accent">#00BCD4</color>
<color name="primary_text">#212121</color>
<color name="secondary_text">#727272</color>
<color name="icons">#FFFFFF</color>
<color name="divider">#B6B6B6</color>
<!-- set to text colors -->
<color name="emphasis">#212121</color>
<color name="emphasis_dark">#727272</color>

View File

@ -14,7 +14,7 @@
<item name="searchViewStyle">@style/MySearchViewStyle</item>
<!-- Navigation Drawer library -->
<item name="drawerType">@integer/DRAWERTYPE_CUSTOM</item>
<item name="drawerType">@integer/DRAWERTYPE_IMAGE</item>
<!-- dark action bar... -->
<item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<!-- ...but light popup menu (white background) -->