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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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 FeatureActivity : AppCompatActivity(R.layout.feature_activity) { | |
@Inject | |
@UserModelSingletonQualifier | |
lateinit var singletonUserModel: UserModel | |
@Inject | |
lateinit var savedStateViewModelFactory: DFMSavedStateViewModelFactory | |
private val featureActivityViewModel by viewModels<FeatureActivityViewModel> { savedStateViewModelFactory } |
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
@Module | |
@InstallIn(ActivityComponent::class) | |
object ActivityViewModelModule { | |
@Provides | |
fun provideSavedStateViewModelFactory( | |
application: Application, | |
activity: Activity, | |
viewModelFactories: @JvmSuppressWildcards Map<String, Provider<ViewModelAssistedFactory<out ViewModel>>>, | |
): DFMSavedStateViewModelFactory { |
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
@Module | |
@InstallIn(ApplicationComponent::class) | |
object CoreModule { | |
@Provides | |
@Singleton | |
@UserModelSingletonQualifier | |
fun provideUserModel() = UserModel(value = "Singleton") | |
} |
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
@HiltAndroidApp | |
class MyApplication : Application() { | |
@Inject | |
@UserModelSingletonQualifier | |
lateinit var singletonUserModel: UserModel | |
override fun onCreate() { | |
super.onCreate() | |
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
package com.vk.im.ui.utils.recyclerview; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.SparseIntArray; | |
/** | |
* RecycledViewPool with unlimited number of ViewHolders | |
* {@author [email protected]} | |
*/ | |
public class NoLimitRecycledViewPool extends RecyclerView.RecycledViewPool { |
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
package com.example.yourapp; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.os.Build; | |
import android.security.KeyPairGeneratorSpec; | |
import android.security.keystore.KeyGenParameterSpec; | |
import android.security.keystore.KeyProperties; | |
import android.support.annotation.RequiresApi; |
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
Africa/Abidjan | |
Africa/Accra | |
Africa/Addis_Ababa | |
Africa/Algiers | |
Africa/Asmara | |
Africa/Asmera | |
Africa/Bamako | |
Africa/Bangui | |
Africa/Banjul | |
Africa/Bissau |