Skip to content

Instantly share code, notes, and snippets.

Avatar
😎

Kishan Donga kishandonga

😎
View GitHub Profile
View RxDisposable.java
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
public class RxDisposable {
private static final RxDisposable RX_DISPOSABLE = new RxDisposable();
private CompositeDisposable compositeDisposable = new CompositeDisposable();
public static void addDisposable(Disposable disposable) {
RX_DISPOSABLE.compositeDisposable.add(disposable);
View GpsUtils.java
import android.app.Activity;
import android.content.Context;
import android.content.IntentSender;
import android.location.LocationManager;
import android.util.Log;
import android.widget.Toast;
import com.google.android.gms.common.api.ApiException;
import com.google.android.gms.common.api.ResolvableApiException;
import com.google.android.gms.location.LocationRequest;
@kishandonga
kishandonga / FrequentClickBlocker.java
Last active Jun 26, 2020
Android Preventing Double Click On A Button
View FrequentClickBlocker.java
import android.os.Handler;
public class FrequentClickBlocker {
private boolean mIsBlockClick = true;
public void release() {
new Handler().postDelayed(() -> mIsBlockClick = true, 1000);
}
@kishandonga
kishandonga / card_view_type_shadow_drwable.xml
Created Jun 13, 2020
Drop Shadow using drawable as like CardView
View card_view_type_shadow_drwable.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
You can’t perform that action at this time.