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 org.junit.rules.TestRule; | |
import org.junit.runner.Description; | |
import org.junit.runners.model.Statement; | |
import io.reactivex.plugins.RxJavaPlugins; | |
import io.reactivex.schedulers.Schedulers; | |
public class ImmediateSchedulersRule implements TestRule { | |
@Override |
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 class MainActivity extends AppCompatActivity { | |
//Handler & Thread | |
int mProgression = 0; | |
Handler mHandler = null; | |
private static final int WHAT_PROGRESSION = 1; | |
private boolean mStarted = false; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
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
/** | |
* @Author McGalanes | |
* @Email [email protected] | |
*/ | |
public class LoadMoreAdapter extends RecyclerView.Adapter { | |
private final int VIEW_ITEM = 1; | |
private final int VIEW_PROG = 0; | |
private List<City> mCityList; |
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 static class CacheUtils { | |
public static boolean exists(Context context, String filename) { | |
return new File(context.getCacheDir(), filename).exists(); | |
} | |
public static void write(Context context, String filename, final byte[] content, final boolean append) { | |
final File cache = new File(context.getCacheDir(), filename); | |
try { |
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
/** | |
* Created by McGalanes on 02/12/2016. | |
*/ | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.graphics.Point; | |
import android.util.DisplayMetrics; | |
import android.view.Display; | |
import android.view.View; |