Progress made on the player selection

hh
Laurent 6 years ago
parent 44d1c5fa03
commit ea6b0a29d5
  1. 30
      app/src/main/java/net/pokeranalytics/android/ui/activity/DataListActivity.kt
  2. 7
      app/src/main/java/net/pokeranalytics/android/ui/activity/components/BaseActivity.kt
  3. 1
      app/src/main/java/net/pokeranalytics/android/ui/activity/components/Codes.kt
  4. 41
      app/src/main/java/net/pokeranalytics/android/ui/fragment/DataListFragment.kt
  5. 50
      app/src/main/java/net/pokeranalytics/android/ui/fragment/DataSelectionDialogFragment.kt
  6. 16
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryAdapter.kt
  7. 37
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryFragment.kt
  8. 19
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/HandHistoryViewModel.kt
  9. 2
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/PlayerSetupRow.kt
  10. 2
      app/src/main/java/net/pokeranalytics/android/ui/view/PlayerImageView.kt
  11. 12
      app/src/main/res/drawable/circle.xml
  12. 13
      app/src/main/res/layout/activity_data_list.xml
  13. 13
      app/src/main/res/layout/fragment_data_selection_dialog.xml
  14. 15
      app/src/main/res/layout/row_hhsettings_player_setup.xml
  15. 2
      app/src/main/res/values/colors.xml
  16. 6
      app/src/main/res/values/styles.xml

@ -4,10 +4,12 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import kotlinx.android.synthetic.main.activity_data_list.*
import net.pokeranalytics.android.R import net.pokeranalytics.android.R
import net.pokeranalytics.android.model.LiveData
import net.pokeranalytics.android.ui.activity.components.BaseActivity import net.pokeranalytics.android.ui.activity.components.BaseActivity
import net.pokeranalytics.android.ui.activity.components.RequestCode
import net.pokeranalytics.android.ui.fragment.DataListFragment import net.pokeranalytics.android.ui.fragment.DataListFragment
import net.pokeranalytics.android.ui.fragment.DataSelectionDialogFragment
import net.pokeranalytics.android.ui.interfaces.FilterActivityRequestCode import net.pokeranalytics.android.ui.interfaces.FilterActivityRequestCode
class DataListActivity : BaseActivity() { class DataListActivity : BaseActivity() {
@ -17,6 +19,7 @@ class DataListActivity : BaseActivity() {
LIVE_DATA_TYPE("LIVE_DATA_TYPE"), LIVE_DATA_TYPE("LIVE_DATA_TYPE"),
ITEM_DELETED("ITEM_DELETED"), ITEM_DELETED("ITEM_DELETED"),
SHOW_ADD_BUTTON("SHOW_ADD_BUTTON"), SHOW_ADD_BUTTON("SHOW_ADD_BUTTON"),
SELECTION_DIALOG("DIALOG")
} }
companion object { companion object {
@ -29,10 +32,16 @@ class DataListActivity : BaseActivity() {
fragment.startActivityForResult(getIntent(context, dataType, showAddButton), FilterActivityRequestCode.SELECT_FILTER.ordinal) fragment.startActivityForResult(getIntent(context, dataType, showAddButton), FilterActivityRequestCode.SELECT_FILTER.ordinal)
} }
private fun getIntent(context: Context, dataType: Int, showAddButton: Boolean = true): Intent { fun newSelectionDialogInstance(fragment: Fragment, dataType: LiveData) {
val context = fragment.requireContext()
fragment.startActivityForResult(getIntent(context, dataType.ordinal, false, true), RequestCode.PLAYER_SELECTION.ordinal)
}
private fun getIntent(context: Context, dataType: Int, showAddButton: Boolean = true, dialog: Boolean = false): Intent {
val intent = Intent(context, DataListActivity::class.java) val intent = Intent(context, DataListActivity::class.java)
intent.putExtra(IntentKey.DATA_TYPE.keyName, dataType) intent.putExtra(IntentKey.DATA_TYPE.keyName, dataType)
intent.putExtra(IntentKey.SHOW_ADD_BUTTON.keyName, showAddButton) intent.putExtra(IntentKey.SHOW_ADD_BUTTON.keyName, showAddButton)
intent.putExtra(IntentKey.SELECTION_DIALOG.keyName, dialog)
return intent return intent
} }
} }
@ -50,9 +59,20 @@ class DataListActivity : BaseActivity() {
private fun initUI() { private fun initUI() {
val dataType = intent.getIntExtra(IntentKey.DATA_TYPE.keyName, 0) val dataType = intent.getIntExtra(IntentKey.DATA_TYPE.keyName, 0)
val showAddButton = intent.getBooleanExtra(IntentKey.SHOW_ADD_BUTTON.keyName, true) val showAddButton = intent.getBooleanExtra(IntentKey.SHOW_ADD_BUTTON.keyName, true)
val fragment = dataListFragment as DataListFragment val dialog = intent.getBooleanExtra(IntentKey.SELECTION_DIALOG.keyName, true)
fragment.setData(dataType)
fragment.updateUI(showAddButton) if (dialog) {
val dataSelectionDialogFragment = DataSelectionDialogFragment.newInstance(dataType)
this.showFragment(dataSelectionDialogFragment, R.id.container)
} else {
val dataListFragment = DataListFragment()
dataListFragment.setData(dataType)
dataListFragment.updateUI(showAddButton)
}
// val fragment = dataListFragment as DataListFragment
// fragment.setData(dataType)
// fragment.updateUI(showAddButton)
} }
} }

