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
/** | |
* This f**king code was created by Leo on 11/12/14. | |
*/ | |
public class AutoWrapLayout extends RelativeLayout { | |
private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1); | |
private static final int DEFAULT_MARGIN = 5; // dp | |
private int margin; | |
private LinkedList<String> dataList; |
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
/** | |
* Forked from: http://androidxref.com/4.1.1/xref/frameworks/base/core/java/com/android/internal/widget/DialogTitle.java | |
* Created by LeoLink on 2014-06-30. | |
*/ | |
public class SingleLineTextView extends TextView { | |
public SingleLineTextView(Context context, AttributeSet attrs, int defStyle) { | |
super(context, attrs, defStyle); | |
setSingleLine(); | |
setEllipsize(TextUtils.TruncateAt.END); |
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 SoftKeyboardHandledLinearLayout extends LinearLayout { | |
private boolean isKeyboardShown; | |
private SoftKeyboardVisibilityChangeListener listener; | |
public SoftKeyboardHandledLinearLayout(Context context) { | |
super(context); | |
} | |
public SoftKeyboardHandledLinearLayout(Context context, AttributeSet attrs) { | |
super(context, attrs); |
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 net.leolink.android.gist; | |
public class MultiStateDrawable extends LayerDrawable { | |
// The color filter to apply when the button is pressed | |
protected ColorFilter _pressedFilter = new LightingColorFilter(Color.GRAY, 1); | |
public MultiStateDrawable(Drawable d) { | |
super(new Drawable[] { d }); | |
} |
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
<LinearLayout | |
android:id="@+id/tutorial_viewpager_container" | |
android:orientation="vertical" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:gravity="center" | |
android:background="@drawable/tutorial_rounded_corner_background"> | |
<android.support.v4.view.ViewPager | |
android:id="@+id/tutorial_viewpager" | |
android:background="@android:color/transparent" |
NewerOlder