Version 2.0.2 - card background now customisable, tablet layout changed

This commit is contained in:
Deniz Düzgören
2019-06-02 17:57:57 +02:00
parent abc3309acd
commit d4cef4f25d
23 changed files with 379 additions and 450 deletions
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:id="@+id/def"
android:layout_margin="8dp"
android:layout_weight="1"
app:strokeColor="@color/bggrey"
app:strokeWidth="2dp"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/red"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgred"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/orange"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgorange"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/yellow"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgyellow"
app:cornerRadius="16dp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/green"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bggreen"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/teal"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgteal"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/cyan"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgcyan"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/blue"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgblue"
app:cornerRadius="16dp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/purple"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgpurple"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/pink"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgpink"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/brown"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bgbrown"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:id="@+id/grey"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/bggrey"
app:cornerRadius="16dp"/>
</TableRow>
</TableLayout>
-196
View File
@@ -1,196 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/colourRed"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/red"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourPink"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/pink"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourPurple"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/purple"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourDeepPurple"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/deeppurple"
app:cornerRadius="16dp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/colourLavender"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/lavender"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourIndigo"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/indigo"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourBlue"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/blue"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourLightBlue"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/lightblue"
app:cornerRadius="16dp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/colourTeal"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/teal"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourGreen"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/green"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourYellow"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/yellow"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourOrange"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/orange"
app:cornerRadius="16dp"/>
</TableRow>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/neoncolours"
android:textColor="@color/textcolor"
android:layout_marginStart="8dp"/>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNeonRed"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neonred"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNeonPink"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neonpink"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNeonPurple"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neonpurple"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNeonDeepPurple"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neondeeppurple"
app:cornerRadius="16dp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNeonBlue"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neonblue"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNeonGreen"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neongreen"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNeonYellow"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neonyellow"
app:cornerRadius="16dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNeonOrange"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neonorange"
app:cornerRadius="16dp"/>
</TableRow>
<com.google.android.material.button.MaterialButton
android:id="@+id/colourNone"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_margin="8dp"
android:text="@string/clearcolour"
android:textColor="@color/textcolor"
app:strokeColor="@color/textcolor"
app:strokeWidth="2dp"/>
</TableLayout>
+1 -1
View File
@@ -655,9 +655,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text=""
android:textColor="@color/hintcolor"
android:textSize="12sp"
android:fontFeatureSettings="tnum"
app:layout_constraintStart_toStartOf="@+id/txtVersion"
app:layout_constraintTop_toBottomOf="@+id/txtVersion"
app:layout_constraintBottom_toBottomOf="parent"/>
+6 -3
View File
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
android:id="@+id/planCard"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/lightbackground"
app:cardBackgroundColor="@color/lightbackground"
app:cardCornerRadius="8dp"
android:clickable="true"
android:focusable="true"
@@ -69,11 +70,13 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:textAlignment="textEnd"
android:textColor="@color/textcolor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/time"
app:layout_constraintStart_toStartOf="@+id/time"
app:layout_constraintTop_toBottomOf="@+id/time"
android:textColor="@color/textcolor" />
app:layout_constraintTop_toBottomOf="@+id/time" />
<TextView
android:id="@+id/additional"