Create the ActionReadRow and the extension to compact a list of ComputedAction into a list of ActionReadRow
parent
95d8e0e229
commit
d986378ffe
@ -0,0 +1,12 @@ |
|||||||
|
package net.pokeranalytics.android.ui.modules.handhistory.model |
||||||
|
|
||||||
|
import net.pokeranalytics.android.model.handhistory.Position |
||||||
|
import net.pokeranalytics.android.model.realm.handhistory.Action |
||||||
|
import net.pokeranalytics.android.ui.modules.handhistory.HandRowType |
||||||
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
||||||
|
|
||||||
|
class ActionReadRow(var positions: MutableList<Position>, var action: Action.Type?, var amount: Double?) : RowRepresentable { |
||||||
|
|
||||||
|
override val viewType: Int = HandRowType.STREET.ordinal |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,28 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:orientation="horizontal" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content"> |
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView |
||||||
|
android:id="@+id/playersText" |
||||||
|
android:layout_width="0dp" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_weight="2" |
||||||
|
android:layout_marginStart="8dp" /> |
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView |
||||||
|
android:id="@+id/actionText" |
||||||
|
android:layout_width="0dp" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_weight="1" |
||||||
|
android:layout_marginStart="8dp" /> |
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView |
||||||
|
android:id="@+id/amountText" |
||||||
|
android:layout_width="0dp" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_weight="1" |
||||||
|
android:layout_marginStart="8dp" /> |
||||||
|
|
||||||
|
</LinearLayout> |
||||||
Loading…
Reference in new issue