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 UtilGCM { | |
public static final String PROPERTY_REG_ID = "registration_id"; | |
private static final String PROPERTY_APP_VERSION = "appVersion"; | |
static final String TAG = "GCM"; | |
/** | |
* Stores the registration ID and the app versionCode in the application's | |
* {@code SharedPreferences}. | |
* |
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 SplashActivtiy extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Fabric.with(this, new Crashlytics()); | |
setContentView(R.layout.activity_splash); | |
new Thread(new Runnable() { |
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
class CustomPagerAdapter extends PagerAdapter { | |
Context mContext; | |
LayoutInflater mLayoutInflater; | |
String[] mResources; | |
public CustomPagerAdapter(Context context, String[] mResources) { | |
mContext = context; | |
mLayoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); | |
this.mResources = mResources; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="be.motti.tort" | |
android:installLocation="preferExternal"> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> |
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
buildscript { | |
repositories { | |
maven { url 'https://maven.fabric.io/public' } | |
} | |
dependencies { | |
classpath 'io.fabric.tools:gradle:1.+' | |
} | |
} | |
apply plugin: 'com.android.application' |
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
class CustomPagerAdapter extends PagerAdapter { | |
Context mContext; | |
LayoutInflater mLayoutInflater; | |
String[] mResources; | |
public CustomPagerAdapter(Context context, String[] mResources) { | |
mContext = context; | |
mLayoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); | |
this.mResources = mResources; |
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 Disabler { | |
public Disabler(final Button button, final long time){ | |
button.setEnabled(false); | |
new Handler().postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
button.setEnabled(true); | |
} |
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 SplashActivtiy extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Fabric.with(this, new Crashlytics()); | |
setContentView(R.layout.activity_splash); | |
new Thread(new Runnable() { | |
@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
package be.motti.uzb; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Handler; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
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.Intent; | |
import android.graphics.Typeface; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.widget.Button; | |
/** | |
* Created by igor on 07.02.16. | |
*/ |