Created
August 5, 2018 17:46
-
-
Save prodhan/b98607c1c347a851b8af08dfc4052986 to your computer and use it in GitHub Desktop.
For only educational purpose
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:background="@drawable/bg" | |
android:weightSum="10" | |
tools:context=".MainActivity"> | |
<RelativeLayout | |
android:layout_weight="2" | |
android:layout_width="match_parent" | |
android:layout_height="0dp"> | |
<TextView | |
android:id="@+id/textGrid" | |
android:text="@string/app_name" | |
android:textSize="40sp" | |
android:textColor="@android:color/white" | |
android:layout_centerInParent="true" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
</RelativeLayout> | |
<GridLayout | |
android:id="@+id/mainGrid" | |
android:columnCount="2" | |
android:rowCount="3" | |
android:alignmentMode="alignMargins" | |
android:columnOrderPreserved="false" | |
android:layout_weight="8" | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:padding="14dp" | |
> | |
<!-- Row 1 --> | |
<!-- Column 1 --> | |
<android.support.v7.widget.CardView | |
android:id="@+id/scholarship" | |
android:layout_width="0dp" | |
android:layout_height="0dp" | |
android:layout_columnWeight="1" | |
android:layout_rowWeight="1" | |
android:layout_marginBottom="16dp" | |
android:layout_marginLeft="16dp" | |
android:layout_marginRight="16dp" | |
app:cardElevation="8dp" | |
app:cardCornerRadius="8dp" | |
> | |
<LinearLayout | |
android:layout_gravity="center_horizontal|center_vertical" | |
android:layout_margin="16dp" | |
android:orientation="vertical" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content"> | |
<ImageView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center_horizontal" | |
android:src="@drawable/ic_school_black_48dp" /> | |
<TextView | |
android:text="Scholarship" | |
android:textAlignment="center" | |
android:textColor="@android:color/black" | |
android:textSize="18sp" | |
android:textStyle="bold" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
</LinearLayout> | |
</android.support.v7.widget.CardView> | |
<!-- Column 2 --> | |
<android.support.v7.widget.CardView | |
android:id="@+id/apply" | |
android:layout_width="0dp" | |
android:layout_height="0dp" | |
android:layout_columnWeight="1" | |
android:layout_rowWeight="1" | |
android:layout_marginBottom="16dp" | |
android:layout_marginLeft="16dp" | |
android:layout_marginRight="16dp" | |
app:cardElevation="8dp" | |
app:cardCornerRadius="8dp" | |
> | |
<LinearLayout | |
android:layout_gravity="center_horizontal|center_vertical" | |
android:layout_margin="16dp" | |
android:orientation="vertical" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content"> | |
<ImageView | |
android:src="@drawable/ic_details_black_48dp" | |
android:layout_gravity="center_horizontal" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
<TextView | |
android:text="Apply" | |
android:textAlignment="center" | |
android:textColor="@android:color/black" | |
android:textSize="18sp" | |
android:textStyle="bold" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
</LinearLayout> | |
</android.support.v7.widget.CardView> | |
<!-- Row 2 --> | |
<!-- Column 1 --> | |
<android.support.v7.widget.CardView | |
android:id="@+id/website" | |
android:layout_width="0dp" | |
android:layout_height="0dp" | |
android:layout_columnWeight="1" | |
android:layout_rowWeight="1" | |
android:layout_marginBottom="16dp" | |
android:layout_marginLeft="16dp" | |
android:layout_marginRight="16dp" | |
app:cardElevation="8dp" | |
app:cardCornerRadius="8dp" | |
> | |
<LinearLayout | |
android:layout_gravity="center_horizontal|center_vertical" | |
android:layout_margin="16dp" | |
android:orientation="vertical" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content"> | |
<ImageView | |
android:src="@drawable/ic_web_black_48dp" | |
android:layout_gravity="center_horizontal" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
<TextView | |
android:text="Website" | |
android:textAlignment="center" | |
android:textColor="@android:color/black" | |
android:textSize="18sp" | |
android:textStyle="bold" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
</LinearLayout> | |
</android.support.v7.widget.CardView> | |
<!-- Column 2 --> | |
<android.support.v7.widget.CardView | |
android:id="@+id/contact" | |
android:layout_width="0dp" | |
android:layout_height="0dp" | |
android:layout_columnWeight="1" | |
android:layout_rowWeight="1" | |
android:layout_marginBottom="16dp" | |
android:layout_marginLeft="16dp" | |
android:layout_marginRight="16dp" | |
app:cardElevation="8dp" | |
app:cardCornerRadius="8dp" | |
> | |
<LinearLayout | |
android:layout_gravity="center_horizontal|center_vertical" | |
android:layout_margin="16dp" | |
android:orientation="vertical" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content"> | |
<ImageView | |
android:src="@drawable/ic_contact_mail_black_48dp" | |
android:layout_gravity="center_horizontal" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
<TextView | |
android:text="Contact" | |
android:textAlignment="center" | |
android:textColor="@android:color/black" | |
android:textSize="18sp" | |
android:textStyle="bold" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
</LinearLayout> | |
</android.support.v7.widget.CardView> | |
</GridLayout> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment