Merge branch 'master' of gitlab.com:stax-river/poker-analytics

feature/top10
Laurent 7 years ago
commit 63f69a4be7
  1. 44
      .gitlab-ci.yml
  2. 7
      app/build.gradle
  3. 4
      app/src/main/java/net/pokeranalytics/android/exceptions/Exceptions.kt
  4. 3
      app/src/main/java/net/pokeranalytics/android/model/realm/Bankroll.kt
  5. 24
      app/src/main/java/net/pokeranalytics/android/model/realm/Game.kt
  6. 10
      app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt
  7. 2
      app/src/main/java/net/pokeranalytics/android/model/realm/TournamentFeature.kt
  8. 3
      app/src/main/java/net/pokeranalytics/android/model/realm/TournamentName.kt
  9. 3
      app/src/main/java/net/pokeranalytics/android/model/realm/TransactionType.kt
  10. 25
      app/src/main/java/net/pokeranalytics/android/ui/activity/components/PokerAnalyticsActivity.kt
  11. 4
      app/src/main/java/net/pokeranalytics/android/ui/adapter/RowRepresentableDataSource.kt
  12. 4
      app/src/main/java/net/pokeranalytics/android/ui/fragment/LocationDataFragment.kt
  13. 65
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetDoubleEditTextFragment.kt
  14. 35
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetEditTextFragment.kt
  15. 18
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetEditTextMultiLinesFragment.kt
  16. 45
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetFragment.kt
  17. 11
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetListFragment.kt
  18. 13
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetListGameFragment.kt
  19. 13
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetMultiSelectionFragment.kt
  20. 11
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetStaticListFragment.kt
  21. 7
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetSumFragment.kt
  22. 9
      app/src/main/java/net/pokeranalytics/android/ui/fragment/components/bottomsheet/BottomSheetTableSizeGridFragment.kt
  23. 12
      app/src/main/java/net/pokeranalytics/android/ui/view/RowRepresentable.kt
  24. 6
      app/src/main/java/net/pokeranalytics/android/ui/view/rowrepresentable/SimpleRow.kt
  25. 1
      app/src/main/java/net/pokeranalytics/android/util/FormatUtils.kt
  26. 26
      app/src/main/java/net/pokeranalytics/android/util/ModelUtils.kt
  27. 2
      app/src/main/java/net/pokeranalytics/android/util/extensions/DateExtension.kt
  28. 3
      app/src/main/java/net/pokeranalytics/android/util/extensions/UIExtensions.kt
  29. 48
      app/src/main/res/values-zh/strings.xml
  30. 2
      app/src/test/java/net/pokeranalytics/android/ExampleUnitTest.kt

@ -0,0 +1,44 @@
image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.3"
ANDROID_SDK_TOOLS: "4333796"
before_script:
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
- unzip -d android-sdk-linux android-sdk.zip
- echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
- echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null
- echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
- chmod +x ./gradlew
# temporarily disable checking for EPIPE error and use yes to accept all licenses
- set +o pipefail
- yes | android-sdk-linux/tools/bin/sdkmanager --licenses
- set -o pipefail
stages:
- build
- test
lintDebug:
stage: build
script:
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
assembleDebug:
stage: build
script:
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/
#debugTests:
# stage: test
# script:
# - ./gradlew -Pci --console=plain :app:testDebug

