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
package com.application.freadom.activity.home; | |
import android.content.Context; | |
import android.support.annotation.NonNull; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v7.widget.GridLayoutManager; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.LinearSnapHelper; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.SnapHelper; |
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
@BindView(R.id.image_progress) | |
AppCompatImageView mLoadingProgress; | |
private AnimatedVectorDrawableCompat mAVD = AnimatedVectorDrawableCompat.create(getContext(), R.drawable.avd_spectrum_logo); | |
if (mLoadingProgress != null && mAVD != null) { | |
mLoadingProgress.setImageDrawable(mAVD); | |
mAVD.start(); | |
mAVD.registerAnimationCallback(new Animatable2Compat.AnimationCallback() { |
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 Vipul Asri on 02/04/17. | |
// | |
#include <jni.h> | |
extern "C" { | |
JNIEXPORT jstring JNICALL | |
Java_com_squareboat_secretkeys_MainActivity_getAPIKey(JNIEnv *env, jobject instance) { |
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
# Sets the minimum version of CMake required to build your native library. | |
# This ensures that a certain set of CMake features is available to | |
# your build. | |
cmake_minimum_required(VERSION 3.4.1) | |
# Specifies a library name, specifies whether the library is STATIC or | |
# SHARED, and provides relative paths to the source code. You can | |
# define multiple libraries by adding multiple add.library() commands, | |
# and CMake builds them for you. When you build your app, Gradle |
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 LollipopBitmapMemoryCacheParamsSupplier implements Supplier<MemoryCacheParams> { | |
private ActivityManager activityManager; | |
public LollipopBitmapMemoryCacheParamsSupplier(ActivityManager activityManager) { | |
this.activityManager = activityManager; | |
} | |
@Override | |
public MemoryCacheParams get() { |
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
// Dagger 1 example | |
@Module( | |
complete = false, | |
library = true | |
) | |
public final class ApiModule { | |
@Provides | |
@Singleton | |
Retrofit provideRetrofit(Gson gson, Application app) { | |
return new Retrofit.Builder() |
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 Vipul on 18/11/16. | |
*/ | |
public class Elements { | |
private int icon; | |
private String name; | |
public int getIcon() { |
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
package com.example.marcin.splitlayout; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.PorterDuff; | |
import android.graphics.PorterDuffXfermode; | |
import android.graphics.Region; |
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.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.media.ExifInterface; | |
import android.os.AsyncTask; | |
import android.os.Environment; |
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 com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.Request; | |
import com.android.volley.Response; | |
import com.android.volley.VolleyLog; | |
import com.android.volley.toolbox.HttpHeaderParser; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.reflect.TypeToken; |
NewerOlder