Posts

CenteringRecyclerView

  public class CenteringRecyclerView extends RecyclerView { public static final int ALIGN_HEAD = 0 ; public static final int ALIGN_TAIL = 1 ; public static final int ALIGN_CENTER = 2 ; public static final int SNAPPING_STRATEGY_HEAD = 0 ; public static final int SNAPPING_STRATEGY_TAIL = 1 ; public static final int SNAPPING_STRATEGY_CENTER = 2 ; public static final int SNAPPING_STRATEGY_NONE = 3 ; private boolean mIgnoreIfVisible ; private boolean mIgnoreIfCompletelyVisible ; public CenteringRecyclerView ( Context context) { this (context, null ); } public CenteringRecyclerView ( Context context, AttributeSet attrs) { this (context, attrs, 0 ); } public CenteringRecyclerView ( Context context, AttributeSet attrs, int defStyle) { super (context, attrs, defStyle); TypedArray a = context.getTheme().obtainStyledAttributes( attrs, R . styleable . CenteringRecyclerView , ...

International Men's Day 2020 Quotes & Wishes: Check This Year's Theme

  International Men's Day 2020 Quotes & Wishes: Check This Year's Theme for more information about "international man's day quotes" and "international man's day wishes" follow the below link : International Man's Day

4 terrorists killed in an encounter at Nagrota district in Jammu and Kashmir

  4 terrorists killed in an encounter at Nagrota district in Jammu and Kashmir The encounter took place between security forces and terrorists at Jammu and Kashmir's Nagrota district.

FireStore RecyclerView With Text and Image View.

build.gradle ( app level) apply plugin : 'com.android.application' apply plugin : 'com.google.gms.google-services' android { compileSdkVersion 29 buildToolsVersion "29.0.3" defaultConfig { applicationId "hego.android.befoodie" minSdkVersion 23 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt' ), 'proguard-rules.pro' } } } dependencies { implementation fileTree( dir : "libs" , include : [ "*.jar" ]) implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0...

Survive Configuration change with ViewModel

Manifest.xml <? xml version ="1.0" encoding ="utf-8" ?> < manifest xmlns: android ="http://schemas.android.com/apk/res/android" package ="hego.android.savestatewithviewmodel" > < uses-permission android :name ="android.permission.INTERNET" /> < application android :allowBackup ="true" android :icon ="@mipmap/ic_launcher" android :label ="@string/app_name" android :roundIcon ="@mipmap/ic_launcher_round" android :supportsRtl ="true" android :theme ="@style/AppTheme" > < activity android :name =".MainActivity" > < intent-filter > < action android :name ="android.intent.action.MAIN" /> < category android :name ="android.intent.category.LAUNCHER" /> </ intent-filter > ...