Improved the look of cards, removed redundant code

This commit is contained in:
Deniz Düzgören
2019-05-08 08:08:04 +02:00
parent 1dcf875f85
commit 4c3d011c6f
16 changed files with 260 additions and 635 deletions
@@ -0,0 +1,6 @@
<vector android:height="24dp" android:viewportHeight="330"
android:viewportWidth="330" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M165,0C74.019,0 0,74.02 0,165.001C0,255.982 74.019,330 165,330s165,-74.018 165,-164.999C330,74.02 255.981,0 165,0zM165,300c-74.44,0 -135,-60.56 -135,-134.999C30,90.562 90.56,30 165,30s135,60.562 135,135.001C300,239.44 239.439,300 165,300z"/>
<path android:fillColor="#FF000000" android:pathData="M164.998,70c-11.026,0 -19.996,8.976 -19.996,20.009c0,11.023 8.97,19.991 19.996,19.991c11.026,0 19.996,-8.968 19.996,-19.991C184.994,78.976 176.024,70 164.998,70z"/>
<path android:fillColor="#FF000000" android:pathData="M165,140c-8.284,0 -15,6.716 -15,15v90c0,8.284 6.716,15 15,15c8.284,0 15,-6.716 15,-15v-90C180,146.716 173.284,140 165,140z"/>
</vector>
+3 -3
View File
@@ -19,10 +19,10 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorBackground"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
app:popupTheme="@style/AppThemeLight.PopupOverlay"
app:titleTextColor="?attr/colorAccent"
app:contentInsetStart="0dp">
app:contentInsetStart="0dp"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
@@ -89,7 +89,7 @@
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginBottom="0dp"
app:elevation="0px"
app:elevation="0dp"
app:itemIconTint="@color/bottom_nav_color_avhblue"
app:itemTextColor="@color/bottom_nav_color_avhblue"
app:layout_anchor="@+id/bottom_sheet"
+40 -20
View File
@@ -15,25 +15,29 @@
android:id="@+id/colourRed"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/red"/>
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"/>
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"/>
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"/>
android:backgroundTint="@color/deeppurple"
app:cornerRadius="16dp"/>
</TableRow>
@@ -45,25 +49,29 @@
android:id="@+id/colourLavender"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/lavender"/>
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"/>
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"/>
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"/>
android:backgroundTint="@color/lightblue"
app:cornerRadius="16dp"/>
</TableRow>
@@ -75,25 +83,29 @@
android:id="@+id/colourTeal"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/teal"/>
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"/>
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"/>
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"/>
android:backgroundTint="@color/orange"
app:cornerRadius="16dp"/>
</TableRow>
@@ -112,25 +124,29 @@
android:id="@+id/colourNeonRed"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neonred"/>
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"/>
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"/>
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"/>
android:backgroundTint="@color/neondeeppurple"
app:cornerRadius="16dp"/>
</TableRow>
@@ -142,25 +158,29 @@
android:id="@+id/colourNeonBlue"
android:layout_margin="8dp"
android:layout_weight="1"
android:backgroundTint="@color/neonblue"/>
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"/>
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"/>
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"/>
android:backgroundTint="@color/neonorange"
app:cornerRadius="16dp"/>
</TableRow>
+38 -3
View File
@@ -7,6 +7,7 @@
android:background="?attr/colorBackground">
<androidx.core.widget.NestedScrollView
android:id="@+id/nsvsettings"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
@@ -129,6 +130,40 @@
app:layout_constraintStart_toStartOf="@+id/txtDark"
app:layout_constraintTop_toTopOf="@+id/txtDark" />
<!-- a-->
<TextView
android:id="@+id/txtHideInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/showinfo"
android:textColor="?attr/colorText"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@+id/txtRestart"
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
<TextView
android:id="@+id/txtHideInfo2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/swipeindependent"
android:textColor="?attr/colorHint"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="@+id/txtHideInfo"
app:layout_constraintTop_toBottomOf="@+id/txtHideInfo" />
<Switch
android:id="@+id/switchHideInfo"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:gravity="end|center"
app:layout_constraintBottom_toBottomOf="@+id/txtHideInfo2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/txtHideInfo"
app:layout_constraintTop_toTopOf="@+id/txtHideInfo" />
<!-- a-->
<TextView
android:id="@+id/txtCustomiseColours1"
android:layout_width="wrap_content"
@@ -137,8 +172,8 @@
android:text="@string/customisecolor1"
android:textColor="?attr/colorText"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@+id/txtRestart"
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
app:layout_constraintStart_toStartOf="@+id/txtHideInfo2"
app:layout_constraintTop_toBottomOf="@+id/txtHideInfo2" />
<TextView
android:id="@+id/txtCustomiseColours2"
@@ -164,7 +199,7 @@
app:layout_constraintBottom_toTopOf="@+id/txtFilter"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
app:layout_constraintTop_toBottomOf="@+id/txtHideInfo2" />
<TextView
android:id="@+id/txtFilter"
+6 -6
View File
@@ -6,14 +6,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="?attr/colorBackgroundCard"
app:cardCornerRadius="4dp"
app:cardCornerRadius="8dp"
android:clickable="true"
android:focusable="true"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_marginTop="1dp"
android:layout_marginBottom="1dp"
app:cardElevation="1dp">
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
app:cardElevation="2dp">
<!--app:cardUseCompatPadding="true"-->
+5 -5
View File
@@ -6,11 +6,11 @@
app:cardCornerRadius="4dp"
android:clickable="true"
android:focusable="true"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_marginTop="1dp"
android:layout_marginBottom="1dp"
app:cardElevation="1dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
app:cardElevation="2dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
+5 -1
View File
@@ -21,10 +21,14 @@
android:icon="@drawable/ic_tomato"
android:title="@string/menu"
android:enabled="true"/>
<item
android:id="@+id/openinfopanel"
android:icon="@drawable/ic_information"
android:title=""
android:enabled="true"/>
<item
android:id="@+id/settings"
android:icon="@drawable/ic_cogwheel"
android:title="@string/settings"
android:enabled="true"/>
</menu>
+4
View File
@@ -124,4 +124,8 @@
<string name="allcolourscleared">Farben für alle Kurse wurden gelöscht</string>
<string name="clearcolour">Farbe löschen</string>
<string name="finish">Fertigstellen</string>
<string name="chromecompatible">Kein Chrome-kompatibler Browser gefunden</string>
<string name="noyoutube">YouTube-App nicht gefunden</string>
<string name="swipeindependent">Unabhängig von Wischgeste</string>
<string name="showinfo">Zeige Info-Tab in Navigationsleisete</string>
</resources>
+6
View File
@@ -141,6 +141,12 @@
<string name="allcolourscleared">Colours for all courses have been cleared</string>
<string name="finish">Finish</string>
<string name="chromecompatible">No Chrome-compatible browser found</string>
<string name="noyoutube">YouTube app not found</string>
<string name="showinfo">Show info tab in navigation bar</string>
<string name="swipeindependent">Independent of swipe gesture</string>
<!--<string name="avhblue">AvH-Blue</string>-->
<!--<string name="rosered">AvH-Blue</string>-->
+1 -1
View File
@@ -41,7 +41,7 @@
<item name="colorPrimaryDark">#1B1B1B</item>
<item name="colorAccent">#448aff</item>
<item name="colorBackground">#1B1B1B</item>
<item name="colorBackgroundCard">#1B1B1B</item>
<item name="colorBackgroundCard">#212121</item>
<item name="colorText">#e0e0e0</item>
<item name="colorHintLight">#e0e0e0</item>
<item name="colorHint">#9e9e9e</item>