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.util.Log; | |
/** | |
* Custom Log - A Facede for Android orignal Log class | |
* Created by elcio on 14/05/15. | |
*/ | |
public class CLog { | |
private static final boolean DEBUG = BuildConfig.BUILD_TYPE.equalsIgnoreCase("debug"); | |
private static String TAG = "YOUR_PROJECT_NAME"; |
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.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.util.Base64; | |
import android.util.Log; | |
import java.io.ByteArrayOutputStream; | |
/** | |
* Created by elcio on 27/11/15. | |
*/ |
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 br.com.trainning.pdv.domain.network; | |
import java.util.List; | |
import br.com.trainning.pdv.domain.model.ListaProdutos; | |
import br.com.trainning.pdv.domain.model.Produto; | |
import retrofit.Callback; | |
import retrofit.RestAdapter; | |
import retrofit.client.OkClient; | |
import retrofit.http.Field; |
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 br.com.trainning.pdv.ui.activity; | |
import android.content.Intent; | |
import android.graphics.Color; | |
import android.graphics.drawable.ColorDrawable; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.support.design.widget.CoordinatorLayout; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.design.widget.Snackbar; |
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
// Exemplo de chamada: | |
requestPermissions(); | |
@Override | |
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { | |
switch (requestCode){ | |
case REQUEST_CODE_PERMISSION: | |
if(grantResults[0] == PackageManager.PERMISSION_GRANTED){ |
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"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:padding="8dp"> | |
<TextView | |
android:id="@+id/item_label" |
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.mysql.jdbc.Connection; | |
import java.sql.*; | |
import java.sql.DriverManager; | |
/** | |
* @desc A singleton database access class for MySQL | |
* @author Ramindu | |
*/ | |
public final class MysqlConnect { | |
public Connection conn; | |
private Statement statement; |
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 br.com.trainning.pdv_2016; | |
/** | |
* Created by elcio on 27/03/16. | |
*/ | |
import android.content.Context; | |
import android.support.test.InstrumentationRegistry; | |
import android.support.test.espresso.Espresso; | |
import android.support.test.espresso.IdlingPolicies; | |
import android.support.test.espresso.IdlingResource; |
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 br.com.trainning.pdv_2016; | |
import android.support.test.espresso.IdlingResource; | |
/** | |
* Created by elcio on 27/03/16. | |
*/ | |
public class ElapsedTimeIdlingResource implements IdlingResource { | |
private final long startTime; | |
private final long waitingTime; |