Skip to content

Instantly share code, notes, and snippets.

@jaisonfdo
jaisonfdo / AlertDialogHelper1.java
Last active October 5, 2019 06:45
It is the utility class contains set of utility methods to show dialogs and returns their clicks using callback methods.For more information, check out my detailed guide here : http://droidmentor.com/show_alertdialog_android/
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Looper;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
/**
@nikhiljha
nikhiljha / AddCookiesInterceptor.java
Created July 29, 2016 04:35
Retrofit2/OkHttp3 Cookies (Drag and Drop, One Size Fits 99%)
// Original written by tsuharesu
// Adapted to create a "drop it in and watch it work" approach by Nikhil Jha.
// Just add your package statement and drop it in the folder with all your other classes.
import android.content.Context;
import android.preference.PreferenceManager;
import android.util.Log;
import java.io.IOException;
import java.util.HashSet;
@koocbor
koocbor / CreateDialog.java
Last active June 20, 2022 15:50
Full Screen Dialog in Android
FullScreenDialog dialog = new FullScreenDialog();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
dialog.show(ft, FullScreenDialog.TAG);