Translucent Statusbar Fixes; Sticked About to bottom

This commit is contained in:
mmk2410 2015-03-31 23:17:08 +02:00
parent f3b6d15d71
commit 6f32e71d29
3 changed files with 88 additions and 2 deletions

View File

@ -56,12 +56,12 @@ public class MainActivity extends MaterialNavigationDrawer {
this.addSection(normalMorse);
this.addDivisor();
this.addSection(writtenMorseList);
this.addDivisor();
this.addSection(about);
this.addBottomSection(about);
//set drawer image
this.setDrawerHeaderImage(this.getResources().getDrawable(R.drawable.feature_graphics));
allowArrowAnimation(); //Drawer Arrow rotations
this.disableLearningPattern(); //Doesn't open the drawer always when the app starts
setBackPattern(MaterialNavigationDrawer.BACKPATTERN_BACK_TO_FIRST);
}
public void normalMorseEncode(View view){

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This is a Android application for converting writtenMorse and normal morse code.
Copyright (C) 2014-2015 Marcel Michael Kapfer
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Marcel Michael Kapfer
marcelmichaelkapfer@yahoo.co.nz
-->
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="MaterialNavigationDrawerTheme.Light.DarkActionBar.TranslucentKitKatStatusBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/white</item>
<item name="drawerType">@integer/DRAWERTYPE_IMAGE</item>
<item name="rippleBackport">true</item>
<item name="toolbarElevation">true</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
<style name="LinearLayoutList">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">20dp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:paddingRight">16dp</item>
<item name="android:gravity">center</item>
<item name="android:orientation">vertical</item>
<item name="android:background">@drawable/linearlayout_action</item>
<item name="android:src">@color/white</item>
</style>
<style name="LinearLayoutListContainer">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:orientation">vertical</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:layout_marginBottom">8dp</item>
</style>
<style name="Divider">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:height">1dp</item>
<item name="android:background">@color/ripple_material_light</item>
</style>
<style name="LinearLayoutButton">
<item name="android:layout_height">36dp</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:minWidth">64dp</item>
<item name="android:layout_marginLeft">4dp</item>
<item name="android:layout_marginRight">4dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/button_action</item>
<item name="android:src">@color/cardview_light_background</item>
</style>
<style name="LinearLayoutButtonText">
<item name="android:textColor">@color/colorPrimary</item>
<item name="android:gravity">center</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_width">match_parent</item>
</style>
</resources>

View File

@ -23,5 +23,6 @@
<resources>
<color name="white">#ffffff</color>
<color name="colorPrimary">#2196F3</color>
<!--The primary dark color is the same as the primary color. Necessary out of a bug in the MaterialDesignDrawer 1.3.3 library.-->
<color name="colorPrimaryDark">#2196F3</color>
</resources>