@ -12,12 +12,17 @@ repositories {
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
disable 'MissingTranslation'
}
defaultConfig {
applicationId "net.pokeranalytics.android"
minSdkVersion 23
@ -29,7 +34,7 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

@ -7,3 +7,7 @@ class ModelException(message: String) : Exception(message) {
class FormattingException(message: String) : Exception(message) {
}
class RowRepresentableEditDescriptorException(message: String) : Exception(message) {
}

@ -11,7 +11,6 @@ import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor
import net.pokeranalytics.android.ui.view.rowrepresentable.BankrollRow
import net.pokeranalytics.android.ui.view.rowrepresentable.SimpleRow
import timber.log.Timber
import java.util.*
import kotlin.collections.ArrayList
@ -70,7 +69,7 @@ open class Bankroll(name: String = "") : RealmObject(), Manageable,
}
}
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor>? {
val data = java.util.ArrayList<RowRepresentableEditDescriptor>()
when (row) {
SimpleRow.NAME -> data.add(

@ -1,9 +1,6 @@
package net.pokeranalytics.android.model.realm
import io.realm.Realm
import io.realm.RealmObject
import io.realm.RealmResults
import io.realm.Sort
import io.realm.annotations.PrimaryKey
import net.pokeranalytics.android.R
import net.pokeranalytics.android.model.interfaces.CountableUsage
@ -55,23 +52,12 @@ open class Game : RealmObject(), Manageable, StaticRowRepresentableDataSource, R
}
}
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
val data = java.util.ArrayList<RowRepresentableEditDescriptor>()
when (row) {
SimpleRow.NAME -> data.add(
RowRepresentableEditDescriptor(
this.name,
SimpleRow.NAME.resId
)
)
GameRow.SHORT_NAME -> data.add(
RowRepresentableEditDescriptor(
this.shortName,
GameRow.SHORT_NAME.resId
)
)
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor>? {
return when (row) {
SimpleRow.NAME -> row.editingDescriptors(mapOf("defaultValue" to this.name))
GameRow.SHORT_NAME -> row.editingDescriptors(mapOf("defaultValue" to this.shortName))
else -> null
}
return data
}
override fun updateValue(value: Any?, row: RowRepresentable) {

@ -5,7 +5,6 @@ import android.text.InputType
import io.realm.Realm
import io.realm.RealmList
import io.realm.RealmObject
import io.realm.Sort
import io.realm.annotations.Ignore
import io.realm.annotations.PrimaryKey
import io.realm.kotlin.where
@ -36,8 +35,6 @@ import net.pokeranalytics.android.util.extensions.*
import java.util.*
import java.util.Currency
import kotlin.collections.ArrayList
import kotlin.properties.Delegates
import kotlin.reflect.KProperty
open class Session : RealmObject(), SessionInterface, Manageable, StaticRowRepresentableDataSource, RowRepresentable,
Timed {
@ -137,6 +134,11 @@ open class Session : RealmObject(), SessionInterface, Manageable, StaticRowRepre
// The bankroll hosting the results
var bankroll: Bankroll? = null
set(value) {
field = value
this.updateRowRepresentation()
}
// The limit type: NL, PL...
var limit: Int? = null
@ -585,7 +587,7 @@ open class Session : RealmObject(), SessionInterface, Manageable, StaticRowRepre
}
}
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor>? {
val data = ArrayList<RowRepresentableEditDescriptor>()

@ -50,7 +50,7 @@ open class TournamentFeature : RealmObject(), Manageable, StaticRowRepresentable
}
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor>? {
val data = java.util.ArrayList<RowRepresentableEditDescriptor>()
when (row) {
SimpleRow.NAME -> data.add(

@ -4,7 +4,6 @@ import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
import net.pokeranalytics.android.R
import net.pokeranalytics.android.model.interfaces.Manageable
import net.pokeranalytics.android.model.interfaces.Savable
import net.pokeranalytics.android.ui.adapter.StaticRowRepresentableDataSource
import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor
@ -51,7 +50,7 @@ open class TournamentName : RealmObject(), Manageable, StaticRowRepresentableDat
}
}
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor>? {
val data = java.util.ArrayList<RowRepresentableEditDescriptor>()
when (row) {
SimpleRow.NAME -> data.add(

@ -4,7 +4,6 @@ import android.text.InputType
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
import net.pokeranalytics.android.model.interfaces.Manageable
import net.pokeranalytics.android.model.interfaces.Savable
import net.pokeranalytics.android.ui.adapter.StaticRowRepresentableDataSource
import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor
@ -54,7 +53,7 @@ open class TransactionType : RealmObject(), Manageable, StaticRowRepresentableDa
}
}
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor>? {
val data = java.util.ArrayList<RowRepresentableEditDescriptor>()
when (row) {
SimpleRow.NAME -> data.add(

@ -18,6 +18,7 @@ open class PokerAnalyticsActivity : AppCompatActivity() {
companion object {
const val PERMISSION_REQUEST_ACCESS_FINE_LOCATION = 1000
const val PLAY_SERVICES_RESOLUTION_REQUEST = 2000
}
private val realm = Realm.getDefaultInstance()
@ -71,7 +72,7 @@ open class PokerAnalyticsActivity : AppCompatActivity() {
/**
* Return if the location permission has been granted by the user
*/
fun hasLocationPermissionGranted() : Boolean {
fun hasLocationPermissionGranted(): Boolean {
return ContextCompat.checkSelfPermission(this, ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
}
@ -127,21 +128,17 @@ open class PokerAnalyticsActivity : AppCompatActivity() {
/**
* Find the current location
*/
fun findCurrentLocation(callback: ((location: Location?) -> Unit)?) {
if (LocationManager(this).databaseContainsLocationsWithCoordinates()) {
if (ContextCompat.checkSelfPermission(this, ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
LocationManager(this).findNearestLocationFromUser(callback)
} else {
askForLocationPermission { granted ->
if (granted) {
LocationManager(this).findNearestLocationFromUser(callback)
} else {
callback?.invoke(null)
}
fun findCurrentLocation(callback: ((location: android.location.Location?) -> Unit)?) {
if (ContextCompat.checkSelfPermission(this, ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
LocationManager(this).findCurrentLocation(callback)
} else {
askForLocationPermission { granted ->
if (granted) {
LocationManager(this).findCurrentLocation(callback)
} else {
callback?.invoke(null)
}
}
} else {
callback?.invoke(null)
}
}

@ -154,8 +154,8 @@ interface EditableDataSource {
/**
* A list of [RowRepresentableEditDescriptor] object specifying the way the edition will be handled
*/
fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
return ArrayList()
fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor>? {
return null
}
}

@ -14,7 +14,6 @@ import net.pokeranalytics.android.ui.view.rowrepresentable.CustomizableRowRepres
import net.pokeranalytics.android.ui.view.rowrepresentable.LocationRow
import net.pokeranalytics.android.ui.view.rowrepresentable.SimpleRow
import net.pokeranalytics.android.util.NULL_TEXT
import timber.log.Timber
/**
* Custom EditableDataFragment to manage the LOCATE_ME case
@ -79,7 +78,7 @@ class LocationDataFragment : EditableDataFragment(), StaticRowRepresentableDataS
}
}
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor> {
override fun editDescriptors(row: RowRepresentable): ArrayList<RowRepresentableEditDescriptor>? {
val data = java.util.ArrayList<RowRepresentableEditDescriptor>()
when (row) {
SimpleRow.NAME -> data.add(
@ -181,7 +180,6 @@ class LocationDataFragment : EditableDataFragment(), StaticRowRepresentableDataS
// Try to get the location of the user
parentActivity.findCurrentLocation {currentLocation ->
currentLocation?.let {
Timber.d("Current location: ${it.latitude}, ${it.longitude}")
location.latitude = currentLocation.latitude
location.longitude = currentLocation.longitude
}

@ -9,6 +9,7 @@ import androidx.core.widget.addTextChangedListener
import kotlinx.android.synthetic.main.bottom_sheet_double_edit_text.*
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
import net.pokeranalytics.android.ui.view.rowrepresentable.SessionRow
import net.pokeranalytics.android.util.extensions.round
@ -49,57 +50,55 @@ class BottomSheetDoubleEditTextFragment : BottomSheetFragment() {
* Init UI
*/
private fun initUI() {
val data = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (data.size != 2) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
setAddButtonVisible(false)
val data = getData()
values.add(0, "")
values.add(1, "")
LayoutInflater.from(requireContext())
.inflate(R.layout.bottom_sheet_double_edit_text, view?.bottomSheetContainer, true)
if (data.size == 2) {
values[0] = (data[0].defaultValue ?: "").toString()
values[1] = (data[1].defaultValue ?: "").toString()
values[0] = (data[0].defaultValue ?: "").toString()
values[1] = (data[1].defaultValue ?: "").toString()
editText1.setText(values[0])
editText2.setText(values[1])
editText1.setText(values[0])
editText2.setText(values[1])
data[0].hint?.let { editText1.hint = getString(it) }
editText1.inputType = data[0].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText1.addTextChangedListener {
values[0] = it?.toString() ?: ""
}
data[0].hint?.let { editText1.hint = getString(it) }
editText1.inputType = data[0].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText1.addTextChangedListener {
values[0] = it?.toString() ?: ""
}
data[1].hint?.let { editText2.hint = getString(it) }
editText2.inputType = data[1].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText2.addTextChangedListener {
values[1] = it?.toString() ?: ""
if (isEditingBlinds) {
try {
val bigBlind = values[1].toDouble()
editText1.setText((bigBlind / 2.0).round())
} catch (e: Exception) {
editText1.setText("")
}
data[1].hint?.let { editText2.hint = getString(it) }
editText2.inputType = data[1].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText2.addTextChangedListener {
values[1] = it?.toString() ?: ""
if (isEditingBlinds) {
try {
val bigBlind = values[1].toDouble()
editText1.setText((bigBlind / 2.0).round())
} catch (e: Exception) {
editText1.setText("")
}
}
}
editText2.setOnEditorActionListener { v, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_DONE) {
this.delegate.onRowValueChanged(values, row)
dismiss()
true
} else {
false
}
editText2.setOnEditorActionListener { v, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_DONE) {
this.delegate.onRowValueChanged(values, row)
dismiss()
true
} else {
false
}
}
}
}

@ -9,6 +9,7 @@ import androidx.core.widget.addTextChangedListener
import kotlinx.android.synthetic.main.bottom_sheet_edit_text.*
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
class BottomSheetEditTextFragment : BottomSheetFragment() {
@ -40,28 +41,26 @@ class BottomSheetEditTextFragment : BottomSheetFragment() {
* Init UI
*/
private fun initUI() {
val data = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (data.size != 1) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
setAddButtonVisible(false)
LayoutInflater.from(requireContext()).inflate(R.layout.bottom_sheet_edit_text, view?.bottomSheetContainer, true)
val data = getData()
if (data.size == 1) {
data[0].hint?.let { editText1.hint = getString(it) }
editText1.inputType = data[0].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText1.addTextChangedListener { value = it?.toString() ?: "" }
editText1.setText((data[0].defaultValue ?: "").toString())
editText1.setOnEditorActionListener { v, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_DONE) {
delegate.onRowValueChanged(getValue(), row)
dismiss()
true
} else {
false
}
data[0].hint?.let { editText1.hint = getString(it) }
editText1.inputType = data[0].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText1.addTextChangedListener { value = it?.toString() ?: "" }
editText1.setText((data[0].defaultValue ?: "").toString())
editText1.setOnEditorActionListener { v, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_DONE) {
delegate.onRowValueChanged(getValue(), row)
dismiss()
true
} else {
false
}
}
}

@ -7,6 +7,8 @@ import android.view.View
import androidx.core.widget.addTextChangedListener
import kotlinx.android.synthetic.main.bottom_sheet_edit_text_multi_lines.*
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.*
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
import java.lang.AssertionError
class BottomSheetEditTextMultiLinesFragment : BottomSheetFragment() {
@ -38,19 +40,19 @@ class BottomSheetEditTextMultiLinesFragment : BottomSheetFragment() {
* Init UI
*/
private fun initUI() {
val data = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (data.size != 1) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
setAddButtonVisible(false)
LayoutInflater.from(requireContext()).inflate(net.pokeranalytics.android.R.layout.bottom_sheet_edit_text_multi_lines, view?.bottomSheetContainer, true)
val data = getData()
if (data.size == 1) {
data[0].hint?.let { editText1.hint = getString(it) }
editText1.inputType = data[0].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_MULTI_LINE or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText1.addTextChangedListener { value = it?.toString() ?: "" }
editText1.setText((data[0].defaultValue ?: "").toString())
}
data[0].hint?.let { editText1.hint = getString(it) }
editText1.inputType = data[0].inputType ?: InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_MULTI_LINE or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
editText1.addTextChangedListener { value = it?.toString() ?: "" }
editText1.setText((data[0].defaultValue ?: "").toString())
}
}

@ -23,17 +23,18 @@ import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor
import net.pokeranalytics.android.ui.view.rowrepresentable.SessionRow
enum class BottomSheetType {
NONE,
LIST,
LIST_STATIC,
LIST_GAME,
DOUBLE_LIST,
MULTI_SELECTION,
GRID,
EDIT_TEXT,
EDIT_TEXT_MULTI_LINES,
DOUBLE_EDIT_TEXT,
SUM
NONE { override fun newInstance() = BottomSheetFragment()},
LIST { override fun newInstance() = BottomSheetListFragment()},
LIST_STATIC { override fun newInstance() = BottomSheetStaticListFragment()},
LIST_GAME { override fun newInstance() = BottomSheetListGameFragment()},
DOUBLE_LIST { override fun newInstance() = BottomSheetListGameFragment()},
MULTI_SELECTION { override fun newInstance() = BottomSheetMultiSelectionFragment()},
GRID { override fun newInstance() = BottomSheetTableSizeGridFragment()},
EDIT_TEXT { override fun newInstance() = BottomSheetEditTextFragment()},
EDIT_TEXT_MULTI_LINES { override fun newInstance() = BottomSheetEditTextMultiLinesFragment()},
DOUBLE_EDIT_TEXT { override fun newInstance() = BottomSheetDoubleEditTextFragment()},
SUM { override fun newInstance() = BottomSheetSumFragment()};
abstract fun newInstance(): BottomSheetFragment
}
open class BottomSheetFragment : BottomSheetDialogFragment() {
@ -42,7 +43,7 @@ open class BottomSheetFragment : BottomSheetDialogFragment() {
lateinit var delegate: RowRepresentableDelegate
private var isClearable: Boolean = true
private var rowRepresentableEditDescriptors: ArrayList<RowRepresentableEditDescriptor> = ArrayList()
private var rowRepresentableEditDescriptors: ArrayList<RowRepresentableEditDescriptor>? = null
companion object {
@ -52,24 +53,10 @@ open class BottomSheetFragment : BottomSheetDialogFragment() {
fragmentManager: FragmentManager?,
row: RowRepresentable,
delegate: RowRepresentableDelegate,
rowRepresentableEditDescriptors: ArrayList<RowRepresentableEditDescriptor>,
rowRepresentableEditDescriptors: ArrayList<RowRepresentableEditDescriptor>?,
isClearable: Boolean? = true
): BottomSheetFragment {
val bottomSheetFragment = when (row.bottomSheetType) {
BottomSheetType.LIST -> BottomSheetListFragment()
BottomSheetType.LIST_GAME -> BottomSheetListGameFragment()
BottomSheetType.LIST_STATIC -> BottomSheetStaticListFragment()
BottomSheetType.MULTI_SELECTION -> BottomSheetMultiSelectionFragment()
BottomSheetType.GRID -> BottomSheetTableSizeGridFragment()
BottomSheetType.DOUBLE_LIST -> BottomSheetListGameFragment()
BottomSheetType.EDIT_TEXT -> BottomSheetEditTextFragment()
BottomSheetType.EDIT_TEXT_MULTI_LINES -> BottomSheetEditTextMultiLinesFragment()
BottomSheetType.DOUBLE_EDIT_TEXT -> BottomSheetDoubleEditTextFragment()
BottomSheetType.SUM -> BottomSheetSumFragment()
else -> BottomSheetFragment()
}
val bottomSheetFragment = row.bottomSheetType.newInstance()
bottomSheetFragment.show(fragmentManager, "bottomSheet")
bottomSheetFragment.row = row
bottomSheetFragment.delegate = delegate
@ -173,7 +160,7 @@ open class BottomSheetFragment : BottomSheetDialogFragment() {
/**
* Return the data list
*/
fun getData(): ArrayList<RowRepresentableEditDescriptor> {
fun getData(): ArrayList<RowRepresentableEditDescriptor>? {
return this.rowRepresentableEditDescriptors
}

@ -8,6 +8,7 @@ import io.realm.RealmResults
import kotlinx.android.synthetic.main.bottom_sheet_list.*
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
import net.pokeranalytics.android.ui.adapter.LiveRowRepresentableDataSource
import net.pokeranalytics.android.ui.adapter.RowRepresentableAdapter
import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate
@ -70,10 +71,14 @@ open class BottomSheetListFragment : BottomSheetFragment(), LiveRowRepresentable
* Init data
*/
open fun initData() {
val bottomSheetData = getData()
if (bottomSheetData.isNotEmpty() && bottomSheetData.first().data != null) {
this.realmData = bottomSheetData.first().data as RealmResults<*>
val bottomSheetData = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (bottomSheetData.size != 1) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
if (bottomSheetData.first().data == null) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
this.realmData = bottomSheetData.first().data as RealmResults<*>
}
/**

@ -9,6 +9,7 @@ import io.realm.RealmResults
import kotlinx.android.synthetic.main.bottom_sheet_game_list.*
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
import net.pokeranalytics.android.model.Limit
import net.pokeranalytics.android.ui.adapter.RowRepresentableAdapter
import net.pokeranalytics.android.ui.view.RowRepresentable
@ -47,11 +48,15 @@ class BottomSheetListGameFragment : BottomSheetListFragment() {
* Init data
*/
override fun initData() {
val bottomSheetData = getData()
if (bottomSheetData.isNotEmpty() && bottomSheetData.size >= 2 && bottomSheetData[1].data != null) {
this.limit = bottomSheetData[0].defaultValue as Int?
this.realmData = bottomSheetData[1].data as RealmResults<*>
val bottomSheetData = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (bottomSheetData.size != 2) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
if (bottomSheetData[1].data == null) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
this.limit = bottomSheetData[0].defaultValue as Int?
this.realmData = bottomSheetData[1].data as RealmResults<*>
}
/**

@ -6,6 +6,8 @@ import android.os.Bundle
import android.view.View
import io.realm.RealmList
import io.realm.RealmObject
import io.realm.RealmResults
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
import net.pokeranalytics.android.model.LiveData
import net.pokeranalytics.android.ui.activity.EditableDataActivity
import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity
@ -65,13 +67,14 @@ open class BottomSheetMultiSelectionFragment : BottomSheetListFragment() {
}
override fun initData() {
super.initData()
getData().first().defaultValue?.let {
val bottomSheetData = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (bottomSheetData.size != 1) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
bottomSheetData.first().defaultValue?.let {
(it as RealmList<*>).forEach{row ->
selectedRows.add(row as RowRepresentable)
this.selectedRows.add(row as RowRepresentable)
}
}
}
}

@ -7,6 +7,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import kotlinx.android.synthetic.main.bottom_sheet_list.*
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
import net.pokeranalytics.android.model.TournamentType
import net.pokeranalytics.android.ui.adapter.RowRepresentableAdapter
import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate
@ -44,10 +45,14 @@ class BottomSheetStaticListFragment : BottomSheetFragment(), StaticRowRepresenta
* Init data
*/
private fun initData() {
val bottomSheetData = this.getData()
if (bottomSheetData.isNotEmpty() && bottomSheetData.first().staticData != null) {
this.staticRows = bottomSheetData.first().staticData as List<RowRepresentable>
val bottomSheetData = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (bottomSheetData.size != 1) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
if (bottomSheetData.first().staticData == null) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
this.staticRows = bottomSheetData.first().staticData as List<RowRepresentable>
}
/**

@ -9,6 +9,7 @@ import androidx.core.widget.addTextChangedListener
import kotlinx.android.synthetic.main.bottom_sheet_sum.*
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.*
import net.pokeranalytics.android.R
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
import net.pokeranalytics.android.util.extensions.round
import net.pokeranalytics.android.util.extensions.toCurrency
@ -47,8 +48,10 @@ class BottomSheetSumFragment : BottomSheetFragment() {
* Init UI
*/
private fun initUI() {
val data = getData()
val data = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (data.size != 5) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
setAddButtonVisible(false)

@ -6,6 +6,7 @@ import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import kotlinx.android.synthetic.main.bottom_sheet_grid.*
import kotlinx.android.synthetic.main.fragment_bottom_sheet.view.*
import net.pokeranalytics.android.exceptions.RowRepresentableEditDescriptorException
import net.pokeranalytics.android.model.TableSize
import net.pokeranalytics.android.ui.adapter.RowRepresentableAdapter
import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate
@ -38,11 +39,11 @@ class BottomSheetTableSizeGridFragment : BottomSheetFragment(), StaticRowReprese
* Init data
*/
private fun initData() {
val bottomSheetData = getData()
if (bottomSheetData.isNotEmpty() && bottomSheetData.first().defaultValue != null) {
defaultSize = bottomSheetData.first().defaultValue as Int?
val bottomSheetData = getData()?:throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor not found")
if (bottomSheetData.size != 1) {
throw RowRepresentableEditDescriptorException("RowRepresentableEditDescriptor inconsistency")
}
defaultSize = bottomSheetData.first().defaultValue as Int?
}
/**

@ -1,6 +1,7 @@
package net.pokeranalytics.android.ui.view
import android.content.Context
import io.realm.RealmResults
import net.pokeranalytics.android.model.LiveData
import net.pokeranalytics.android.ui.fragment.components.bottomsheet.BottomSheetType
import net.pokeranalytics.android.util.NULL_TEXT
@ -14,14 +15,9 @@ interface RowRepresentable : Displayable {
return NULL_TEXT
}
var isSelected: Boolean
get() {
return false
}
set(value) {
}
fun editingDescriptors(map:Map<String,Any?>): ArrayList<RowRepresentableEditDescriptor>? {
return null
}
}
/**

@ -3,6 +3,7 @@ package net.pokeranalytics.android.ui.view.rowrepresentable
import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.fragment.components.bottomsheet.BottomSheetType
import net.pokeranalytics.android.ui.view.RowRepresentable
import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor
import net.pokeranalytics.android.ui.view.RowViewType
@ -12,4 +13,9 @@ enum class SimpleRow : RowRepresentable {
override val resId: Int? = R.string.name
override val viewType: Int = RowViewType.TITLE_VALUE.ordinal
override val bottomSheetType: BottomSheetType = BottomSheetType.EDIT_TEXT
override fun editingDescriptors(map: Map<String, Any?>): ArrayList<RowRepresentableEditDescriptor>? {
val defaultValue by map
return arrayListOf(RowRepresentableEditDescriptor(defaultValue, this.resId))
}
}

@ -0,0 +1,26 @@
package net.pokeranalytics.android.util
import android.os.Build
/**
* Helper to get the device model
*/
class ModelUtils {
companion object {
/**
* Get the device name
*/
fun getDeviceName(): String {
val manufacturer = Build.MANUFACTURER
val model = Build.MODEL
return if (model.toLowerCase().startsWith(manufacturer.toLowerCase())) {
model.capitalize()
} else {
manufacturer.capitalize() + " " + model
}
}
}
}

@ -81,7 +81,7 @@ fun Date.getShortDayName() : String {
}
// Return the month & year of the date
fun Date.getMonthAndYear(): String {
return SimpleDateFormat("MMMM YYYY", Locale.getDefault()).format(this).capitalize()
return SimpleDateFormat("MMMM yyyy", Locale.getDefault()).format(this).capitalize()
}
// Return the netDuration between two dates

@ -13,6 +13,7 @@ import net.pokeranalytics.android.BuildConfig
import net.pokeranalytics.android.R
import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment
import net.pokeranalytics.android.util.ModelUtils
import net.pokeranalytics.android.util.URL
@ -59,7 +60,7 @@ fun PokerAnalyticsActivity.openPlayStorePage() {
// Open email for "Contact us"
fun PokerAnalyticsActivity.openContactMail(subjectStringRes: Int) {
val info = "v${BuildConfig.VERSION_NAME}(${BuildConfig.VERSION_CODE}), Android ${android.os.Build.VERSION.SDK_INT}"
val info = "v${BuildConfig.VERSION_NAME}(${BuildConfig.VERSION_CODE}), Android ${android.os.Build.VERSION.SDK_INT}, ${ModelUtils.getDeviceName()}"
val intent = Intent(Intent.ACTION_SENDTO)
intent.data = Uri.parse("mailto:${URL.SUPPORT_EMAIL.value}")
intent.putExtra(Intent.EXTRA_SUBJECT, getString(subjectStringRes))

@ -2,8 +2,8 @@
<string name="app_name">Poker Analytics</string>
<string name="_ago">%@</string>
<string name="_doesn_t_have_access_to_your_contacts_alert_message">%@不能访问你的联系人且不能检索你的现有好友姓名。通过iPhone首选项可授权防止任何\'陌生用户\'名访问。</string>
<string name="_ago">%s</string>
<string name="_doesn_t_have_access_to_your_contacts_alert_message">%s不能访问你的联系人且不能检索你的现有好友姓名。通过iPhone首选项可授权防止任何\'陌生用户\'名访问。</string>
<string name="_indicates_that_the_file_is_on_your_icloud_account_">一颗星表示一个文件存储在你的iCloud帐户上。</string>
<string name="activate">启用</string>
<string name="activate_icloud_storage_detailed_explaination">iCloud在你的所有设备上保存你的数据并保持最新。启用时,你的数据被移至iCloud,在其它设备访问你的数据前,这可能要花费一段时间。</string>
@ -137,7 +137,7 @@
<string name="end">结束</string>
<string name="end_all_the_games_validation_popup_title">你要结束所有游戏?</string>
<string name="end_date">结束日期</string>
<string name="end_date_have_not_been_set_the_format_may_not_be_correct_here_is_the_value_used_for_parsing_">未设置结束日期!该格式可能不正确。这里是用于分析的值:%@</string>
<string name="end_date_have_not_been_set_the_format_may_not_be_correct_here_is_the_value_used_for_parsing_">未设置结束日期!该格式可能不正确。这里是用于分析的值:%s</string>
<string name="end_of_rebuy_period_and_blinds_level_up">重新购买周期结束,盲注增加</string>
<string name="end_of_rebuy_period_in_less_than_one_minute">一分钟内重新购买周期结束</string>
<string name="end_of_session_is_close_press_details_to_stop_your_session_and_set_results">进程结束已关闭,触按详情停止你的进程并设置结果 </string>
@ -156,7 +156,7 @@
<string name="export_popup_title">选择类型</string>
<string name="feature_locked_and_inapp_purchase_disabled">此功能已锁定,很遗憾你已禁用应用内购买。请核查设置。</string>
<string name="file_directory_creation_error">导入失败。某些用来导入的文件无法创建,这可能由于空间不够</string>
<string name="file_named_was_successfully_saved_on_your_icloud_account">名为%@的文件已成功保存在你的iCloud帐户上。</string>
<string name="file_named_was_successfully_saved_on_your_icloud_account">名为%s的文件已成功保存在你的iCloud帐户上。</string>
<string name="filter">筛选</string>
<string name="filter_selection">筛选启用</string>
<string name="filter_used_in_one_or_more_reports_you_can_t_delete_it_">此筛选无法删除,因为它链接1个或多个报告。</string>
@ -203,7 +203,7 @@
<string name="import_str">导入</string>
<string name="import_from_address_book">使用通讯录</string>
<string name="import_not_successfull">识别出问题</string>
<string name="import_session_save_error_">保存进程时出错:%@</string>
<string name="import_session_save_error_">保存进程时出错:%s</string>
<string name="import_successfull">导入成功</string>
<string name="imported_session">导入进程</string>
<string name="in"></string>
@ -230,7 +230,7 @@
<string name="live_online_room">在线/房间</string>
<string name="load_from_db">打开&#8230;</string>
<string name="location">位置</string>
<string name="location_">位置:%@</string>
<string name="location_">位置:%s</string>
<string name="location_empty_field_error">你需要命名此位置。</string>
<string name="location_not_track">未追踪的位置</string>
<string name="location_track">追踪的位置</string>
@ -324,7 +324,7 @@
<string name="player">玩家</string>
<string name="players">玩家</string>
<string name="please_check_if_your_values_are_valid">请检查你的值是否有效</string>
<string name="please_confirm_the_import_start_">请确认导入\'%@\'?</string>
<string name="please_confirm_the_import_start_">请确认导入\'%s\'?</string>
<string name="please_select_the_field_corresponding_to">请选择相应的字段:</string>
<string name="please_type_your_pin_code">请输入你的PIN码</string>
<string name="plus"></string>
@ -364,11 +364,11 @@
<string name="restart_timer">重新开始定时器</string>
<string name="result">结果</string>
<string name="room">房间</string>
<string name="room_">房间:%@</string>
<string name="room_">房间:%s</string>
<string name="room_empty_field_error">你需要命名此房间</string>
<string name="rooms">房间</string>
<string name="running_session_state">运行中</string>
<string name="same_name_different_kind_custom_field_log_">自定义字段\'%@\'已存在于你的数据库中,但类型不同。此字段和它的所有值将被忽略。若你真要保留此值,请取消此导入,重命名自定义字段并重试该导入。</string>
<string name="same_name_different_kind_custom_field_log_">自定义字段\'%s\'已存在于你的数据库中,但类型不同。此字段和它的所有值将被忽略。若你真要保留此值,请取消此导入,重命名自定义字段并重试该导入。</string>
<string name="save_report_error_popup_message">你需要命名它并选择至少一个统计保存此报告 </string>
<string name="saving_imported_data_please_wait_">正在保存导入数据,请等待&#8230;</string>
<string name="security">安全</string>
@ -379,7 +379,7 @@
<string name="services">设置</string>
<string name="session">进程</string>
<string name="session_duration">进程时长</string>
<string name="session_won_amount_have_not_been_set_here_is_the_value_used_for_parsing_">未设置进程获胜数量!这是被用来分析的值:%@</string>
<string name="session_won_amount_have_not_been_set_here_is_the_value_used_for_parsing_">未设置进程获胜数量!这是被用来分析的值:%s</string>
<string name="session_s_comments_updated_">进程的评论已更新</string>
<string name="sessions">进程</string>
<string name="share_chart">分享图表</string>
@ -398,7 +398,7 @@
<string name="standard_deviation">标准偏差</string>
<string name="start">开始</string>
<string name="start_date">开始日期</string>
<string name="start_date_have_not_been_set_the_format_may_not_be_correct_here_is_the_value_used_for_parsing_">未设置开始日期,格式可能错误。这是导入时使用的值:%@</string>
<string name="start_date_have_not_been_set_the_format_may_not_be_correct_here_is_the_value_used_for_parsing_">未设置开始日期,格式可能错误。这是导入时使用的值:%s</string>
<string name="start_import"></string>
<string name="statistics">统计</string>
<string name="stats">统计</string>
@ -417,11 +417,11 @@
<string name="tap_or_slide">点击或滑动</string>
<string name="thank_you_message">恭喜,该内容现在可用。</string>
<string name="the_at_">%1$@,%2$@</string>
<string name="the_location_named_already_have_these_coordinates">名为%@的位置已有这些坐标。</string>
<string name="the_location_named_already_have_these_coordinates">名为%s的位置已有这些坐标。</string>
<string name="the_rate_wasn_t_able_to_be_found_a_rate_of_1_will_be_used_by_default_you_can_still_edit_the_rate_by_yourself_">当前评分无法检索。默认将使用的评分为1。你仍能单独编辑该评分。</string>
<string name="the_session_already_exists_start_date_end_date_amount_won_">该进程已存在!开始日期:%1$@,结束日期:%2$@,获胜数量 :%3$@ </string>
<string name="the_session_already_exists_start_date_end_date_net_result_">该进程已存在!开始日期:%1$@,结束日期:%2$@,净结果:%3$@</string>
<string name="this_game_started_">你的进程已开始:%@</string>
<string name="this_game_started_">你的进程已开始:%s</string>
<string name="this_month">本月</string>
<string name="this_week">本周</string>
<string name="this_year">今年</string>
@ -451,14 +451,14 @@
<string name="twitter">Twitter</string>
<string name="type">类型</string>
<string name="type_de_limite">限制类型</string>
<string name="unable_to_get_from_fixer_io_">无法从雅虎获得评分- %@</string>
<string name="unable_to_get_from_fixer_io_">无法从雅虎获得评分- %s</string>
<string name="unfollowed_">已取消关注!</string>
<string name="unknown_import_format_popup_message">文件格式无法识别</string>
<string name="unknown_user">未知用户</string>
<string name="user_empty_field_error">你需要命名你的好友</string>
<string name="validate">验证</string>
<string name="value"></string>
<string name="variant_">游戏:%@</string>
<string name="variant_">游戏:%s</string>
<string name="variant_empty_name_error">你需要命名该游戏</string>
<string name="variant_empty_shortname_error">你需要为该游戏进行简短命名</string>
<string name="version">版本</string>
@ -470,7 +470,7 @@
<string name="week_days">工作日</string>
<string name="weekdays_or_weekend">工作日或周末</string>
<string name="weekend">周末</string>
<string name="welcome_in_">欢迎使用%@</string>
<string name="welcome_in_">欢迎使用%s</string>
<string name="win_ratio">获胜率</string>
<string name="with">利用</string>
<string name="withdrawal">提款</string>
@ -488,7 +488,7 @@
<string name="yes_use_icloud"></string>
<string name="yesterday">昨天</string>
<string name="yesterday_and_today">今天和昨天</string>
<string name="you_can_retrieve_the_generated_file_named_within_itunes">你能检索iTunes内生成的名为%@的文件。</string>
<string name="you_can_retrieve_the_generated_file_named_within_itunes">你能检索iTunes内生成的名为%s的文件。</string>
<string name="you_can_t_have_more_than_i_comparison_keys_selected">抱歉,你不能同时启用超过%i个的比较密匙!</string>
<string name="your_are_going_to_affect_the_following_values_to_all_imported_sessions_please_check_the_following_">你要对所有导入的进程指定以下值。请检查以下项目: </string>
<string name="your_attention">警告</string>
@ -561,7 +561,7 @@
<string name="from_hour_">来自</string>
<string name="to_hour_"></string>
<string name="maximum">最大值</string>
<string name="whats_new_in_">%@有何新功能?</string>
<string name="whats_new_in_">%s有何新功能?</string>
<string name="releasenote_question">喜欢Poker Analytics?</string>
<string name="releasenote_invitation">请反馈本应用如何</string>
<string name="releasenote_rating">在App Store给我们评分</string>
@ -569,12 +569,12 @@
<string name="stop_notification_body">时间到!</string>
<string name="stop_notification_title">根据你的历史记录,好像你开始累了。可能该停止了!</string>
<string name="stop_notifications">停止通知</string>
<string name="stop_notification_in_">在%@中已设置停止通知</string>
<string name="stop_notification_in_">在%s中已设置停止通知</string>
<string name="save_authorize">保存和授权</string>
<string name="select_a_color">选择颜色</string>
<string name="spotlight_indexing">聚焦索引</string>
<string name="_is_not_authorize_to_access_the_camera_be_aware_that_the_app_will_be_terminated_if_you_modify_the_privacy_setting_">未授权%@访问摄像头。若修改隐私设置,请注意自动关闭应用将失去未保存的数据。</string>
<string name="_is_not_authorize_to_access_your_library_be_aware_that_the_app_will_be_terminated_if_you_modify_the_privacy_setting_">未授权%@访问照片库。若修改隐私设置,请注意自动关闭应用将失去未保存的数据。</string>
<string name="_is_not_authorize_to_access_the_camera_be_aware_that_the_app_will_be_terminated_if_you_modify_the_privacy_setting_">未授权%s访问摄像头。若修改隐私设置,请注意自动关闭应用将失去未保存的数据。</string>
<string name="_is_not_authorize_to_access_your_library_be_aware_that_the_app_will_be_terminated_if_you_modify_the_privacy_setting_">未授权%s访问照片库。若修改隐私设置,请注意自动关闭应用将失去未保存的数据。</string>
<string name="new_hand">新手</string>
<string name="new_note">新备注</string>
<string name="tap_to_learn_more">触按一个项目了解详情</string>
@ -594,9 +594,9 @@
<string name="autorenewable_subcription">自动续订订阅</string>
<string name="terms">条件</string>
<string name="stop_notifications_explanation">Poker Analytics尝试估算您的最佳进程时长并在你到达该时长时发送通知。需要约50局。</string>
<string name="_icloud_sync_wasn_t_able_to_be_enabled">不能启动iCloud同步。也许你在iCloud上有旧%@数据。</string>
<string name="_icloud_sync_wasn_t_able_to_be_enabled">不能启动iCloud同步。也许你在iCloud上有旧%s数据。</string>
<string name="icloud_reset_and_retry">清牌后重试</string>
<string name="_icloud_reset_warning">你将重置iCloud上%@的数据,你的本地数据不会更改,但你必需中止所有其它设备上的iCloud同步。确定这么做?</string>
<string name="_icloud_reset_warning">你将重置iCloud上%s的数据,你的本地数据不会更改,但你必需中止所有其它设备上的iCloud同步。确定这么做?</string>
<string name="remove_picture">删除图片</string>
<string name="icloud_is_syncing">同步中</string>
<string name="icloud_update_issue">错误</string>
@ -607,7 +607,7 @@
<string name="icloud_ok_and_ready"></string>
<string name="icloud_migration_failure_error_message">由于数据库出现重要变更,出于安全考虑已在应用上禁用iCloud,你的数据已被移回你的本地设备。请在所有其它设备上禁用iCloud同步。若要重新启动iCloud,必须提前删除iCloud数据。</string>
<string name="icloud_sync_wasn_t_able_to_be_disabled">不能禁用iCloud同步。</string>
<string name="currently_having_chips">当前有%@个筹码</string>
<string name="currently_having_chips">当前有%s个筹码</string>
<string name="icloud_timeout">iCloud请求超时。</string>
<string name="vs">对战</string>
<string name="open_privacy_settings">打开隐私设置</string>

@ -15,6 +15,8 @@ class ExampleUnitTest : RealmUnitTest() {
class Grade(someValue: Double) : SessionInterface {
override var bbPer100Hands: Double = 0.0
override var ratedNet: Double = 0.0
override var value: Double = someValue
override var sessionSet: SessionSet? = SessionSet()

Loading…
Cancel
Save