mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-01-11 05:28:26 -05:00
Header image tryout
This commit is contained in:
parent
e4e3360866
commit
e0369a2f14
2029
Graphics/drawables/drawer_header.svg
Normal file
2029
Graphics/drawables/drawer_header.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 148 KiB |
@ -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
|
@ -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()));
|
||||
|
BIN
OpenKeychain/src/main/res/drawable/drawer_header.png
Normal file
BIN
OpenKeychain/src/main/res/drawable/drawer_header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
@ -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>
|
||||
|
@ -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) -->
|
||||
|
Loading…
Reference in New Issue
Block a user