Skip to content

Instantly share code, notes, and snippets.

View kristijandraca-xx's full-sized avatar

Kristijan Drača kristijandraca-xx

View GitHub Profile
android {
buildTypes {
debug{
resValue "string", "app_name", "CoolApp Debug"
}
release {
resValue "string", "app_name", "CoolApp"
}
}
}
defaultConfig {
buildConfigField "String", "TOKEN", '"d9385462d3deff78c352ebb3f941ce12"'
}
buildTypes {
debug {
buildConfigField "String", "API", '"http://beta.example.com/"'
buildConfigField "int", "DB_VERSION", "2"
buildConfigField "boolean", "LOG", "true"
}
release {
ext{
androidSupportVersion = '25.3.0'
}
dependencies {
compile "com.android.support:appcompat-v7:${androidSupportVersion}"
compile "com.android.support:recyclerview-v7:${androidSupportVersion}"
}
@kristijandraca-xx
kristijandraca-xx / RecyclerViewAdapter.java
Created March 9, 2017 16:26
Template for RecyclerView Adapter
#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 mContext;
private List<${LIST_MODEL}> mList;
private OnItemClickListener mListener;
public ${NAME}(Context context, List<${LIST_MODEL}> list, OnItemClickListener onItemClickListener) {