Skip to content

Instantly share code, notes, and snippets.

View AkshatAgrawal05's full-sized avatar

Akshat Agrawal AkshatAgrawal05

View GitHub Profile
@weverb2
weverb2 / FormValidationActivity.kt
Last active March 19, 2023 01:30
Data Binding + LIve Data Form Validation
import android.os.Bundle
import android.util.Log
import android.util.Patterns
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProviders
import works.wever.mvvm.R
@AkshatAgrawal05
AkshatAgrawal05 / FabTabBackgroundView.java
Last active August 25, 2017 09:58
Code Snippet to create Google Space like navigation tab in Android
public final class FabTabBackgroundView extends View {
Paint paint;
Path path;
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public FabTabBackgroundView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
init();
}