Skip to content

Instantly share code, notes, and snippets.

@abduakhatov
Created January 23, 2017 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abduakhatov/2978b3a1c4c17d771410adbe4c066f1d to your computer and use it in GitHub Desktop.
Save abduakhatov/2978b3a1c4c17d771410adbe4c066f1d to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.shohruh.gridlayout.Main2Activity">
<GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="3"
>
<Button
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_columnWeight="1"
/>
<Button
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
/>
<Button
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_columnWeight="1"
/>
<Button
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_columnWeight="1"
/>
<Button
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
/>
<Button
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_columnWeight="1"
/>
</GridLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment