Layout improvements

hh
Laurent 6 years ago
parent e29e60576a
commit 1e73c0ec4b
  1. 1
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt
  2. 8
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt
  3. 7
      app/src/main/res/layout/row_hand_action_read.xml

@ -432,7 +432,6 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
getRealm().executeTransaction { getRealm().executeTransaction {
this.model.amountValidated() this.model.amountValidated()
} }
// this.handHistoryAdapter.notifyDataSetChanged()
this.findNextActionToEdit(userInitiated = true) this.findNextActionToEdit(userInitiated = true)
} }

@ -227,6 +227,7 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
rows.add(HandRowType.BIG_BLIND_ANTE) rows.add(HandRowType.BIG_BLIND_ANTE)
} }
rows.add(CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = R.string.players, value = ""))
this.readPlayerSetups().forEach { this.readPlayerSetups().forEach {
rows.add(it) rows.add(it)
} }
@ -293,14 +294,13 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
// Used to set the hero position // Used to set the hero position
rows.add(HandRowType.HERO_POSITION) rows.add(HandRowType.HERO_POSITION)
rows.add(CustomizableRowRepresentable(customViewType = HandRowType.HEADER, resId = R.string.players, value = ""))
// Used to select an available position to set details for that position // Used to select an available position to set details for that position
if (this.handHistory.playerSetups.size < this.handHistory.numberOfPlayers) { if (this.handHistory.playerSetups.size < this.handHistory.numberOfPlayers) {
rows.add(HandRowType.PLAYER_POSITION) rows.add(HandRowType.PLAYER_POSITION)
} }
rows.addAll(this.playerSetups())
this.playerSetups().forEach {
rows.add(it)
}
Street.values().forEach { street -> Street.values().forEach { street ->

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="52dp">
<net.pokeranalytics.android.ui.view.PlayerImageView <net.pokeranalytics.android.ui.view.PlayerImageView
android:id="@+id/player_image_rhar" android:id="@+id/player_image_rhar"
@ -17,7 +17,7 @@
style="@style/PokerAnalyticsTheme.TextView.RowTitle" style="@style/PokerAnalyticsTheme.TextView.RowTitle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="2" android:layout_weight="1.5"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:gravity="center_vertical" android:gravity="center_vertical"
tools:text="BB" tools:text="BB"
@ -30,6 +30,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:gravity="center_vertical"
tools:text="raises"/> tools:text="raises"/>
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
@ -40,7 +41,7 @@
android:layout_weight="1" android:layout_weight="1"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:gravity="end" android:gravity="end|center_vertical"
tools:text="120" /> tools:text="120" />
</LinearLayout> </LinearLayout>
Loading…
Cancel
Save