Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <TableRow
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:layout_marginTop="10dp">
- <Button
- android:id="@+id/button4"
- android:layout_width="match_parent"
- android:text="@string/r1960"
- android:textColor="#ffffff"
- android:textSize="@dimen/loptatext"
- android:shadowColor="#000000"
- android:shadowRadius="7"
- android:layout_weight="1"
- android:background="@drawable/tlacitko_stav" />
- <Button
- android:id="@+id/button5"
- android:layout_width="match_parent"
- android:text="@string/r1964"
- android:textColor="#ffffff"
- android:textSize="@dimen/loptatext"
- android:shadowColor="#000000"
- android:shadowRadius="7"
- android:layout_weight="1"
- android:background="@drawable/tlacitko_stav" />
- <Button
- android:id="@+id/button6"
- android:layout_width="match_parent"
- android:text="@string/r1968"
- android:textColor="#ffffff"
- android:textSize="@dimen/loptatext"
- android:shadowColor="#000000"
- android:shadowRadius="7"
- android:layout_weight="1"
- android:background="@drawable/tlacitko_stav" />
- <Button
- android:id="@+id/button7"
- android:layout_width="match_parent"
- android:text="@string/r1972"
- android:textColor="#ffffff"
- android:textSize="@dimen/loptatext"
- android:shadowColor="#000000"
- android:shadowRadius="7"
- android:layout_weight="1"
- android:background="@drawable/tlacitko_stav" />
- </TableRow>
- public class SquareButton extends Button {
- public SquareButton(Context context) {
- super(context);
- }
- public SquareButton(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
- public SquareButton(Context context, AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- }
- @TargetApi(Build.VERSION_CODES.LOLLIPOP)
- public SquareButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
- super(context, attrs, defStyleAttr, defStyleRes);
- }
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- int size = Math.min(widthMeasureSpec, heightMeasureSpec);
- super.onMeasure(size, size);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement