diff --git a/Graphics/drawables/drawer_header.svg b/Graphics/drawables/drawer_header.svg new file mode 100644 index 000000000..872d0c7f4 --- /dev/null +++ b/Graphics/drawables/drawer_header.svg @@ -0,0 +1,2029 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %#&$! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Graphics/update-drawables.sh b/Graphics/update-drawables.sh index c96b6dd90..264f7eea6 100755 --- a/Graphics/update-drawables.sh +++ b/Graphics/update-drawables.sh @@ -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 \ No newline at end of file diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NavDrawerActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NavDrawerActivity.java index 9f96d9ff8..bc9c36a2e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NavDrawerActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NavDrawerActivity.java @@ -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())); diff --git a/OpenKeychain/src/main/res/drawable/drawer_header.png b/OpenKeychain/src/main/res/drawable/drawer_header.png new file mode 100644 index 000000000..614098bd7 Binary files /dev/null and b/OpenKeychain/src/main/res/drawable/drawer_header.png differ diff --git a/OpenKeychain/src/main/res/values/colors.xml b/OpenKeychain/src/main/res/values/colors.xml index 353e33058..fbbb89ed1 100644 --- a/OpenKeychain/src/main/res/values/colors.xml +++ b/OpenKeychain/src/main/res/values/colors.xml @@ -19,13 +19,12 @@ #4CAF50 #388E3C #C8E6C9 - #536DFE + #00BCD4 #212121 #727272 #FFFFFF #B6B6B6 - #212121 #727272 diff --git a/OpenKeychain/src/main/res/values/themes.xml b/OpenKeychain/src/main/res/values/themes.xml index 1b6eebb6a..075f538e6 100644 --- a/OpenKeychain/src/main/res/values/themes.xml +++ b/OpenKeychain/src/main/res/values/themes.xml @@ -14,7 +14,7 @@ @style/MySearchViewStyle - @integer/DRAWERTYPE_CUSTOM + @integer/DRAWERTYPE_IMAGE @style/ThemeOverlay.AppCompat.Dark.ActionBar