Merge branch 'master' of gitlab.com:stax-river/poker-analytics

feature/top10
Laurent 7 years ago
commit 1579029176
  1. 17
      app/src/main/java/net/pokeranalytics/android/ui/view/RowViewType.kt
  2. 39
      app/src/main/res/layout/row_stats_title_value.xml
  3. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  4. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  5. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  6. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  7. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png

@ -11,7 +11,6 @@ import androidx.core.view.isVisible
import androidx.core.widget.ContentLoadingProgressBar import androidx.core.widget.ContentLoadingProgressBar
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.row_history_session.view.* import kotlinx.android.synthetic.main.row_history_session.view.*
import kotlinx.android.synthetic.main.row_stats_title_value.view.*
import net.pokeranalytics.android.R import net.pokeranalytics.android.R
import net.pokeranalytics.android.model.realm.Session import net.pokeranalytics.android.model.realm.Session
import net.pokeranalytics.android.ui.adapter.RowRepresentableAdapter import net.pokeranalytics.android.ui.adapter.RowRepresentableAdapter
@ -195,15 +194,23 @@ enum class RowViewType(private var layoutRes: Int) {
inner class StatsTitleValueViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), inner class StatsTitleValueViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView),
BindableHolder { BindableHolder {
override fun bind(position: Int, row: RowRepresentable, adapter: RowRepresentableAdapter) { override fun bind(position: Int, row: RowRepresentable, adapter: RowRepresentableAdapter) {
itemView.rowStatsTitleValue_title.text = row.localizedTitle(itemView.context)
// Title
itemView.findViewById<AppCompatTextView?>(R.id.title)?.text = row.localizedTitle(itemView.context)
// Value
itemView.findViewById<AppCompatTextView?>(R.id.value)?.let {view ->
adapter.dataSource.contentDescriptorForRow(row)?.textFormat?.let { adapter.dataSource.contentDescriptorForRow(row)?.textFormat?.let {
itemView.rowStatsTitleValue_value.text = it.text view.text = it.text
itemView.rowStatsTitleValue_value.setTextColor(it.getColor(itemView.context)) view.setTextColor(it.getColor(itemView.context))
} }
}
// Listener
val listener = View.OnClickListener { val listener = View.OnClickListener {
adapter.delegate?.onRowSelected(position, row) adapter.delegate?.onRowSelected(position, row)
} }
itemView.rowStatsTitleValue_container.setOnClickListener(listener) itemView.findViewById<View?>(R.id.container)?.setOnClickListener(listener)
} }
} }

@ -1,19 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat 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/rowStatsTitleValue.container" android:id="@+id/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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?selectableItemBackground"> android:background="?selectableItemBackground">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/rowStatsTitleValue.title" android:id="@+id/title"
style="@style/PokerAnalyticsTheme.TextView.RowStatsTitle" style="@style/PokerAnalyticsTheme.TextView.RowStatsTitle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -25,7 +20,7 @@
tools:text="Title" /> tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/rowStatsTitleValue.value" android:id="@+id/value"
style="@style/PokerAnalyticsTheme.TextView.RowStatsValue" style="@style/PokerAnalyticsTheme.TextView.RowStatsValue"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -34,10 +29,10 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/nextArrow" app:layout_constraintEnd_toStartOf="@+id/nextArrow"
app:layout_constraintStart_toStartOf="@+id/guidelineStart" app:layout_constraintStart_toStartOf="@+id/guidelineStart"
app:layout_constraintTop_toBottomOf="@+id/rowStatsTitleValue.title" app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="Value" /> tools:text="Value" />
<ImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/nextArrow" android:id="@+id/nextArrow"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
@ -63,25 +58,3 @@
app:layout_constraintGuide_end="16dp" /> app:layout_constraintGuide_end="16dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/rowStatsTitleValue.separator"
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"
tools:visibility="gone">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@color/kaki" />
</FrameLayout>
</androidx.appcompat.widget.LinearLayoutCompat>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Loading…
Cancel
Save