Add separator management

feature/top10
Aurelien Hubert 7 years ago
parent 0e505de0a5
commit 3d45e9e10c
  1. 2
      app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt
  2. 17
      app/src/main/java/net/pokeranalytics/android/ui/view/RowRepresentable.kt
  3. 47
      app/src/main/java/net/pokeranalytics/android/ui/view/RowViewType.kt
  4. 61
      app/src/main/res/layout/row_header_title_value.xml
  5. 9
      app/src/main/res/layout/row_separator.xml
  6. 44
      app/src/main/res/layout/row_session.xml
  7. 35
      app/src/main/res/layout/row_session_view.xml
  8. 33
      app/src/main/res/layout/row_title.xml
  9. 58
      app/src/main/res/layout/row_title_value.xml
  10. 39
      app/src/main/res/layout/row_title_value_action.xml
  11. 1
      app/src/main/res/values/colors.xml

@ -269,6 +269,8 @@ open class Session : RealmObject(), SessionInterface, RowRepresentableDataSource
override var title: String = "Change that: $creationDate" override var title: String = "Change that: $creationDate"
override val primaryKey: String get() = this.id override val primaryKey: String get() = this.id
override fun getBottomSheetData(row: RowRepresentable): ArrayList<BottomSheetData> { override fun getBottomSheetData(row: RowRepresentable): ArrayList<BottomSheetData> {
val data = ArrayList<BottomSheetData>() val data = ArrayList<BottomSheetData>()

@ -54,6 +54,11 @@ interface RowRepresentable : Localizable {
get() { get() {
return null return null
} }
val needSeparator: Boolean
get() {
return false
}
} }
enum class SessionRow : RowRepresentable { enum class SessionRow : RowRepresentable {
@ -110,6 +115,14 @@ enum class SessionRow : RowRepresentable {
} }
} }
override val needSeparator: Boolean
get() {
return when (this) {
TIPS -> true
else -> false
}
}
override val resId: Int? override val resId: Int?
get() { get() {
return when (this) { return when (this) {
@ -137,7 +150,7 @@ enum class SessionRow : RowRepresentable {
override val viewType: Int override val viewType: Int
get() { get() {
return when (this) { return when (this) {
DURATION, NET_HOURLY_RATE, BANKROLL_VARIATION, DURATION, NET_HOURLY_RATE, BANKROLL_VARIATION -> RowViewType.HEADER_TITLE_VALUE.ordinal
CASHED_OUT, BUY_IN, TIPS, CASHED_OUT, BUY_IN, TIPS,
GAME, BLINDS, LOCATION, BANKROLL, TABLE_SIZE, COMMENT, START_DATE, END_DATE, BREAK_TIME -> RowViewType.TITLE_VALUE.ordinal GAME, BLINDS, LOCATION, BANKROLL, TABLE_SIZE, COMMENT, START_DATE, END_DATE, BREAK_TIME -> RowViewType.TITLE_VALUE.ordinal
} }
@ -259,7 +272,7 @@ enum class SettingRow : RowRepresentable {
override val resId: Int? override val resId: Int?
get() { get() {
this.relatedResultsRepresentable?. let { this.relatedResultsRepresentable?.let {
return it.resId return it.resId
} ?: run { } ?: run {
return super.resId return super.resId

@ -4,6 +4,9 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.row_header_title_value.view.*
import kotlinx.android.synthetic.main.row_title.view.*
import kotlinx.android.synthetic.main.row_title_value.view.*
import kotlinx.android.synthetic.main.row_title_value_action.view.* import kotlinx.android.synthetic.main.row_title_value_action.view.*
import net.pokeranalytics.android.R import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.adapter.components.RowRepresentableDataSource import net.pokeranalytics.android.ui.adapter.components.RowRepresentableDataSource
@ -19,6 +22,7 @@ interface BindableHolder {
enum class RowViewType { enum class RowViewType {
HEADER, HEADER,
HEADER_TITLE_VALUE,
EDIT_TEXT, EDIT_TEXT,
TITLE, TITLE,
TITLE_VALUE, TITLE_VALUE,
@ -33,38 +37,50 @@ enum class RowViewType {
inner class TitleViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), inner class TitleViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView),
BindableHolder { BindableHolder {
override fun bind(row: RowRepresentable, rowRepresentableDataSource: RowRepresentableDataSource?, listener: View.OnClickListener, actionListener: View.OnClickListener?) { override fun bind(row: RowRepresentable, rowRepresentableDataSource: RowRepresentableDataSource?, listener: View.OnClickListener, actionListener: View.OnClickListener?) {
itemView.title.text = row.localizedTitle(itemView.context) itemView.rowTitle_title.text = row.localizedTitle(itemView.context)
itemView.container.setOnClickListener(listener) itemView.rowTitle_container.setOnClickListener(listener)
} }
} }
inner class TitleValueViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), inner class HeaderTitleValueViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView),
BindableHolder { BindableHolder {
override fun bind(row: RowRepresentable, rowRepresentableDataSource: RowRepresentableDataSource?, listener: View.OnClickListener, actionListener: View.OnClickListener?) { override fun bind(row: RowRepresentable, rowRepresentableDataSource: RowRepresentableDataSource?, listener: View.OnClickListener, actionListener: View.OnClickListener?) {
itemView.title.text = row.localizedTitle(itemView.context) itemView.rowHeaderTitleValue_title.text = row.localizedTitle(itemView.context)
rowRepresentableDataSource?.let {
itemView.rowHeaderTitleValue_value.text = it.stringForRow(row)
}
itemView.rowHeaderTitleValue_container.setOnClickListener(listener)
itemView.rowHeaderTitleValue_separator.visibility = if (row.needSeparator) View.VISIBLE else View.GONE
}
}
inner class TitleValueViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView),
BindableHolder {
override fun bind(row: RowRepresentable, rowRepresentableDataSource: RowRepresentableDataSource?, listener: View.OnClickListener, actionListener: View.OnClickListener?) {
itemView.rowTitleValue_title.text = row.localizedTitle(itemView.context)
rowRepresentableDataSource?.let { rowRepresentableDataSource?.let {
itemView.value.text = it.stringForRow(row) itemView.rowTitleValue_value.text = it.stringForRow(row)
} }
itemView.container.setOnClickListener(listener) itemView.rowTitleValue_container.setOnClickListener(listener)
itemView.rowTitleValue_separator.visibility = if (row.needSeparator) View.VISIBLE else View.GONE
} }
} }
inner class TitleValueActionViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), inner class TitleValueActionViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView),
BindableHolder { BindableHolder {
override fun bind(row: RowRepresentable, rowRepresentableDataSource: RowRepresentableDataSource?, listener: View.OnClickListener, actionListener: View.OnClickListener?) { override fun bind(row: RowRepresentable, rowRepresentableDataSource: RowRepresentableDataSource?, listener: View.OnClickListener, actionListener: View.OnClickListener?) {
itemView.title.text = row.localizedTitle(itemView.context) itemView.rowTitleValueAction_title.text = row.localizedTitle(itemView.context)
rowRepresentableDataSource?.let { rowDelegate -> rowRepresentableDataSource?.let { rowDelegate ->
val value = rowDelegate.stringForRow(row) val value = rowDelegate.stringForRow(row)
itemView.value.text = value itemView.rowTitleValueAction_value.text = value
itemView.action.visibility = if (value == "--") View.GONE else View.VISIBLE itemView.rowTitleValueAction_action.visibility = if (value == "--") View.GONE else View.VISIBLE
rowDelegate.actionIconForRow(row)?.let {icon -> rowDelegate.actionIconForRow(row)?.let {icon ->
itemView.action.setImageResource(icon) itemView.rowTitleValueAction_action.setImageResource(icon)
} }
} }
itemView.container.setOnClickListener(listener) itemView.rowTitleValueAction_container.setOnClickListener(listener)
itemView.action.setOnClickListener(actionListener) itemView.rowTitleValueAction_action.setOnClickListener(actionListener)
} }
} }
@ -78,6 +94,13 @@ enum class RowViewType {
false false
) )
) )
HEADER_TITLE_VALUE -> HeaderTitleValueViewHolder(
LayoutInflater.from(parent.context).inflate(
R.layout.row_header_title_value,
parent,
false
)
)
TITLE_VALUE -> TitleValueViewHolder( TITLE_VALUE -> TitleValueViewHolder(
LayoutInflater.from(parent.context).inflate( LayoutInflater.from(parent.context).inflate(
R.layout.row_title_value, R.layout.row_title_value,

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:background="@color/green_header">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/rowHeaderTitleValue.title"
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_constraintStart_toStartOf="@+id/guidelineStart"
app:layout_constraintTop_toTopOf="parent"
tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/rowHeaderTitleValue.value"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:ellipsize="end"
android:gravity="end"
android:maxLines="1"
style="@style/PokerAnalyticsTheme.TextView.RowValue"
app:layout_constraintBottom_toTopOf="@+id/rowHeaderTitleValue.separator"
app:layout_constraintEnd_toEndOf="@+id/guidelineEnd"
app:layout_constraintStart_toEndOf="@+id/rowHeaderTitleValue.title"
app:layout_constraintTop_toTopOf="parent"
tools:text="Value" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="16dp" />
<View
android:id="@+id/rowHeaderTitleValue.separator"
android:layout_width="0dp"
android:layout_height="16dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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/container"
android:layout_width="match_parent"
android:layout_height="16dp">
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:padding="16dp">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/value"
android:layout_width="0dp"
android:layout_height="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:ellipsize="end"
android:gravity="end"
android:maxLines="1"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/title"
app:layout_constraintTop_toTopOf="parent"
tools:text="Value" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -4,19 +4,19 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?selectableItemBackground" android:background="?selectableItemBackground">
android:padding="16dp">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/dateDay" android:id="@+id/dateDay"
style="@style/PokerAnalyticsTheme.TextView.SessionRow.Date" style="@style/PokerAnalyticsTheme.TextView.SessionRow.Date"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAllCaps="true" android:textAllCaps="true"
app:layout_constraintBottom_toTopOf="@+id/dateNumber" app:layout_constraintBottom_toTopOf="@+id/dateNumber"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="@+id/guidelineStart"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="spread" app:layout_constraintVertical_chainStyle="packed"
tools:text="THU" /> tools:text="THU" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
@ -24,6 +24,7 @@
style="@style/PokerAnalyticsTheme.TextView.SessionRow.DateNumber" style="@style/PokerAnalyticsTheme.TextView.SessionRow.DateNumber"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/dateDay" app:layout_constraintEnd_toEndOf="@+id/dateDay"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
@ -37,9 +38,11 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
app:layout_constraintBottom_toTopOf="@+id/gameInfo" app:layout_constraintBottom_toTopOf="@+id/gameInfo"
app:layout_constraintEnd_toStartOf="@+id/linearLayout" app:layout_constraintEnd_toStartOf="@+id/linearLayout"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/dateDay" app:layout_constraintStart_toEndOf="@+id/dateDay"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" app:layout_constraintVertical_chainStyle="packed"
@ -50,11 +53,11 @@
style="@style/PokerAnalyticsTheme.TextView.SessionRow.Subtitle" style="@style/PokerAnalyticsTheme.TextView.SessionRow.Subtitle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/linearLayout" app:layout_constraintEnd_toStartOf="@+id/linearLayout"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@+id/gameType" app:layout_constraintStart_toStartOf="@+id/gameType"
app:layout_constraintTop_toBottomOf="@+id/gameType" app:layout_constraintTop_toBottomOf="@+id/gameType"
tools:text="Settings of this game" /> tools:text="Settings of this game" />
@ -65,9 +68,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@+id/gameInfo"
app:layout_constraintEnd_toStartOf="@+id/nextArrow" app:layout_constraintEnd_toStartOf="@+id/nextArrow"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="@+id/gameType">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/gameResult" android:id="@+id/gameResult"
@ -85,8 +88,22 @@
android:src="@drawable/ic_arrow_right" android:src="@drawable/ic_arrow_right"
android:tint="@color/gray_light" android:tint="@color/gray_light"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="@+id/guidelineEnd"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="8dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -2,25 +2,36 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container" android:id="@+id/rowTitle.container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?selectableItemBackground" android:background="?selectableItemBackground">
android:padding="16dp">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title" android:id="@+id/rowTitle.title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginTop="16dp"
android:layout_marginTop="8dp" android:layout_marginBottom="16dp"
android:layout_marginEnd="8dp" android:textSize="16sp"
android:layout_marginBottom="8dp"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="@+id/guidelineEnd"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="@+id/guidelineStart"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="Data Type Title" /> tools:text="Data Type Title" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="16dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -2,39 +2,71 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container" android:id="@+id/rowTitleValue.container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?selectableItemBackground" android:background="?selectableItemBackground">
android:paddingStart="16dp"
android:paddingEnd="16dp">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title" android:id="@+id/rowTitleValue.title"
style="@style/PokerAnalyticsTheme.TextView.RowTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
style="@style/PokerAnalyticsTheme.TextView.RowTitle" app:layout_constraintBottom_toTopOf="@+id/rowTitleValue.separator"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="@+id/guidelineStart"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="Title" /> tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/value" android:id="@+id/rowTitleValue.value"
style="@style/PokerAnalyticsTheme.TextView.RowValue"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:ellipsize="end" android:ellipsize="end"
android:gravity="end" android:gravity="end"
android:maxLines="1" android:maxLines="1"
style="@style/PokerAnalyticsTheme.TextView.RowValue" app:layout_constraintBottom_toTopOf="@+id/rowTitleValue.separator"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="@+id/guidelineEnd"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/rowTitleValue.title"
app:layout_constraintStart_toEndOf="@+id/title"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="Value" /> tools:text="Value" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="16dp" />
<FrameLayout
android:id="@+id/rowTitleValue.separator"
android:layout_width="0dp"
android:layout_height="16dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:visibility="visible">
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_gravity="center"
android:background="@color/kaki" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -2,15 +2,13 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container" android:id="@+id/rowTitleValueAction.container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?selectableItemBackground" android:background="?selectableItemBackground">
android:paddingStart="24dp"
android:paddingEnd="24dp">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title" android:id="@+id/rowTitleValueAction.title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
@ -18,12 +16,12 @@
android:textSize="18sp" android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="@+id/guidelineStart"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="Title" /> tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/value" android:id="@+id/rowTitleValueAction.value"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
@ -32,23 +30,38 @@
android:maxLines="1" android:maxLines="1"
android:textSize="14sp" android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/action" app:layout_constraintEnd_toStartOf="@+id/rowTitleValueAction.action"
app:layout_constraintStart_toEndOf="@+id/title" app:layout_constraintStart_toEndOf="@+id/rowTitleValueAction.title"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="Value" /> tools:text="Value" />
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/action" android:id="@+id/rowTitleValueAction.action"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="32dp" android:layout_height="32dp"
android:layout_marginStart="16dp"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:padding="4dp" android:padding="4dp"
android:layout_marginStart="16dp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="@+id/guidelineEnd"
app:layout_constraintStart_toEndOf="@+id/rowTitleValueAction.value"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@+id/value"
tools:src="@drawable/ic_close" /> tools:src="@drawable/ic_close" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guidelineEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="16dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -23,6 +23,7 @@
<color name="green_darkest">#101911</color> <color name="green_darkest">#101911</color>
<color name="green_darkest_soft">#151c15</color> <color name="green_darkest_soft">#151c15</color>
<color name="green_darkest_softer">#1b1f1b</color> <color name="green_darkest_softer">#1b1f1b</color>
<color name="green_header">#141714</color>
<color name="kaki">#3b4a39</color> <color name="kaki">#3b4a39</color>
<color name="kaki_medium">#57815a</color> <color name="kaki_medium">#57815a</color>

Loading…
Cancel
Save