Fixes #5 : close button bad layout

hh
Laurent 6 years ago
parent 881c8def65
commit 7aada36f8a
  1. 3
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/views/KeyboardCardView.kt
  2. 6
      app/src/main/res/drawable/ic_close.xml
  3. 7
      app/src/main/res/drawable/ic_close_green.xml
  4. 19
      app/src/main/res/layout/view_hand_keyboard_action.xml
  5. 23
      app/src/main/res/layout/view_hand_keyboard_amount.xml
  6. 20
      app/src/main/res/layout/view_hand_keyboard_card.xml
  7. 5
      app/src/main/res/values/styles.xml

@ -3,9 +3,6 @@ package net.pokeranalytics.android.ui.modules.handhistory.views
import android.content.Context
import android.view.LayoutInflater
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.view_hand_keyboard_action.view.closeButton
import kotlinx.android.synthetic.main.view_hand_keyboard_card.view.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.PAIllegalStateException

@ -1,5 +1,7 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
android:viewportHeight="24.0"
android:viewportWidth="24.0"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>

@ -0,0 +1,7 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0"
android:viewportWidth="24.0"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/green" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>

@ -9,18 +9,25 @@
android:id="@+id/toolbar"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="44dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.button.MaterialButton
<ImageButton
android:id="@+id/closeButton"
app:icon="@drawable/ic_close"
style="@style/PokerAnalyticsTheme.Button"
android:src="@drawable/ic_close_green"
style="@style/PokerAnalyticsTheme.TransparentButton"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_marginStart="8dp"/>
android:layout_height="44dp"/>
<!-- <com.google.android.material.button.MaterialButton-->
<!-- android:id="@+id/closeButton"-->
<!-- app:icon="@drawable/ic_close"-->
<!-- style="@style/PokerAnalyticsTheme.Button"-->
<!-- android:layout_width="44dp"-->
<!-- android:layout_height="44dp"-->
<!-- android:layout_marginStart="8dp"/>-->
</LinearLayout>

@ -5,41 +5,41 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:id="@+id/toolbar"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="44dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/recyclerView">
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.button.MaterialButton
<ImageButton
android:id="@+id/closeButton"
style="@style/PokerAnalyticsTheme.Button"
app:icon="@drawable/ic_close"
android:src="@drawable/ic_close_green"
style="@style/PokerAnalyticsTheme.TransparentButton"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_marginStart="8dp"/>
android:layout_height="match_parent"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/clearButton"
android:text="@string/clear"
style="@style/PokerAnalyticsTheme.Button"
android:layout_width="64dp"
android:layout_height="44dp"
android:layout_height="match_parent"
android:layout_marginStart="8dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/kiloButton"
style="@style/PokerAnalyticsTheme.Button"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_height="match_parent"
android:layout_marginStart="8dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/millionButton"
style="@style/PokerAnalyticsTheme.Button"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_height="match_parent"
android:layout_marginStart="8dp"/>
<com.google.android.material.button.MaterialButton
@ -47,7 +47,7 @@
android:text="@string/next"
style="@style/PokerAnalyticsTheme.Button"
android:layout_width="64dp"
android:layout_height="44dp"
android:layout_height="match_parent"
android:layout_marginStart="8dp"/>
</LinearLayout>
@ -56,6 +56,7 @@
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/toolbar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"

@ -8,23 +8,21 @@
android:id="@+id/toolbar"
android:orientation="horizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_height="44dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.button.MaterialButton
<ImageButton
android:id="@+id/closeButton"
style="@style/PokerAnalyticsTheme.Button"
app:icon="@drawable/ic_close"
android:src="@drawable/ic_close_green"
style="@style/PokerAnalyticsTheme.TransparentButton"
android:layout_width="44dp"
android:layout_height="44dp" />
android:layout_height="match_parent"/>
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="2"/>
<com.google.android.material.button.MaterialButton
@ -33,12 +31,12 @@
android:text="@string/clear"
android:layout_weight="1"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_height="match_parent"
android:layout_marginStart="8dp"/>
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="2"/>
<com.google.android.material.button.MaterialButton
@ -47,7 +45,7 @@
android:text="@string/done"
android:layout_weight="1"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_height="match_parent"
android:layout_marginStart="8dp"/>
</LinearLayout>

@ -354,6 +354,11 @@
<!-- Button -->
<style name="PokerAnalyticsTheme.TransparentButton" parent="Widget.MaterialComponents.Button">
<item name="iconPadding">0dp</item>
<item name="backgroundTint">@color/transparent</item>
</style>
<style name="PokerAnalyticsTheme.Button" parent="Widget.MaterialComponents.Button">
<item name="iconPadding">0dp</item>
<item name="android:height">48dp</item>

Loading…
Cancel
Save