Improve separator UI

feature/top10
Aurelien Hubert 7 years ago
parent 3d45e9e10c
commit 822142976f
  1. 2
      app/src/main/java/net/pokeranalytics/android/ui/view/RowRepresentable.kt
  2. 31
      app/src/main/res/layout/row_header_title_value.xml
  3. 22
      app/src/main/res/layout/row_title_value.xml

@ -118,7 +118,7 @@ enum class SessionRow : RowRepresentable {
override val needSeparator: Boolean
get() {
return when (this) {
TIPS -> true
TIPS, BANKROLL_VARIATION -> true
else -> false
}
}

@ -1,35 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rowHeaderTitleValue.container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/green_header">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/rowHeaderTitleValue.title"
style="@style/PokerAnalyticsTheme.TextView.RowTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
style="@style/PokerAnalyticsTheme.TextView.RowTitle"
app:layout_constraintBottom_toTopOf="@+id/rowHeaderTitleValue.separator"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/guidelineStart"
app:layout_constraintTop_toTopOf="parent"
tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/rowHeaderTitleValue.value"
style="@style/PokerAnalyticsTheme.TextView.RowValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:ellipsize="end"
android:gravity="end"
android:maxLines="1"
style="@style/PokerAnalyticsTheme.TextView.RowValue"
app:layout_constraintBottom_toTopOf="@+id/rowHeaderTitleValue.separator"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/guidelineEnd"
app:layout_constraintStart_toEndOf="@+id/rowHeaderTitleValue.title"
app:layout_constraintTop_toTopOf="parent"
@ -49,13 +55,18 @@
android:orientation="vertical"
app:layout_constraintGuide_end="16dp" />
<View
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/rowHeaderTitleValue.separator"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="16dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintStart_toStartOf="parent"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>

@ -1,8 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rowTitleValue.container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground">
@ -14,8 +19,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toTopOf="@+id/rowTitleValue.separator"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/guidelineStart"
app:layout_constraintTop_toTopOf="parent"
tools:text="Title" />
@ -29,7 +33,7 @@
android:ellipsize="end"
android:gravity="end"
android:maxLines="1"
app:layout_constraintBottom_toTopOf="@+id/rowTitleValue.separator"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/guidelineEnd"
app:layout_constraintStart_toEndOf="@+id/rowTitleValue.title"
app:layout_constraintTop_toTopOf="parent"
@ -49,9 +53,11 @@
android:orientation="vertical"
app:layout_constraintGuide_end="16dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/rowTitleValue.separator"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="16dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
@ -61,12 +67,12 @@
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_height="1dp"
android:layout_gravity="center"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_gravity="center"
android:background="@color/kaki" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
Loading…
Cancel
Save