This file contains 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
abstract class RealmObjBundler<T extends RealmObject> implements Bundler<T> { | |
abstract public String[] args(T obj); | |
@NonNull abstract public RealmQuery<T> query(Realm realm, String... args); | |
@Override public void put(String s, final T obj, Bundle bundle) { | |
if (obj == null) return; | |
ArrayList<String> args = new ArrayList<>(); | |
// We need to know whether this was managed before to determine if we need to delete it afterwards |
This file contains 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
public abstract class GsonBundler<T> implements Bundler<T> { | |
//Maximum bytes this fragment is allowed to save, os limit is 1 Mb | |
public static final int MAX_BUNDLE_BYTE_SIZE = 93750; //93750 bytes == .75 Mb | |
abstract Class<T> getObjClass(); | |
@Override public void put(String s, T obj, Bundle bundle) { | |
putReturnSize(s, obj, bundle); | |
} |
This file contains 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
{"lastUpload":"2021-08-07T13:12:16.241Z","extensionVersion":"v3.4.3"} |
This file contains 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 android.support.annotation.Nullable; | |
import java.util.Stack; | |
import retrofit2.Call; | |
/** | |
* Simple helper class to monitor the Retrofit 2 calls. Biggest use case is to cancel all pending calls. | |
*/ | |
public class RetroCallStack { |
This file contains 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 android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.PorterDuff; | |
import android.graphics.drawable.ColorDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.os.Handler; | |
import android.support.annotation.ColorRes; | |
import android.support.annotation.IdRes; | |
import android.support.v4.content.ContextCompat; |
This file contains 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 retrofit2.Call; | |
import retrofit2.Callback; | |
import retrofit2.Response; | |
/** | |
* <p> | |
* Builds upon the Retrofit {@link Callback} class. Useful when each HTTP code group has | |
* specific functionality. This lacks some of the flexibility of {@link Callback} though. | |
* </p> | |
*/ |
NewerOlder