This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data class Params( | |
| val mainImageResId: Int, | |
| val mainText: String, | |
| val secondaryText: String, | |
| val mainButtonText: String, | |
| val secondaryButtonText: String | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data class Params( | |
| val mainImageResId: Int, | |
| val mainText: String, | |
| val secondaryText: String, | |
| val mainButtonText: String, | |
| val secondaryButtonText: String, | |
| val mainButtonFunction: () -> Unit, | |
| val secondaryButtonFunction: () -> Unit | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Parcelize | |
| data class Params( | |
| val mainImageResId: Int, | |
| val mainText: String, | |
| val secondaryText: String, | |
| val mainButtonText: String, | |
| val secondaryButtonText: String, | |
| val mainButtonFunction: Serializable, | |
| val secondaryButtonFunction: Serializable | |
| ) : Parcelable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private fun startFirstActivity() { | |
| ParameterizedActivity.start(this, Params.create( | |
| R.drawable.ic_success, | |
| "Success", | |
| "You finished registration process!", | |
| "Cancel", | |
| "OK", | |
| { context -> goBack(context) }, | |
| { context -> Toast.makeText(context, "This is great success)", Toast.LENGTH_SHORT).show() } | |
| )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ParameterizedActivity : AppCompatActivity() { | |
| companion object { | |
| const val INTENT_PARAMS = "INTENT_PARAMS" | |
| fun start(context: Context, params: Params) { | |
| val intent = Intent(context, ParameterizedActivity::class.java) | |
| intent.putExtra(INTENT_PARAMS, params) | |
| context.startActivity(intent) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val preferencesModule = module { | |
| single { provideSettingsPreferences(androidApplication()) } | |
| } | |
| private const val PREFERENCES_FILE_KEY = "com.example.settings_preferences" | |
| private fun provideSettingsPreferences(app: Application): SharedPreferences = | |
| app.getSharedPreferences(PREFERENCES_FILE_KEY, Context.MODE_PRIVATE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val preferencesModule = module { | |
| single(named("settingsPrefs")) { provideSettingsPreferences(androidApplication()) } | |
| single(named("securePrefs")) { provideSecurePreferences(androidApplication()) } | |
| } | |
| private const val PREFERENCES_FILE_KEY = "com.example.settings_preferences" | |
| private const val SECURE_PREFS_FILE_KEY = "com.example.secure_preferences" | |
| private fun provideSettingsPreferences(app: Application): SharedPreferences = | |
| app.getSharedPreferences(PREFERENCES_FILE_KEY, Context.MODE_PRIVATE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <layout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto"> | |
| <data> | |
| <variable | |
| name="viewModel" | |
| type="com.wgsa.wgsa.feature.likemsg.SendLikeMsgViewModel" /> | |
| </data> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <MotionScene xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:motion="http://schemas.android.com/apk/res-auto"> | |
| <Transition | |
| motion:constraintSetEnd="@id/endScene" | |
| motion:constraintSetStart="@id/startScene" | |
| motion:duration="600" /> | |
| <ConstraintSet android:id="@+id/startScene"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <gradient | |
| android:angle="90" | |
| android:startColor="#f8c6da7b" | |
| android:centerColor="#e600ad7b" | |
| android:endColor="#99009897" | |
| android:type="linear" /> | |
| <stroke android:width="10dp" android:color="#FFFFFF" /> | |
| <corners android:radius="10dp"/> |
OlderNewer