Skip to content

Instantly share code, notes, and snippets.

@graffiti75
Last active June 14, 2021 00:52
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 graffiti75/2e7fb6a96576db7db4e2499c96d0744c to your computer and use it in GitHub Desktop.
Save graffiti75/2e7fb6a96576db7db4e2499c96d0744c to your computer and use it in GitHub Desktop.
Build A Screen App - 2989582 - Fixing layout using FrameLayout and transparency colors
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/costa_background"
tools:context=".MainActivity">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_transparent_70" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="8dp"
android:fontFamily="cursive"
android:text="Costa Coffee"
android:textColor="@color/white"
android:textSize="64sp"
android:textStyle="bold" />
<ImageView
android:layout_width="match_parent"
android:layout_height="250dp"
android:scaleType="centerInside"
android:src="@drawable/costa_logo" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_baseline_info_24"
android:gravity="center_vertical"
android:text=" It is a Counter-service coffee chain offering hot drinks, iced coolers, sweet snacks and sandwiches."
android:textColor="@color/white"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_baseline_fastfood_24"
android:gravity="center_vertical"
android:text=" Dine-in , Take-away and Delivery."
android:textColor="@color/white"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_working_hours_24"
android:gravity="center_vertical"
android:text=" 7AM-2AM Monday to Sunday."
android:textColor="@color/white"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_baseline_place_24"
android:gravity="center_vertical"
android:text=" 247 ElGuish Rd , Fleming, Qesm AR Ramel، Alexandria Governorate."
android:textColor="@color/white"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_baseline_phone_24"
android:gravity="center_vertical"
android:text=" +2-03 5445463"
android:textColor="@color/white"
android:textSize="20sp" />
</LinearLayout>
</FrameLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment