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
ext { | |
supportLibVersion = '23.1.1' | |
} | |
dependencies { | |
compile "com.android.support:appcompat-v7:${supportLibVersion}" | |
compile "com.android.support:design:${supportLibVersion}" | |
compile "com.android.support:pallete-v7:${supportLibVersion}" | |
compile "com.android.support:cardview-v7:${supportLibVersion}" | |
compile "com.android.support:recyclerview-v7:${supportLibVersion}" |
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 ArrayUtil { | |
@Nullable | |
public static <C> List<C> asList(@Nullable SparseArray<C> sparseArray) { | |
if (sparseArray == null) { | |
return null; | |
} | |
final int arraySize = sparseArray.size(); | |
List<C> arrayList = new ArrayList<>(arraySize); | |
for (int i = 0; i < arraySize; i++) |
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 | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.widget.Checkable; | |
import android.widget.ImageView; | |
import android.widget.LinearLayout; | |
import android.widget.TextView; |
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
... | |
mTouchLabel.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
// Click handling | |
} | |
}); | |
... |