This file contains hidden or 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 CanNotCompileThisGenerics { | |
| static class AbsScrambleAdapter<A extends AbsScrambleAdapter<A, T>, T> { | |
| } | |
| static class IViewHolderFactory<A extends AbsScrambleAdapter<A, ?>> { | |
| } | |
| static class ScrambleAdapter<T> extends AbsScrambleAdapter<ScrambleAdapter<T>, T> { | |
| } |
This file contains hidden or 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 LearnGenericsAssignment { | |
| static class Func<T> { | |
| T item; | |
| public T getItem() { | |
| return item; | |
| } | |
| public void setItem(T item) { | |
| this.item = item; |
This file contains hidden or 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 LearnGenerics { | |
| static abstract class AbsRecursive<A extends AbsRecursive<A, T>, T> { | |
| RecursiveListener<A, ? super T> mListener; | |
| T mItem; | |
| public <XA extends AbsRecursive<XA, ? super T>> | |
| void setListener(RecursiveListener<? super XA, ? super T> listener) { | |
| // FIXME: I could not fix this. | |
| @SuppressWarnings("unchecked") | |
| RecursiveListener<A, ? super T> l = (RecursiveListener<A, ? super T>) listener; |
This file contains hidden or 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
| #! /bin/bash | |
| ## This script is for taking a screen shot of an Android device. | |
| ## If possible, it tries to resize the image file and then copy to the clipboard. | |
| ## | |
| ## The script passes unrecognized arguments to adb command, which means you can specify "-e" or "-d" | |
| ## to select which device to take a screenshot of. | |
| if [ -z $(which adb) ]; then | |
| echo "Error. adb must be installed and in PATH." 1>&2 |
This file contains hidden or 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.content.Context; | |
| import android.support.design.widget.CoordinatorLayout; | |
| import android.support.v4.view.NestedScrollingChildHelper; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| /** | |
| * These codes are licensed under CC0. | |
| * | |
| * Created by cattaka on 2016/04/27. |
This file contains hidden or 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.content.Context; | |
| import android.support.annotation.IdRes; | |
| import android.support.annotation.NonNull; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.BaseAdapter; | |
| /** | |
| * These codes are licensed under CC0. |
This file contains hidden or 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.support.annotation.Keep; | |
| import android.util.Property; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| /** | |
| * These codes are licensed under CC0. | |
| * <p> | |
| * Save all methods from proguard!! | |
| * <p/> |
This file contains hidden or 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 enum ConnectionStatus { | |
| NOT_CONNECTED(false), | |
| CONNECTING(false), | |
| CONNECTED(true); | |
| private final boolean established; | |
| public ConnectionStatus(boolean established) { | |
| this.established = established; | |
| } |
This file contains hidden or 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
| #!/bin/sh | |
| echo "name url" | |
| for i in * ; do | |
| if [ -d $i -a -f $i/.git/config ] ; then | |
| url=`grep url $i/.git/config | cut -d "=" -f 2` | |
| splited=`echo $url|sed "s/[@:\/]/\t/g"` | |
| echo $i $url $splited | |
| fi | |
| done |
This file contains hidden or 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.view.View; | |
| import android.widget.RelativeLayout; | |
| /** | |
| * Save all methods from proguard!! | |
| * <p/> | |
| * Created by cattaka on 2015/11/10. | |
| */ | |
| public class RelativeLayoutAnimatorHelper { | |
| View mView; |