Skip to content

Instantly share code, notes, and snippets.

View Oknesif's full-sized avatar
👾
Invading

Dmitry Fisenko Oknesif

👾
Invading
View GitHub Profile
@dominicthomas
dominicthomas / max_height_linear_layout.txt
Created December 8, 2016 12:23
Enables you to set a max height for a linear layout while also using wrap content.. this means the layout will be collapsable but also have height constraints!
public class MaxHeightLinearLayout extends LinearLayout {
private int maxHeightDp;
public MaxHeightLinearLayout(Context context) {
super(context);
}
public MaxHeightLinearLayout(Context context, AttributeSet attrs) {
super(context, attrs);