@ -9,6 +9,7 @@ import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import com.crashlytics.android.Crashlytics import com.crashlytics.android.Crashlytics
import com.google.android.libraries.places.api.model.PlaceLikelihood import com.google.android.libraries.places.api.model.PlaceLikelihood
import io.realm.Realm import io.realm.Realm
@ -101,6 +102,12 @@ abstract class BaseActivity : AppCompatActivity() {
return super.onOptionsItemSelected(item) return super.onOptionsItemSelected(item)
} }
fun showFragment(fragment: Fragment, containerId: Int) {
val fragmentTransaction = supportFragmentManager.beginTransaction()
fragmentTransaction.add(containerId, fragment)
fragmentTransaction.commit()
}
/** /**
* Return the realm instance * Return the realm instance
*/ */

@ -4,6 +4,7 @@ enum class RequestCode(var value: Int) {
DEFAULT(1), DEFAULT(1),
FEED_MENU(100), FEED_MENU(100),
FEED_TRANSACTION_DETAILS(101), FEED_TRANSACTION_DETAILS(101),
PLAYER_SELECTION(200),
BANKROLL_DETAILS(700), BANKROLL_DETAILS(700),
BANKROLL_CREATE(701), BANKROLL_CREATE(701),
BANKROLL_EDIT(702), BANKROLL_EDIT(702),

@ -44,7 +44,12 @@ open class DataListFragment : DeletableItemFragment(), LiveRowRepresentableDataS
private var dataListMenu: Menu? = null private var dataListMenu: Menu? = null
private var searchView: SearchView? = null private var searchView: SearchView? = null
var isSearchable: Boolean = false /***
* Returns the selected item on row selection
*/
private var isSelectionInstance: Boolean = false
private var isSearchable: Boolean = false
set(value) { set(value) {
field = value field = value
val searchMenuItem = dataListMenu?.findItem(R.id.action_search) val searchMenuItem = dataListMenu?.findItem(R.id.action_search)
@ -94,7 +99,7 @@ open class DataListFragment : DeletableItemFragment(), LiveRowRepresentableDataS
setDisplayHomeAsUpEnabled(true) setDisplayHomeAsUpEnabled(true)
val viewManager = LinearLayoutManager(requireContext()) val viewManager = LinearLayoutManager(requireContext())
dataListAdapter = RowRepresentableAdapter(this, this) this.dataListAdapter = RowRepresentableAdapter(this, this)
val swipeToDelete = SwipeToDeleteCallback(dataListAdapter) { position -> val swipeToDelete = SwipeToDeleteCallback(dataListAdapter) { position ->
val item = this.items[position] val item = this.items[position]
@ -169,18 +174,28 @@ open class DataListFragment : DeletableItemFragment(), LiveRowRepresentableDataS
override fun onRowSelected(position: Int, row: RowRepresentable, tag: Int) { override fun onRowSelected(position: Int, row: RowRepresentable, tag: Int) {
when (this.dataType) { if (this.isSelectionInstance) {
LiveData.FILTER -> { val identifier = (row as Identifiable).id
val intent = Intent() val intent = Intent()
intent.putExtra(FiltersActivity.IntentKey.FILTER_ID.keyName, (row as Filter).id) intent.putExtra(BundleKey.PRIMARY_KEY.value, identifier)
activity?.setResult(Activity.RESULT_OK, intent) this.activity?.setResult(Activity.RESULT_OK, intent)
activity?.finish() this.activity?.finish()
} } else {
else -> {
val identifier = (row as Identifiable).id when (this.dataType) {
EditableDataActivity.newInstanceForResult(this, this.dataType, identifier, REQUEST_CODE_DETAILS) LiveData.FILTER -> {
val intent = Intent()
intent.putExtra(FiltersActivity.IntentKey.FILTER_ID.keyName, (row as Filter).id)
activity?.setResult(Activity.RESULT_OK, intent)
activity?.finish()
}
else -> {
val identifier = (row as Identifiable).id
EditableDataActivity.newInstanceForResult(this, this.dataType, identifier, REQUEST_CODE_DETAILS)
}
} }
} }
} }
/** /**
@ -195,7 +210,7 @@ open class DataListFragment : DeletableItemFragment(), LiveRowRepresentableDataS
*/ */
private fun filterItemsWithSearch(searchContent: String?) { private fun filterItemsWithSearch(searchContent: String?) {
this.items = getRealm().find(this.identifiableClass, searchContent) this.items = getRealm().find(this.identifiableClass, searchContent)
dataListAdapter.notifyDataSetChanged() this.dataListAdapter.notifyDataSetChanged()
} }
} }

@ -1,2 +1,52 @@
package net.pokeranalytics.android.ui.fragment package net.pokeranalytics.android.ui.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import kotlinx.android.synthetic.main.fragment_data_selection_dialog.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.PAIllegalStateException
class DataSelectionDialogFragment : DialogFragment() {
private enum class BundleKey(var value: String) {
DATA_TYPE("data_type")
}
companion object {
fun newInstance(dataType: Int): DataSelectionDialogFragment {
val df = DataSelectionDialogFragment()
val bundle = Bundle()
bundle.putSerializable(BundleKey.DATA_TYPE.value, dataType)
df.arguments = bundle
return df
}
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
super.onCreateView(inflater, container, savedInstanceState)
return inflater.inflate(R.layout.fragment_data_selection_dialog, container, false)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
initDataListFragment()
}
private fun initDataListFragment() {
val dataListFragment = this.dataListFragment as DataListFragment
val dataType = this.arguments?.getInt(BundleKey.DATA_TYPE.value) ?: throw PAIllegalStateException("undefined datatype")
dataListFragment.setData(dataType)
}
}

@ -503,8 +503,11 @@ class HandHistoryAdapter(
init { init {
itemView.ps_player_button.tag = PlayerSetupRow.Tag.PLAYER.ordinal itemView.playerImage.tag = PlayerSetupRow.Tag.PLAYER.ordinal
setOnClickListener(itemView.ps_player_button)
// itemView.ps_player_button.pointerIcon =
// itemView.ps_player_button.ti = itemView.resources.getDrawable(R.drawable.circle, null)
// setOnItemClickListener(itemView.playerImage)
itemView.stack_edit_text.tag = PlayerSetupRow.Tag.STACK.ordinal itemView.stack_edit_text.tag = PlayerSetupRow.Tag.STACK.ordinal
itemView.stack_edit_text.inputType = InputType.TYPE_NUMBER_FLAG_DECIMAL itemView.stack_edit_text.inputType = InputType.TYPE_NUMBER_FLAG_DECIMAL
@ -525,6 +528,15 @@ class HandHistoryAdapter(
val setupRow = row as PlayerSetupRow val setupRow = row as PlayerSetupRow
val state = setupRow.state val state = setupRow.state
// Player
val listener = View.OnClickListener {
delegate?.onItemClick(position, row, itemView.playerImage.tag as Int)
}
itemView.playerImage.setOnImageClickListener(listener)
row.playerSetup?.player?.let { player ->
itemView.playerImage.setPlayer(player, isClickable = true)
}
// Title // Title
itemView.title.text = setupRow.title(itemView.context) itemView.title.text = setupRow.title(itemView.context)
val visibility = if (state == PlayerSetupRow.State.SETUP_ONLY && !setupRow.hero) View.GONE else View.VISIBLE val visibility = if (state == PlayerSetupRow.State.SETUP_ONLY && !setupRow.hero) View.GONE else View.VISIBLE

@ -13,11 +13,15 @@ import kotlinx.android.synthetic.main.fragment_hand_history.*
import kotlinx.android.synthetic.main.fragment_settings.recyclerView import kotlinx.android.synthetic.main.fragment_settings.recyclerView
import net.pokeranalytics.android.R import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.PAIllegalStateException import net.pokeranalytics.android.exceptions.PAIllegalStateException
import net.pokeranalytics.android.model.LiveData
import net.pokeranalytics.android.model.handhistory.HandSetup import net.pokeranalytics.android.model.handhistory.HandSetup
import net.pokeranalytics.android.model.handhistory.Position import net.pokeranalytics.android.model.handhistory.Position
import net.pokeranalytics.android.model.realm.Player
import net.pokeranalytics.android.model.realm.handhistory.Action import net.pokeranalytics.android.model.realm.handhistory.Action
import net.pokeranalytics.android.model.realm.handhistory.Card import net.pokeranalytics.android.model.realm.handhistory.Card
import net.pokeranalytics.android.model.realm.handhistory.HandHistory import net.pokeranalytics.android.model.realm.handhistory.HandHistory
import net.pokeranalytics.android.ui.activity.DataListActivity
import net.pokeranalytics.android.ui.activity.components.RequestCode
import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate
import net.pokeranalytics.android.ui.extensions.px import net.pokeranalytics.android.ui.extensions.px
import net.pokeranalytics.android.ui.fragment.components.RealmFragment import net.pokeranalytics.android.ui.fragment.components.RealmFragment
@ -91,15 +95,15 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
val handHistoryId = this.arguments?.getString(BundleKey.PRIMARY_KEY.value) val handHistoryId = this.arguments?.getString(BundleKey.PRIMARY_KEY.value)
handHistoryId?.let { handHistoryId?.let {
this.setEditing(false)
val handHistory = getRealm().findById<HandHistory>(it) val handHistory = getRealm().findById<HandHistory>(it)
?: throw PAIllegalStateException("HandHistory not found") ?: throw PAIllegalStateException("HandHistory not found")
this.model.setHandHistory(handHistory) this.model.setHandHistory(handHistory)
this.setEditing(false)
} ?: run { } ?: run {
this.setEditing(true)
getRealm().executeTransaction { getRealm().executeTransaction {
this.model.createNewHandHistory(it, HandSetup()) this.model.createNewHandHistory(it, HandSetup())
} }
this.setEditing(true)
} }
} }
@ -182,6 +186,21 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
super.onCreateOptionsMenu(menu, inflater) super.onCreateOptionsMenu(menu, inflater)
} }
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
when (requestCode) {
RequestCode.PLAYER_SELECTION.ordinal -> {
val playerId = data?.getStringExtra(BundleKey.PRIMARY_KEY.value) ?: throw PAIllegalStateException("Primary key not set where as activity has finished")
getRealm().findById<Player>(playerId)?.let { player ->
this.model.playerSelected(player)
} ?: throw PAIllegalStateException("Player (id=$playerId) not found")
this.handHistoryAdapter.notifyDataSetChanged()
}
}
}
/** /**
* Update menu UI * Update menu UI
*/ */
@ -215,8 +234,6 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
*/ */
private fun retrieveEditTextInputConnection(selection: HHSelection) { private fun retrieveEditTextInputConnection(selection: HHSelection) {
// throw PAIllegalStateException("I believe this should not happen any more")
val handRow = this.model.rowRepresentableForPosition(selection.index) as? HandHistoryRow val handRow = this.model.rowRepresentableForPosition(selection.index) as? HandHistoryRow
val holder = recyclerView.findViewHolderForAdapterPosition(selection.index) as? HandHistoryAdapter.RowHandHolder val holder = recyclerView.findViewHolderForAdapterPosition(selection.index) as? HandHistoryAdapter.RowHandHolder
@ -358,7 +375,8 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
is PlayerSetupRow -> { is PlayerSetupRow -> {
when (tag) { when (tag) {
PlayerSetupRow.Tag.PLAYER.ordinal -> { PlayerSetupRow.Tag.PLAYER.ordinal -> {
showPlayerSelectionFragment() this.model.clickPosition = position
DataListActivity.newSelectionDialogInstance(this, LiveData.PLAYER)
} }
else -> { else -> {
Timber.d("onItemClick not configured for row: $row, position: $position, tag: $tag") Timber.d("onItemClick not configured for row: $row, position: $position, tag: $tag")
@ -367,15 +385,6 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL
} }
} }
}
/***
* Shows a window allowing a player selection
*/
private fun showPlayerSelectionFragment() {
} }
/*** /***

@ -10,6 +10,7 @@ import net.pokeranalytics.android.exceptions.PAIllegalStateException
import net.pokeranalytics.android.model.handhistory.HandSetup import net.pokeranalytics.android.model.handhistory.HandSetup
import net.pokeranalytics.android.model.handhistory.Position import net.pokeranalytics.android.model.handhistory.Position
import net.pokeranalytics.android.model.handhistory.Street import net.pokeranalytics.android.model.handhistory.Street
import net.pokeranalytics.android.model.realm.Player
import net.pokeranalytics.android.model.realm.Session import net.pokeranalytics.android.model.realm.Session
import net.pokeranalytics.android.model.realm.handhistory.* import net.pokeranalytics.android.model.realm.handhistory.*
import net.pokeranalytics.android.ui.adapter.RowRepresentableDataSource import net.pokeranalytics.android.ui.adapter.RowRepresentableDataSource
@ -121,6 +122,11 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
*/ */
private var firstStraddlePosition: Position? = null private var firstStraddlePosition: Position? = null
/***
* The position of a click
*/
var clickPosition: Int? = null
/*** /***
* The board cards sorted by position * The board cards sorted by position
*/ */
@ -917,4 +923,17 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra
this.sortedActions.updateBigBlindRemainingStack() this.sortedActions.updateBigBlindRemainingStack()
} }
fun playerSelected(player: Player) {
this.clickPosition?.let { position ->
when (val row = this.rowRepresentables[position]) {
is PlayerSetupRow -> {
val playerSetup = row.playerSetup ?: this.handHistory.createPlayerSetup(position)
playerSetup.player = player
}
}
} ?: throw PAIllegalStateException("Click position not set for player selection")
}
} }

