I hereby claim:
- I am jpardogo on github.
- I am jpardogo (https://keybase.io/jpardogo) on keybase.
- I have a public key ASDtOzg1GMCRFyMm0Ox8Nlkl0Yfod1WMvW4GtZe0AVViiQo
To claim this, I am signing this object:
#!/bin/sh | |
# Place this hook in the repo .git/hooks folder. | |
# make sure you chmod a+x this hook in terminal. | |
# Otherwise, you'll tear your hair out when you think it should run but it doesn't. | |
# Video Pre-Push Git Hook for ktlint Formatting With Plugin: https://www.youtube.com/watch?v=eysVDO2_X0s | |
# Ktlint Plugin: org.jlleitschuh.gradle:ktlint-gradle | |
echo "Checking code formatting" |
I hereby claim:
To claim this, I am signing this object:
inline fun <reified ViewModelT : ViewModel> BindActivity.viewModelBinder() = lazy { | |
activitybBinder<ViewModelT>(bindActivity = this) | |
} | |
inline fun <reified ViewModelT : ViewModel> BindFragment.viewModelBinder() = lazy { | |
ViewModelProviders | |
.of(this, | |
getFactory<ViewModelT>(kodein)) | |
.get(ViewModelT::class.java) | |
} |
subprojects { | |
project.configurations.all { | |
resolutionStrategy.eachDependency { details -> | |
boolean isMultidex = details.requested.name.contains('multidex') | |
if (details.requested.group == 'com.android.support' && !isMultidex){ | |
details.useVersion lib_versions.support | |
}else if(isMultidex){ | |
details.useVersion lib_versions.multidex | |
} | |
} |
public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener { | |
private OnItemClickListener mListener; | |
private GestureDetector mGestureDetector; | |
public interface OnItemClickListener { | |
void onItemClick(View view, int position); | |
} | |
public RecyclerItemClickListener(Context context, OnItemClickListener listener) { | |
mListener = listener; |
public abstract class BaseAllAdapters<T> extends BaseAdapter { | |
protected Context mContext; | |
protected LongSparseArray<DelegateAdapter> mDelegateAdapterSparseArray; | |
private int mViewLayoutId = 0; | |
private List<ListItem<T>> mItems; | |
/*Constructor if we dont use mutiple view types in the list*/ | |
public BaseAllAdapters(Context context, int viewLayoutId) { | |
mContext = context; |
package com.jpardogo.android.myapplication.app; | |
import android.app.ListActivity; | |
import android.support.v4.widget.AutoScrollHelper; | |
import android.support.v4.widget.ListViewAutoScrollHelper; | |
import android.support.v7.app.ActionBarActivity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.MotionEvent; |
private void loadPage() { | |
WebSettings seetings = mWebView.getSettings(); | |
seetings.setJavaScriptEnabled(true); | |
seetings.setBuiltInZoomControls(false); | |
seetings.setSupportZoom(true); | |
mWebView.setWebViewClient(new WebViewClient() { | |
@Override | |
public boolean shouldOverrideUrlLoading(WebView view, String url) { | |
mLoadingCount++; | |
return super.shouldOverrideUrlLoading(view, url); |
public class ScaleToFitWidthHeightTransform implements Transformation { | |
private int mSize; | |
private boolean isHeightScale; | |
public ScaleToFitWidthHeightTransform(int size, boolean isHeightScale){ | |
mSize =size; | |
this.isHeightScale = isHeightScale; | |
} |