|
|
|
|
@ -4,6 +4,7 @@ import android.os.Bundle |
|
|
|
|
import android.view.LayoutInflater |
|
|
|
|
import android.view.View |
|
|
|
|
import android.view.ViewGroup |
|
|
|
|
import android.widget.Toast |
|
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
|
import io.realm.Realm |
|
|
|
|
import io.realm.RealmObject |
|
|
|
|
@ -12,9 +13,11 @@ 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.ui.fragment.components.BottomSheetFragment |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.BottomSheetType |
|
|
|
|
import net.pokeranalytics.android.util.PokerAnalyticsFragment |
|
|
|
|
|
|
|
|
|
class EditableDataFragment : PokerAnalyticsFragment(), DynamicRowCallback { |
|
|
|
|
class EditableDataFragment : PokerAnalyticsFragment(), DynamicRowCallback, EditableDataDelegate { |
|
|
|
|
|
|
|
|
|
private lateinit var item: RealmObject |
|
|
|
|
private var dataType: SettingRow = SettingRow.BANKROLL |
|
|
|
|
@ -31,7 +34,12 @@ class EditableDataFragment : PokerAnalyticsFragment(), DynamicRowCallback { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onRowSelected(row: DynamicRowInterface) { |
|
|
|
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. |
|
|
|
|
val data = item |
|
|
|
|
BottomSheetFragment.create(fragmentManager, row, this, data) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun setValue(value: Any, row: DynamicRowInterface) { |
|
|
|
|
Toast.makeText(requireContext(), "Callback for ${row.localizedTitle(requireContext())} ($value)", Toast.LENGTH_SHORT).show() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun initData() { |
|
|
|
|
|