There is such a menu enter image description here

There is just a substrate, and on it the logo (center). How to correctly impose it on android? What layouts to use, and how to fill them? If you can example)) Thank you

  • one
    where is the menu, substrate, logo? I see the title and picture - LinearLayout android:orientation = "vertical" - pavlofff
  • @pavlofff, but how to fill the lianerlayout with a background like under the inscription "DOTA 2 CROCODILE" ?? Thank you) - Accami

1 answer 1

In activity_main.xml insert the markup code:

 <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:padding="6dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="DOTA 2 КРОКОДИЛ" android:textColor="@color/white" android:textAlignment="center" android:background="@drawable/black_gradient"/> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/your_image"/> </LinearLayout> 

In res / drawable, create a new Resource Drawable file and name it black_gradient . Then paste the code below into it.

 <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="@color/gray_holo_dark" android:endColor="@color/black" android:angle="-270" /> </shape> 

It should make a gradient. It may be necessary to change the colors @ color / gray_holo_dark and @ color / black to achieve the desired gradient.