Skip to content

Instantly share code, notes, and snippets.

View moizest89's full-sized avatar
🎯
Focusing

Moises Portillo moizest89

🎯
Focusing
View GitHub Profile
//Data methods
private void getValuesUrl(){
Log.e("fragment", URL_CONNECTION);
JsonObjectRequest request = new JsonObjectRequest(this.URL_CONNECTION, null,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
//System.out.print("response: "+response);
setValuesUrl(response);
}
package models;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by @moizest89 in SV on 8/14/15.
*/
public class ArticlesVideosModel implements Parcelable{
package models;
import android.os.Parcel;
import android.os.Parcelable;
public class ArticlesPhotosModel implements Parcelable {
public static final String CN_PHOTOS = "photos";
public static final String CN_RETINA3X = "retina3x";
package models;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@moizest89
moizest89 / gist:7009635
Last active December 25, 2015 16:59
Simple class to determinate if your device is tablet or phone from your size. If size > 5 is tablet
import android.content.Context;
import android.util.DisplayMetrics;
public class isTablet {
double size_device;
public double tabletSize(Context context) {
double size = 0;
try {
// Compute screen size