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.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import okhttp3.OkHttpClient; | |
import retrofit2.Retrofit; | |
import retrofit2.converter.gson.GsonConverterFactory; | |
/** | |
* Created by mladenrakonjac on 01/06/16. | |
*/ | |
public class ServiceGenerator { |
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
apply plugin: 'checkstyle' | |
task checkstyle(type: Checkstyle){ | |
description 'Checks if the code meets standards' | |
group 'verification' | |
configFile file('./qa-check/checkstyle.xml') | |
source 'src' | |
include '**/*.java' | |
exclude '**/gen/**' |
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
def getVersionCode = { -> | |
try { | |
def code = new ByteArrayOutputStream() | |
exec { | |
commandLine 'git', 'rev-list', '--remotes' | |
standardOutput = code | |
} | |
return code.toString().split("\n").size() | |
} | |
catch (ignored) { |
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 NameOfApplication extends Application { | |
private FirebaseAnalytics mFirebaseAnalytics; | |
private static NameOfApplication mInstance; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
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 me.fleka.deltacity.presentation; | |
/** | |
* Created by mladenrakonjac on 14/09/16. | |
*/ | |
public interface BaseView<T> { | |
void setPresenter(T presenter); | |
} |
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 me.fleka.deltacity.presentation.shopping; | |
import java.util.List; | |
import me.fleka.deltacity.domain.models.Category; | |
import me.fleka.deltacity.domain.models.Shop; | |
import me.fleka.deltacity.presentation.BasePresenter; | |
import me.fleka.deltacity.presentation.BaseView; | |
/** | |
* Created by mladenrakonjac on 14/09/16. |
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 me.fleka.deltacity.presentation.shopping; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.design.widget.Snackbar; | |
import android.support.v4.app.Fragment; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.SearchView; | |
import android.view.LayoutInflater; | |
import android.view.View; |
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 me.fleka.deltacity.presentation.shopping; | |
import android.support.annotation.NonNull; | |
import java.util.List; | |
import me.fleka.deltacity.data.category.CategoryDataSource; | |
import me.fleka.deltacity.domain.models.Category; | |
import static com.google.gson.internal.$Gson$Preconditions.checkNotNull; | |
/** |
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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
#parse("File Header.java") | |
public class ${NAME} extends | |
RecyclerView.Adapter<${NAME}.ViewHolder> { | |
private static final String TAG = ${NAME}.class.getSimpleName(); | |
private Context context; | |
private List<${LIST_MODEL}> list; | |
private OnItemClickListener onItemClickListener; |
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
GenericRequestBuilder<Uri,InputStream,SVG,PictureDrawable> | |
requestBuilder = Glide.with(context) | |
.using(Glide.buildStreamModelLoader(Uri.class, context), InputStream.class) | |
.from(Uri.class) | |
.as(SVG.class) | |
.transcode(new SvgDrawableTranscoder(), PictureDrawable.class) | |
.sourceEncoder(new StreamEncoder()) | |
.cacheDecoder(new FileToStreamDecoder<SVG>(new SvgDecoder())) | |
.decoder(new SvgDecoder()) | |
.placeholder(R.drawable.svg_image_view_placeholder) |
OlderNewer