commit
1680e9ceb7
@ -0,0 +1,52 @@ |
|||||||
|
package net.pokeranalytics.android.ui.activity |
||||||
|
|
||||||
|
import android.content.Context |
||||||
|
import android.content.Intent |
||||||
|
import android.os.Bundle |
||||||
|
import io.realm.Realm |
||||||
|
import io.realm.kotlin.where |
||||||
|
import kotlinx.android.synthetic.main.activity_data_list.* |
||||||
|
import net.pokeranalytics.android.R |
||||||
|
import net.pokeranalytics.android.model.realm.Session |
||||||
|
import net.pokeranalytics.android.ui.fragment.DataListFragment |
||||||
|
import net.pokeranalytics.android.util.PokerAnalyticsActivity |
||||||
|
import net.pokeranalytics.android.util.data.sessionDao |
||||||
|
import java.util.* |
||||||
|
|
||||||
|
class DataListActivity : PokerAnalyticsActivity() { |
||||||
|
|
||||||
|
companion object { |
||||||
|
fun newInstance(context: Context, dataType: Int) { |
||||||
|
val intent = Intent(context, DataListActivity::class.java) |
||||||
|
intent.putExtra("dataType", dataType) |
||||||
|
context.startActivity(intent) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) { |
||||||
|
super.onCreate(savedInstanceState) |
||||||
|
setContentView(R.layout.activity_data_list) |
||||||
|
|
||||||
|
initUI() |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init UI |
||||||
|
*/ |
||||||
|
private fun initUI() { |
||||||
|
|
||||||
|
val dataType = intent.getIntExtra("dataType", 0) |
||||||
|
val fragment = dataListFragment as DataListFragment |
||||||
|
fragment.setData(dataType) |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init data |
||||||
|
*/ |
||||||
|
private fun initData() { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -1,46 +0,0 @@ |
|||||||
package net.pokeranalytics.android.ui.activity |
|
||||||
|
|
||||||
import android.content.Context |
|
||||||
import android.content.Intent |
|
||||||
import android.os.Bundle |
|
||||||
import net.pokeranalytics.android.R |
|
||||||
import net.pokeranalytics.android.util.PokerAnalyticsActivity |
|
||||||
|
|
||||||
class DataManagementActivity: PokerAnalyticsActivity() { |
|
||||||
|
|
||||||
companion object { |
|
||||||
fun newInstance(context: Context, dataType: Int) { |
|
||||||
val intent = Intent(context, DataManagementActivity::class.java) |
|
||||||
intent.putExtra("dataType", dataType) |
|
||||||
context.startActivity(intent) |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) { |
|
||||||
super.onCreate(savedInstanceState) |
|
||||||
// setContentView(R.layout.activity_data_management) |
|
||||||
|
|
||||||
initUI() |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* Init UI |
|
||||||
*/ |
|
||||||
private fun initUI() { |
|
||||||
|
|
||||||
val isTournament = intent.getIntExtra("dataType", 0) |
|
||||||
// val fragment = newSessionFragment as NewSessionFragment |
|
||||||
// fragment.setData(isTournament) |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* Init data |
|
||||||
*/ |
|
||||||
private fun initData() { |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -0,0 +1,51 @@ |
|||||||
|
package net.pokeranalytics.android.ui.adapter.components |
||||||
|
|
||||||
|
import android.view.LayoutInflater |
||||||
|
import android.view.View |
||||||
|
import android.view.ViewGroup |
||||||
|
import androidx.recyclerview.widget.RecyclerView |
||||||
|
import kotlinx.android.synthetic.main.row_session.view.* |
||||||
|
import net.pokeranalytics.android.R |
||||||
|
|
||||||
|
interface DataRowDelegate { |
||||||
|
fun data(position: Int) : DisplayableData |
||||||
|
fun size() : Int |
||||||
|
} |
||||||
|
|
||||||
|
interface DataRowCallback { |
||||||
|
fun onRowSelected(position: Int) |
||||||
|
} |
||||||
|
|
||||||
|
interface DisplayableData { |
||||||
|
var title: String |
||||||
|
} |
||||||
|
|
||||||
|
class DataListAdapter(var delegate: DataRowDelegate, var callBackDelegate: DataRowCallback? = null) : RecyclerView.Adapter<RecyclerView.ViewHolder>() { |
||||||
|
|
||||||
|
inner class DataViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { |
||||||
|
fun bind(row: DisplayableData, listener: View.OnClickListener) { |
||||||
|
itemView.title.text = row.title |
||||||
|
itemView.container.setOnClickListener(listener) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
override fun getItemViewType(position: Int): Int { |
||||||
|
return RowViewType.TITLE.ordinal |
||||||
|
} |
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { |
||||||
|
return DataViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_title, parent, false)) |
||||||
|
} |
||||||
|
|
||||||
|
override fun getItemCount(): Int { |
||||||
|
return delegate.size() |
||||||
|
} |
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { |
||||||
|
val listener = View.OnClickListener { |
||||||
|
callBackDelegate?.onRowSelected(position) |
||||||
|
} |
||||||
|
(holder as DataViewHolder).bind(this.delegate.data(position), listener) |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -1,157 +0,0 @@ |
|||||||
package net.pokeranalytics.android.ui.fragment |
|
||||||
|
|
||||||
import android.app.DatePickerDialog |
|
||||||
import android.os.Bundle |
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment |
|
||||||
import android.content.DialogInterface |
|
||||||
import android.view.* |
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout |
|
||||||
import kotlinx.android.synthetic.main.bottom_sheet_blinds.* |
|
||||||
import kotlinx.android.synthetic.main.bottom_sheet_date.* |
|
||||||
import kotlinx.android.synthetic.main.fragment_bottom_sheet.* |
|
||||||
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.* |
|
||||||
import net.pokeranalytics.android.ui.adapter.components.DynamicRowInterface |
|
||||||
import net.pokeranalytics.android.ui.adapter.components.EditableDataDelegate |
|
||||||
import net.pokeranalytics.android.ui.fragment.components.BottomSheetType |
|
||||||
import timber.log.Timber |
|
||||||
import android.widget.DatePicker |
|
||||||
import net.pokeranalytics.android.util.DatePickerFragment |
|
||||||
import net.pokeranalytics.android.util.TimePickerFragment |
|
||||||
import java.util.* |
|
||||||
|
|
||||||
|
|
||||||
class BottomSheetFragment : BottomSheetDialogFragment() { |
|
||||||
|
|
||||||
private var row: DynamicRowInterface? = null |
|
||||||
private var valueDelegate: EditableDataDelegate? = null |
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
|
||||||
|
|
||||||
val view = inflater.inflate( |
|
||||||
net.pokeranalytics.android.R.layout.fragment_bottom_sheet, |
|
||||||
container, |
|
||||||
false |
|
||||||
) as ConstraintLayout |
|
||||||
|
|
||||||
row?.let { |
|
||||||
when (it.bottomSheetType) { |
|
||||||
BottomSheetType.BANKROLL -> inflater.inflate( |
|
||||||
net.pokeranalytics.android.R.layout.bottom_sheet_bankroll, |
|
||||||
view.bottomSheetContainer, |
|
||||||
true |
|
||||||
) |
|
||||||
BottomSheetType.BLINDS -> inflater.inflate( |
|
||||||
net.pokeranalytics.android.R.layout.bottom_sheet_blinds, |
|
||||||
view.bottomSheetContainer, |
|
||||||
true |
|
||||||
) |
|
||||||
BottomSheetType.DATE -> inflater.inflate( |
|
||||||
net.pokeranalytics.android.R.layout.bottom_sheet_date, |
|
||||||
view.bottomSheetContainer, |
|
||||||
true |
|
||||||
) |
|
||||||
BottomSheetType.GAME -> inflater.inflate( |
|
||||||
net.pokeranalytics.android.R.layout.bottom_sheet_game, |
|
||||||
view.bottomSheetContainer, |
|
||||||
true |
|
||||||
) |
|
||||||
BottomSheetType.LOCATION -> inflater.inflate( |
|
||||||
net.pokeranalytics.android.R.layout.bottom_sheet_location, |
|
||||||
view.bottomSheetContainer, |
|
||||||
true |
|
||||||
) |
|
||||||
BottomSheetType.TABLE_SIZE -> inflater.inflate( |
|
||||||
net.pokeranalytics.android.R.layout.bottom_sheet_table_size, |
|
||||||
view.bottomSheetContainer, |
|
||||||
true |
|
||||||
) |
|
||||||
else -> { |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
return view |
|
||||||
} |
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
|
||||||
super.onViewCreated(view, savedInstanceState) |
|
||||||
initUI() |
|
||||||
} |
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) { |
|
||||||
super.onActivityCreated(savedInstanceState) |
|
||||||
// To display correctly the keyboard |
|
||||||
dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE) |
|
||||||
} |
|
||||||
|
|
||||||
override fun onStart() { |
|
||||||
super.onStart() |
|
||||||
|
|
||||||
// Open the keyboard |
|
||||||
row?.let { |
|
||||||
when (it.bottomSheetType) { |
|
||||||
BottomSheetType.BLINDS -> { |
|
||||||
smallBlind.requestFocus() |
|
||||||
} |
|
||||||
else -> { |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
override fun onDismiss(dialog: DialogInterface?) { |
|
||||||
super.onDismiss(dialog) |
|
||||||
|
|
||||||
// Return the value |
|
||||||
row?.let { |
|
||||||
valueDelegate?.setValue("Test", it) |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* Init UI |
|
||||||
*/ |
|
||||||
private fun initUI() { |
|
||||||
|
|
||||||
row?.let { |
|
||||||
//bottomSheetToolbar.title = row?.localizedTitle(requireContext()) |
|
||||||
bottomSheetToolbar.inflateMenu(net.pokeranalytics.android.R.menu.bottom_sheet_menu) |
|
||||||
bottomSheetToolbar.setOnMenuItemClickListener { |
|
||||||
false |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
row?.let { |
|
||||||
when (it.bottomSheetType) { |
|
||||||
BottomSheetType.DATE -> initDateUI() |
|
||||||
else -> {} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* Init date UI |
|
||||||
*/ |
|
||||||
private fun initDateUI() { |
|
||||||
|
|
||||||
startDate.setOnClickListener { |
|
||||||
val dateFragment = DatePickerFragment() |
|
||||||
dateFragment.show(fragmentManager, "datePicker") |
|
||||||
} |
|
||||||
|
|
||||||
endDate.setOnClickListener { |
|
||||||
val timeFragment = TimePickerFragment() |
|
||||||
timeFragment.show(fragmentManager, "timePicker") |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* Init |
|
||||||
*/ |
|
||||||
fun init(row: DynamicRowInterface, valueDelegate: EditableDataDelegate) { |
|
||||||
this.row = row |
|
||||||
this.valueDelegate = valueDelegate |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -0,0 +1,79 @@ |
|||||||
|
package net.pokeranalytics.android.ui.fragment |
||||||
|
|
||||||
|
import android.os.Bundle |
||||||
|
import android.view.LayoutInflater |
||||||
|
import android.view.View |
||||||
|
import android.view.ViewGroup |
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager |
||||||
|
import io.realm.Realm |
||||||
|
import io.realm.RealmObject |
||||||
|
import io.realm.Sort |
||||||
|
import kotlinx.android.synthetic.main.fragment_new_session.* |
||||||
|
import net.pokeranalytics.android.R |
||||||
|
import net.pokeranalytics.android.model.realm.* |
||||||
|
import net.pokeranalytics.android.ui.adapter.components.* |
||||||
|
import net.pokeranalytics.android.util.PokerAnalyticsFragment |
||||||
|
|
||||||
|
class DataListFragment : PokerAnalyticsFragment(), DataRowDelegate, DataRowCallback { |
||||||
|
|
||||||
|
private lateinit var dataType: DataObjectRowType |
||||||
|
|
||||||
|
private lateinit var realmObjects: ArrayList<RealmObject> |
||||||
|
|
||||||
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
||||||
|
return inflater.inflate(R.layout.fragment_data_list, container, false) |
||||||
|
} |
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
||||||
|
super.onViewCreated(view, savedInstanceState) |
||||||
|
initData() |
||||||
|
initUI() |
||||||
|
} |
||||||
|
|
||||||
|
override fun data(position: Int): DisplayableData { |
||||||
|
return (realmObjects[position] as DisplayableData) |
||||||
|
} |
||||||
|
|
||||||
|
override fun onRowSelected(position: Int) { |
||||||
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. |
||||||
|
} |
||||||
|
|
||||||
|
override fun size(): Int { |
||||||
|
return realmObjects.size |
||||||
|
} |
||||||
|
|
||||||
|
private fun initData() { |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init UI |
||||||
|
*/ |
||||||
|
private fun initUI() { |
||||||
|
|
||||||
|
val viewManager = LinearLayoutManager(requireContext()) |
||||||
|
val dataListAdapter = DataListAdapter(this, this) |
||||||
|
|
||||||
|
recyclerView.apply { |
||||||
|
setHasFixedSize(true) |
||||||
|
layoutManager = viewManager |
||||||
|
adapter = dataListAdapter |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* Set fragment data |
||||||
|
*/ |
||||||
|
fun setData(dataType: Int) { |
||||||
|
this.dataType = DataObjectRowType.values()[dataType] |
||||||
|
val realm = Realm.getDefaultInstance() |
||||||
|
|
||||||
|
realmObjects = ArrayList( when (DataObjectRowType.values()[dataType]) { |
||||||
|
DataObjectRowType.BANKROLL -> realm.where(Bankroll::class.java).findAll().sort("name", Sort.DESCENDING) |
||||||
|
DataObjectRowType.GAME-> realm.where(Game::class.java).findAll().sort("name", Sort.DESCENDING) |
||||||
|
DataObjectRowType.LOCATION -> realm.where(Location::class.java).findAll().sort("name", Sort.DESCENDING) |
||||||
|
DataObjectRowType.TOURNAMENT_TYPE -> realm.where(TournamentFeature::class.java).findAll().sort("name", Sort.DESCENDING) |
||||||
|
DataObjectRowType.TRANSACTION_TYPE -> realm.where(TransactionType::class.java).findAll().sort("name", Sort.DESCENDING) |
||||||
|
}) |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,57 @@ |
|||||||
|
package net.pokeranalytics.android.ui.fragment.components |
||||||
|
|
||||||
|
import android.os.Bundle |
||||||
|
import android.view.LayoutInflater |
||||||
|
import android.view.View |
||||||
|
import android.view.inputmethod.EditorInfo |
||||||
|
import kotlinx.android.synthetic.main.bottom_sheet_blinds.* |
||||||
|
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.* |
||||||
|
import net.pokeranalytics.android.R |
||||||
|
import net.pokeranalytics.android.model.realm.Session |
||||||
|
|
||||||
|
class BottomSheetBlindsFragment : BottomSheetFragment() { |
||||||
|
|
||||||
|
private var session: Session = Session() |
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
||||||
|
super.onViewCreated(view, savedInstanceState) |
||||||
|
initData() |
||||||
|
initUI() |
||||||
|
} |
||||||
|
|
||||||
|
override fun clickOnCheck() { |
||||||
|
super.clickOnCheck() |
||||||
|
valueDelegate.setValue(session, row) |
||||||
|
dismiss() |
||||||
|
} |
||||||
|
|
||||||
|
override fun onStart() { |
||||||
|
super.onStart() |
||||||
|
smallBlind.requestFocus() |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init data |
||||||
|
*/ |
||||||
|
private fun initData() { |
||||||
|
val data = getData() |
||||||
|
session = if (data is Session) data else Session() |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init UI |
||||||
|
*/ |
||||||
|
private fun initUI() { |
||||||
|
|
||||||
|
LayoutInflater.from(requireContext()).inflate(R.layout.bottom_sheet_blinds, view?.bottomSheetContainer, true) |
||||||
|
|
||||||
|
bigBlind.setOnEditorActionListener { v, actionId, event -> |
||||||
|
if (actionId == EditorInfo.IME_ACTION_DONE) { |
||||||
|
clickOnCheck() |
||||||
|
} |
||||||
|
true |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,61 @@ |
|||||||
|
package net.pokeranalytics.android.ui.fragment.components |
||||||
|
|
||||||
|
import android.os.Bundle |
||||||
|
import android.view.LayoutInflater |
||||||
|
import android.view.View |
||||||
|
import kotlinx.android.synthetic.main.bottom_sheet_date.* |
||||||
|
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.* |
||||||
|
import net.pokeranalytics.android.R |
||||||
|
import net.pokeranalytics.android.model.realm.TimeFrame |
||||||
|
import net.pokeranalytics.android.ui.fragment.components.BottomSheetFragment |
||||||
|
import net.pokeranalytics.android.util.DatePickerFragment |
||||||
|
import net.pokeranalytics.android.util.TimePickerFragment |
||||||
|
|
||||||
|
class BottomSheetDateFragment : BottomSheetFragment() { |
||||||
|
|
||||||
|
private var timeFrame: TimeFrame = TimeFrame() |
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
||||||
|
super.onViewCreated(view, savedInstanceState) |
||||||
|
initData() |
||||||
|
initUI() |
||||||
|
} |
||||||
|
|
||||||
|
override fun clickOnCheck() { |
||||||
|
super.clickOnCheck() |
||||||
|
valueDelegate.setValue(timeFrame, row) |
||||||
|
dismiss() |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init data |
||||||
|
*/ |
||||||
|
private fun initData() { |
||||||
|
val data = getData() |
||||||
|
timeFrame = if (data is TimeFrame) data else TimeFrame() |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init UI |
||||||
|
*/ |
||||||
|
private fun initUI() { |
||||||
|
|
||||||
|
LayoutInflater.from(requireContext()).inflate(R.layout.bottom_sheet_date, view?.bottomSheetContainer, true) |
||||||
|
|
||||||
|
setAddButtonVisible(false) |
||||||
|
|
||||||
|
startDate.setOnClickListener { |
||||||
|
val dateFragment = DatePickerFragment() |
||||||
|
dateFragment.show(fragmentManager, "datePicker") |
||||||
|
} |
||||||
|
|
||||||
|
endDate.setOnClickListener { |
||||||
|
val timeFragment = TimePickerFragment() |
||||||
|
timeFragment.show(fragmentManager, "timePicker") |
||||||
|
} |
||||||
|
|
||||||
|
//data.startDate = Date() |
||||||
|
//data.endDate = Date() |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,143 @@ |
|||||||
|
package net.pokeranalytics.android.ui.fragment.components |
||||||
|
|
||||||
|
import android.os.Bundle |
||||||
|
import android.view.LayoutInflater |
||||||
|
import android.view.View |
||||||
|
import android.view.ViewGroup |
||||||
|
import android.view.WindowManager |
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout |
||||||
|
import androidx.fragment.app.FragmentManager |
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment |
||||||
|
import kotlinx.android.synthetic.main.fragment_bottom_sheet.* |
||||||
|
import net.pokeranalytics.android.R |
||||||
|
import net.pokeranalytics.android.ui.adapter.components.DynamicRowInterface |
||||||
|
import net.pokeranalytics.android.ui.adapter.components.EditableDataDelegate |
||||||
|
|
||||||
|
enum class BottomSheetType { |
||||||
|
NONE, |
||||||
|
GAME, |
||||||
|
BLINDS, |
||||||
|
LOCATION, |
||||||
|
BANKROLL, |
||||||
|
TABLE_SIZE, |
||||||
|
DATE |
||||||
|
} |
||||||
|
|
||||||
|
interface BottomSheetInterface { |
||||||
|
fun clickOnClear() |
||||||
|
fun clickOnCheck() |
||||||
|
fun clickOnAdd() |
||||||
|
} |
||||||
|
|
||||||
|
open class BottomSheetFragment : BottomSheetDialogFragment(), BottomSheetInterface { |
||||||
|
|
||||||
|
lateinit var row: DynamicRowInterface |
||||||
|
lateinit var valueDelegate: EditableDataDelegate |
||||||
|
|
||||||
|
private var data: Any? = null |
||||||
|
|
||||||
|
companion object { |
||||||
|
fun create( fragmentManager: FragmentManager?, row: DynamicRowInterface, valueDelegate: EditableDataDelegate, data: Any?): BottomSheetFragment { |
||||||
|
|
||||||
|
val bottomSheetFragment = when (row.bottomSheetType) { |
||||||
|
BottomSheetType.BLINDS -> BottomSheetBlindsFragment() |
||||||
|
BottomSheetType.DATE -> BottomSheetDateFragment() |
||||||
|
BottomSheetType.GAME -> BottomSheetGameFragment() |
||||||
|
else -> BottomSheetFragment() |
||||||
|
} |
||||||
|
|
||||||
|
bottomSheetFragment.show(fragmentManager, "bottomSheet") |
||||||
|
bottomSheetFragment.row = row |
||||||
|
bottomSheetFragment.valueDelegate = valueDelegate |
||||||
|
bottomSheetFragment.data = data |
||||||
|
return bottomSheetFragment |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
||||||
|
val view = inflater.inflate( |
||||||
|
net.pokeranalytics.android.R.layout.fragment_bottom_sheet, |
||||||
|
container, |
||||||
|
false |
||||||
|
) as ConstraintLayout |
||||||
|
|
||||||
|
return view |
||||||
|
} |
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
||||||
|
super.onViewCreated(view, savedInstanceState) |
||||||
|
initUI() |
||||||
|
} |
||||||
|
|
||||||
|
override fun onActivityCreated(savedInstanceState: Bundle?) { |
||||||
|
super.onActivityCreated(savedInstanceState) |
||||||
|
|
||||||
|
// To display correctly the keyboard |
||||||
|
dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE) |
||||||
|
} |
||||||
|
|
||||||
|
override fun clickOnClear() { |
||||||
|
} |
||||||
|
|
||||||
|
override fun clickOnCheck() { |
||||||
|
} |
||||||
|
|
||||||
|
override fun clickOnAdd() { |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init UI |
||||||
|
*/ |
||||||
|
private fun initUI() { |
||||||
|
row.let { |
||||||
|
bottomSheetToolbar.title = row.localizedTitle(requireContext()) |
||||||
|
bottomSheetToolbar.inflateMenu(net.pokeranalytics.android.R.menu.bottom_sheet_menu) |
||||||
|
bottomSheetToolbar.setOnMenuItemClickListener { |
||||||
|
false |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Menu |
||||||
|
bottomSheetToolbar.menu.findItem(R.id.actionClear).setOnMenuItemClickListener { |
||||||
|
clickOnClear() |
||||||
|
true |
||||||
|
} |
||||||
|
bottomSheetToolbar.menu.findItem(R.id.actionAdd).setOnMenuItemClickListener { |
||||||
|
clickOnAdd() |
||||||
|
true |
||||||
|
} |
||||||
|
bottomSheetToolbar.menu.findItem(R.id.actionCheck).setOnMenuItemClickListener { |
||||||
|
clickOnCheck() |
||||||
|
true |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the data object |
||||||
|
*/ |
||||||
|
fun getData() : Any? { |
||||||
|
return data |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Set clear button visibility |
||||||
|
*/ |
||||||
|
fun setClearButtonVisibile(visible: Boolean) { |
||||||
|
bottomSheetToolbar.menu.findItem(R.id.actionClear).isVisible = visible |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Set check button visibility |
||||||
|
*/ |
||||||
|
fun setCheckButtonVisibile(visible: Boolean) { |
||||||
|
bottomSheetToolbar.menu.findItem(R.id.actionCheck).isVisible = visible |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Set add button visibility |
||||||
|
*/ |
||||||
|
fun setAddButtonVisible(visible: Boolean) { |
||||||
|
bottomSheetToolbar.menu.findItem(R.id.actionAdd).isVisible = visible |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,77 @@ |
|||||||
|
package net.pokeranalytics.android.ui.fragment.components |
||||||
|
|
||||||
|
import android.content.Context |
||||||
|
import android.os.Bundle |
||||||
|
import android.view.LayoutInflater |
||||||
|
import android.view.View |
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager |
||||||
|
import kotlinx.android.synthetic.main.bottom_sheet_game.* |
||||||
|
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.* |
||||||
|
import net.pokeranalytics.android.R |
||||||
|
import net.pokeranalytics.android.model.realm.Game |
||||||
|
import net.pokeranalytics.android.ui.adapter.components.DynamicListAdapter |
||||||
|
import net.pokeranalytics.android.ui.adapter.components.DynamicRowDelegate |
||||||
|
import net.pokeranalytics.android.ui.adapter.components.DynamicRowInterface |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class BottomSheetGameFragment : BottomSheetFragment(), DynamicRowDelegate { |
||||||
|
|
||||||
|
private var game: Game = Game() |
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
||||||
|
super.onViewCreated(view, savedInstanceState) |
||||||
|
initData() |
||||||
|
initUI() |
||||||
|
} |
||||||
|
|
||||||
|
override fun clickOnCheck() { |
||||||
|
super.clickOnCheck() |
||||||
|
valueDelegate.setValue(game, row) |
||||||
|
dismiss() |
||||||
|
} |
||||||
|
|
||||||
|
override fun adapterRows(): ArrayList<DynamicRowInterface> { |
||||||
|
val array = ArrayList<DynamicRowInterface>() |
||||||
|
array.add(TitleObject("Game 1")) |
||||||
|
array.add(TitleObject("Game 2")) |
||||||
|
array.add(TitleObject("Game 3")) |
||||||
|
return array |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init data |
||||||
|
*/ |
||||||
|
private fun initData() { |
||||||
|
val data = getData() |
||||||
|
game = if (data is Game) data else Game() |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Init UI |
||||||
|
*/ |
||||||
|
private fun initUI() { |
||||||
|
LayoutInflater.from(requireContext()).inflate(R.layout.bottom_sheet_game, view?.bottomSheetContainer, true) |
||||||
|
|
||||||
|
val viewManager = LinearLayoutManager(requireContext()) |
||||||
|
val dataAdapter = DynamicListAdapter(this) |
||||||
|
|
||||||
|
gameNameRecyclerView.apply { |
||||||
|
setHasFixedSize(true) |
||||||
|
layoutManager = viewManager |
||||||
|
//adapter = dataAdapter |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
inner class TitleObject(var title: String) : DynamicRowInterface { |
||||||
|
override fun localizedTitle(context: Context): String { |
||||||
|
return title |
||||||
|
} |
||||||
|
|
||||||
|
override var viewType: Int = 0 |
||||||
|
override var bottomSheetType: BottomSheetType = BottomSheetType.NONE |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -1,13 +0,0 @@ |
|||||||
package net.pokeranalytics.android.ui.fragment.components |
|
||||||
|
|
||||||
enum class BottomSheetType { |
|
||||||
|
|
||||||
NONE, |
|
||||||
GAME, |
|
||||||
BLINDS, |
|
||||||
LOCATION, |
|
||||||
BANKROLL, |
|
||||||
TABLE_SIZE, |
|
||||||
DATE |
|
||||||
|
|
||||||
} |
|
||||||
@ -0,0 +1,7 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<font-family xmlns:app="http://schemas.android.com/apk/res-auto" |
||||||
|
app:fontProviderAuthority="com.google.android.gms.fonts" |
||||||
|
app:fontProviderPackage="com.google.android.gms" |
||||||
|
app:fontProviderQuery="Roboto" |
||||||
|
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> |
||||||
|
</font-family> |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<font-family xmlns:app="http://schemas.android.com/apk/res-auto" |
||||||
|
app:fontProviderAuthority="com.google.android.gms.fonts" |
||||||
|
app:fontProviderPackage="com.google.android.gms" |
||||||
|
app:fontProviderQuery="name=Roboto&weight=700" |
||||||
|
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> |
||||||
|
</font-family> |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<font-family xmlns:app="http://schemas.android.com/apk/res-auto" |
||||||
|
app:fontProviderAuthority="com.google.android.gms.fonts" |
||||||
|
app:fontProviderPackage="com.google.android.gms" |
||||||
|
app:fontProviderQuery="name=Roboto&weight=300" |
||||||
|
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs"> |
||||||
|
</font-family> |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:orientation="vertical" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent"> |
||||||
|
|
||||||
|
<fragment |
||||||
|
android:id="@+id/dataListFragment" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" |
||||||
|
android:name="net.pokeranalytics.android.ui.fragment.DataListFragment" /> |
||||||
|
|
||||||
|
</LinearLayout> |
||||||
@ -0,0 +1,41 @@ |
|||||||
|
<?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:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent"> |
||||||
|
|
||||||
|
<TextView |
||||||
|
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:text="Data List" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintTop_toTopOf="parent" /> |
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView |
||||||
|
android:id="@+id/recyclerView" |
||||||
|
android:layout_width="0dp" |
||||||
|
android:layout_height="0dp" |
||||||
|
android:layout_marginTop="8dp" |
||||||
|
app:layout_constraintBottom_toBottomOf="parent" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintTop_toBottomOf="@+id/title" /> |
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton |
||||||
|
android:id="@+id/addButton" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_marginEnd="16dp" |
||||||
|
android:layout_marginBottom="16dp" |
||||||
|
android:src="@drawable/ic_add_white_24dp" |
||||||
|
app:fabSize="normal" |
||||||
|
app:layout_constraintBottom_toBottomOf="parent" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" /> |
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout> |
||||||
@ -1,31 +1,71 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<androidx.constraintlayout.widget.ConstraintLayout |
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
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:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent"> |
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView |
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="match_parent"> |
android:layout_height="match_parent" |
||||||
|
android:fillViewport="true" |
||||||
<TextView |
app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
||||||
android:id="@+id/title" |
|
||||||
android:layout_width="wrap_content" |
<androidx.constraintlayout.widget.ConstraintLayout |
||||||
android:layout_height="wrap_content" |
android:layout_width="match_parent" |
||||||
android:text="New session" |
android:layout_height="400dp"> |
||||||
android:layout_marginTop="8dp" |
|
||||||
app:layout_constraintTop_toTopOf="parent" |
<androidx.appcompat.widget.AppCompatTextView |
||||||
app:layout_constraintEnd_toEndOf="parent" |
android:id="@+id/title" |
||||||
android:layout_marginEnd="8dp" |
style="@style/Title" |
||||||
app:layout_constraintStart_toStartOf="parent" |
android:layout_width="wrap_content" |
||||||
android:layout_marginStart="8dp"/> |
android:layout_height="wrap_content" |
||||||
|
android:layout_marginStart="8dp" |
||||||
<androidx.recyclerview.widget.RecyclerView |
android:layout_marginTop="8dp" |
||||||
android:id="@+id/recyclerView" |
android:layout_marginEnd="8dp" |
||||||
android:layout_width="0dp" |
android:text="New session" |
||||||
android:layout_height="0dp" |
app:layout_constraintEnd_toEndOf="parent" |
||||||
app:layout_constraintTop_toBottomOf="@+id/title" |
app:layout_constraintStart_toStartOf="parent" |
||||||
app:layout_constraintEnd_toEndOf="parent" |
app:layout_constraintTop_toTopOf="parent" /> |
||||||
app:layout_constraintStart_toStartOf="parent" |
|
||||||
app:layout_constraintBottom_toBottomOf="parent" |
<androidx.recyclerview.widget.RecyclerView |
||||||
android:layout_marginTop="8dp"/> |
android:id="@+id/recyclerView" |
||||||
|
android:layout_width="0dp" |
||||||
</androidx.constraintlayout.widget.ConstraintLayout> |
android:layout_height="0dp" |
||||||
|
android:layout_marginTop="8dp" |
||||||
|
app:layout_constraintBottom_toBottomOf="parent" |
||||||
|
app:layout_constraintEnd_toEndOf="parent" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintTop_toBottomOf="@+id/title" /> |
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout> |
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView> |
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout |
||||||
|
android:id="@+id/appBar" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="128dp" |
||||||
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> |
||||||
|
|
||||||
|
<com.google.android.material.appbar.CollapsingToolbarLayout |
||||||
|
android:id="@+id/collapsingToolbar" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" |
||||||
|
app:contentScrim="?attr/colorPrimary" |
||||||
|
app:expandedTitleGravity="bottom" |
||||||
|
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"> |
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar |
||||||
|
android:id="@+id/toolbar" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="?attr/actionBarSize" |
||||||
|
app:title="Poker Analytics" |
||||||
|
app:titleTextColor="@color/white" |
||||||
|
app:layout_collapseMode="pin" /> |
||||||
|
|
||||||
|
</com.google.android.material.appbar.CollapsingToolbarLayout> |
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout> |
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<resources> |
||||||
|
<array name="com_google_android_gms_fonts_certs"> |
||||||
|
<item>@array/com_google_android_gms_fonts_certs_dev</item> |
||||||
|
<item>@array/com_google_android_gms_fonts_certs_prod</item> |
||||||
|
</array> |
||||||
|
<string-array name="com_google_android_gms_fonts_certs_dev"> |
||||||
|
<item> |
||||||
|
MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs= |
||||||
|
</item> |
||||||
|
</string-array> |
||||||
|
<string-array name="com_google_android_gms_fonts_certs_prod"> |
||||||
|
<item> |
||||||
|
MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK |
||||||
|
</item> |
||||||
|
</string-array> |
||||||
|
</resources> |
||||||
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<resources> |
||||||
|
<array name="preloaded_fonts" translatable="false"> |
||||||
|
<item>@font/roboto</item> |
||||||
|
<item>@font/roboto_bold</item> |
||||||
|
<item>@font/roboto_light</item> |
||||||
|
</array> |
||||||
|
</resources> |
||||||
@ -1,17 +1,41 @@ |
|||||||
<resources> |
<resources> |
||||||
|
|
||||||
<!-- Base application theme. --> |
<!-- PokerAnalytics application theme --> |
||||||
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> |
<style name="PokerAnalyticsTheme" parent="Theme.MaterialComponents.Light.DarkActionBar"> |
||||||
<!-- Customize your theme here. --> |
<!-- Customize your theme here. --> |
||||||
<item name="colorPrimary">@color/colorPrimary</item> |
<item name="colorPrimary">@color/colorPrimary</item> |
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> |
||||||
<item name="colorAccent">@color/colorAccent</item> |
<item name="colorAccent">@color/colorAccent</item> |
||||||
</style> |
</style> |
||||||
|
|
||||||
|
<!-- Toolbar --> |
||||||
<style name="BottomSheetToolbar" parent="AppTheme"> |
<style name="BottomSheetToolbar" parent="PokerAnalyticsTheme"> |
||||||
<item name="android:background">@color/gray_dark_1</item> |
<item name="android:background">@color/gray_dark_1</item> |
||||||
<item name="titleTextColor">@color/white</item> |
<item name="titleTextColor">@color/white</item> |
||||||
</style> |
</style> |
||||||
|
|
||||||
|
|
||||||
|
<!-- TextView --> |
||||||
|
<style name="Title" parent="PokerAnalyticsTheme"> |
||||||
|
<item name="android:textSize">22sp</item> |
||||||
|
<item name="android:textColor">@color/gray_dark_1</item> |
||||||
|
<item name="android:fontFamily">@font/roboto_bold</item> |
||||||
|
<item name="android:paddingTop">8dp</item> |
||||||
|
</style> |
||||||
|
|
||||||
|
<style name="Header" parent="PokerAnalyticsTheme"> |
||||||
|
<item name="android:textSize">22sp</item> |
||||||
|
<item name="android:textColor">@color/gray_dark_1</item> |
||||||
|
<item name="android:fontFamily">@font/roboto_bold</item> |
||||||
|
<item name="android:paddingTop">8dp</item> |
||||||
|
</style> |
||||||
|
|
||||||
|
<style name="RowTitle" parent="PokerAnalyticsTheme"> |
||||||
|
<item name="android:textSize">16sp</item> |
||||||
|
<item name="android:textColor">@color/gray_dark_1</item> |
||||||
|
<item name="android:fontFamily">@font/roboto</item> |
||||||
|
<item name="android:paddingTop">8dp</item> |
||||||
|
</style> |
||||||
|
|
||||||
|
|
||||||
</resources> |
</resources> |
||||||
|
|||||||
Loading…
Reference in new issue