@ -60,7 +60,6 @@ class PlayerSetupRow(var hero: Boolean = false,
} }
} }
override val viewType: Int override val viewType: Int
get() { get() {
return if (this.readMode) { return if (this.readMode) {
@ -84,6 +83,7 @@ class PlayerSetupRow(var hero: Boolean = false,
override fun keyboardForTag(tag: Int): HHKeyboard? { override fun keyboardForTag(tag: Int): HHKeyboard? {
return when (tag) { return when (tag) {
Tag.PLAYER.ordinal -> null
Tag.POSITION.ordinal -> null Tag.POSITION.ordinal -> null
Tag.HAND.ordinal -> HHKeyboard.CARD Tag.HAND.ordinal -> HHKeyboard.CARD
Tag.STACK.ordinal -> HHKeyboard.AMOUNT Tag.STACK.ordinal -> HHKeyboard.AMOUNT

@ -20,7 +20,7 @@ import net.pokeranalytics.android.ui.extensions.px
/** /**
* Display a row session * A class managing the display of a Player
*/ */
class PlayerImageView : FrameLayout { class PlayerImageView : FrameLayout {

@ -1,11 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"> android:shape="oval">
<solid android:color="@color/green" /> <!-- <solid android:color="@color/black" />-->
<stroke android:color="@color/kaki_light" android:width="2dp"/>
<solid android:color="@color/transparent"/>
<size <size
android:width="32dp" android:width="48dp"
android:height="32dp" /> android:height="48dp"/>
</shape> </shape>

@ -3,13 +3,14 @@
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="match_parent" android:layout_height="match_parent"
android:id="@+id/container"
android:orientation="vertical"> android:orientation="vertical">
<fragment <!-- <fragment-->
android:id="@+id/dataListFragment" <!-- android:id="@+id/dataListFragment"-->
android:name="net.pokeranalytics.android.ui.fragment.DataListFragment" <!-- android:name="net.pokeranalytics.android.ui.fragment.DataListFragment"-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_height="match_parent" <!-- android:layout_height="match_parent"-->
tools:layout="@layout/fragment_data_list" /> <!-- tools:layout="@layout/fragment_data_list" />-->
</LinearLayout> </LinearLayout>

@ -1,6 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
</LinearLayout> <fragment
android:id="@+id/dataListFragment"
android:name="net.pokeranalytics.android.ui.fragment.DataListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -21,14 +22,14 @@
<LinearLayout <LinearLayout
android:id="@+id/settings_container" android:id="@+id/settings_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_marginStart="8dp">
<com.google.android.material.button.MaterialButton <net.pokeranalytics.android.ui.view.PlayerImageView
android:id="@+id/ps_player_button" android:id="@+id/playerImage"
style="@style/PokerAnalyticsTheme.HHButton" android:layout_width="48dp"
android:layout_width="44dp" android:layout_height="48dp"
android:layout_height="44dp" android:background="@android:color/transparent" />
android:layout_marginStart="8dp"/>
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/position_button" android:id="@+id/position_button"

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="transparent">#00FFFFFF</color>
<color name="colorPrimary">#141414</color> <color name="colorPrimary">#141414</color>
<color name="colorPrimaryDark">#0A0A0A</color> <color name="colorPrimaryDark">#0A0A0A</color>
<color name="colorAccent">#58C473</color> <color name="colorAccent">#58C473</color>

@ -359,6 +359,12 @@
<item name="backgroundTint">@color/kaki</item> <item name="backgroundTint">@color/kaki</item>
</style> </style>
<style name="PokerAnalyticsTheme.PlayerButton">
<!-- <item name="android:backgroundTint">@color/kaki_light</item>-->
<!-- <item name="android:background">@drawable/circle</item>-->
<!-- <item name="android:tint">@color/kaki_light</item>-->
</style>
<style name="PokerAnalyticsTheme.SingleCharacterButton"> <style name="PokerAnalyticsTheme.SingleCharacterButton">
<item name="android:fontFamily">@font/roboto_medium</item> <item name="android:fontFamily">@font/roboto_medium</item>
<item name="android:textColor">@color/white</item> <item name="android:textColor">@color/white</item>

Loading…
Cancel
Save