designing all clickable objects

This commit is contained in:
mmk2410 2015-02-15 17:58:56 +01:00
parent 1c47c45ebe
commit d2ec5b9d6a
11 changed files with 94 additions and 56 deletions

View file

@ -35,6 +35,22 @@ public class MainActivity extends MaterialNavigationDrawer {
this.disableLearningPattern(); //Doesn't open the drawer always when the app starts
}
public void normalMorseEncode(View view){
}
public void normalMorseDecode(View view){
}
public void writtenMorseEncode(View view){
}
public void writtenMorseDecode(View view){
}
//called when clicking on the version entry in the about fragment
//opens the app page (de.marcelkapfer.morseconverter)
public void versionEntry(View view){

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ripple_material_light">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1dp" />
<solid android:color="@color/cardview_light_background"/>
</shape>
</item>
</ripple>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ripple_material_light">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1dp" />
<solid android:color="@color/white"/>
</shape>
</item>
</ripple>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/ripple_material_light" android:state_pressed="true"/>
<item android:drawable="@color/cardview_light_background"/>
</selector>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/ripple_material_light" android:state_pressed="true"/>
<item android:drawable="@color/white"/>
</selector>

View file

@ -72,30 +72,16 @@
android:height="48dp"
android:baselineAligned="false">
<Button
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginRight="8dp"
android:minWidth="64dp"
android:height="36dp"
android:onClick="decode"
android:text="@string/button_decode"
android:background="@color/cardview_light_background"
android:textColor="#2196F3"
android:gravity="center|right"
style="?android:attr/borderlessButtonStyle" />
<TextView
style="@style/TextViewButton"
android:layout_marginRight="6dp"
android:onClick="writtenMorseDecode"
android:text="@string/button_decode" />
<Button
android:layout_width="wrap_content"
android:layout_height="36dp"
android:minWidth="64dp"
android:height="36dp"
android:onClick="encode"
android:text="@string/button_encode"
android:textColor="#2196F3"
android:gravity="center|right"
style="?android:attr/borderlessButtonStyle"
android:background="@color/cardview_light_background" />
<TextView
style="@style/TextViewButton"
android:onClick="writtenMorseEncode"
android:text="@string/button_encode" />
</LinearLayout>

View file

@ -72,30 +72,17 @@
android:height="48dp"
android:baselineAligned="false">
<Button
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginRight="8dp"
android:minWidth="64dp"
android:height="36dp"
android:onClick="decode"
android:text="@string/button_decode"
android:background="@color/cardview_light_background"
android:textColor="#2196F3"
android:gravity="center|right"
style="?android:attr/borderlessButtonStyle" />
<TextView
style="@style/TextViewButton"
android:onClick="normalMorseDecode"
android:layout_marginRight="6dp"
android:text="@string/button_decode" />
<TextView
style="@style/TextViewButton"
android:onClick="normalMorseEncode"
android:text="@string/button_encode" />
<Button
android:layout_width="wrap_content"
android:layout_height="36dp"
android:minWidth="64dp"
android:height="36dp"
android:onClick="encode"
android:text="@string/button_encode"
android:textColor="#2196F3"
android:gravity="center|right"
style="?android:attr/borderlessButtonStyle"
android:background="@color/cardview_light_background" />
</LinearLayout>

View file

@ -27,8 +27,8 @@
<string name="app_name">Morse Converter</string>
<string name="action_settings">Einstellungen</string>
<string name="edit_message">Geben Sie einen Text ein</string>
<string name="button_decode">Verschlüsseln</string>
<string name="button_encode">Entschlüsseln</string>
<string name="button_decode">VERSCHLÜSSELN</string>
<string name="button_encode">ENTSCHLÜSSELN</string>
<string name="title_activity_display_message">Ihr Text</string>
<string name="hello_world">Hallo Welt</string>
<string name="action_search">Suche</string>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white">#ffffff</color>
<color name="colorPrimary">#2196F3</color>
<color name="colorPrimaryDark">#1976D2</color>
</resources>

View file

@ -25,8 +25,8 @@
<string name="app_name">Morse Converter</string>
<string name="action_settings">Settings</string>
<string name="edit_message">Enter a Message</string>
<string name="button_decode">Encrypt</string>
<string name="button_encode">Decrypt</string>
<string name="button_decode">ENCRYPT</string>
<string name="button_encode">DECRYPT</string>
<string name="title_activity_display_message">Your Message</string>
<string name="hello_world">Hello world!</string>
<string name="action_search">Search</string>

View file

@ -3,9 +3,9 @@
<!-- Base application theme. -->
<style name="AppTheme" parent="MaterialNavigationDrawerTheme.Light.DarkActionBar.TranslucentKitKatStatusBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#2196F3</item>
<item name="colorPrimaryDark">#1976D2</item>
<item name="colorAccent">#FFFFFF</item>
<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>
</style>
@ -14,8 +14,12 @@
<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">
@ -23,9 +27,7 @@
<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_marginEnd">8dp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:paddingRight">16dp</item>
<item name="android:layout_marginBottom">8dp</item>
</style>
<style name="Divider">
@ -34,4 +36,15 @@
<item name="android:background">@color/ripple_material_dark</item>
</style>
<style name="TextViewButton">
<item name="android:layout_height">36dp</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:minWidth">64dp</item>
<item name="android:height">36dp</item>
<item name="android:textColor">@color/colorPrimary</item>
<item name="android:gravity">center|right</item>
<item name="android:background">@drawable/button_action</item>
<item name="android:src">@color/cardview_light_background</item>
</style>
</resources>