Applying Enum Consist Of 3 Adapters Between 2 Activities In Kotlin
I wonder if somebody can help me to solve enum problem for represent 2 object inside Main2Activity.kt? I have 2 activities to connect between the: The first activity for Grid View
Solution 1:
You just have to send it in your bundle like the other informations
intent.putExtra(Main2Activity.EXTRA_ADAPTER_MODE, AdapterType.ADAPTER_TYPE_1.toOrdinal())
and then get it from the bundle in your second Activity
valadapterTypeOrdinal= intent.getIntExtra(EXTRA_ADAPTER_MODE, 0) // 0 is the default valuevaltype= AdapterType.fromOrdinal(adapterTypeOrdinal)
Post a Comment for "Applying Enum Consist Of 3 Adapters Between 2 Activities In Kotlin"