Skip to content

Instantly share code, notes, and snippets.

View tomas-vondracek's full-sized avatar

Tomas Vondracek tomas-vondracek

View GitHub Profile
@tomas-vondracek
tomas-vondracek / gist:5876295
Created June 27, 2013 13:15
An extremely simple {@link android.widget.LinearLayout} descendant that simply switches the order of its child views on Android 4.0+. The reason for this is that on Android, negative buttons should be shown to the left of positive buttons. (from Google IO app)
public class ButtonBar extends LinearLayout {
public ButtonBar(Context context) {
super(context);
}
public ButtonBar(Context context, AttributeSet attrs) {
super(context, attrs);
}