feature/top10
Aurelien Hubert 7 years ago
parent 344228d83f
commit c18f3de3db
  1. 8
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetListGameFragment.kt

@ -3,6 +3,7 @@ package net.pokeranalytics.android.ui.fragment.components.bottomsheet
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import androidx.core.view.get
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.material.chip.Chip
import io.realm.RealmResults
@ -13,6 +14,7 @@ import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorExcep
import net.pokeranalytics.android.model.Limit
import net.pokeranalytics.android.ui.adapter.RowRepresentableAdapter
import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.util.extensions.px
/**
* Bottom Sheet List Game Fragment
@ -73,6 +75,8 @@ class BottomSheetListGameFragment : BottomSheetListFragment() {
val chip = Chip(requireContext())
chip.id = it.ordinal
chip.text = it.shortName
chip.chipStartPadding = 8f.px
chip.chipEndPadding = 8f.px
chip.isChecked = it.ordinal == limit
chipGroup.addView(chip)
}
@ -81,6 +85,10 @@ class BottomSheetListGameFragment : BottomSheetListFragment() {
values[0] = i
}
if (limit == null) {
(chipGroup[0] as Chip).isChecked = true
}
val viewManager2 = LinearLayoutManager(requireContext())
dataAdapter = RowRepresentableAdapter(this, this)

Loading…
Cancel
Save