Я новичок в развитии Android. Моя цель - установить фоновое изображение с прозрачным цветом градиента, я пробовал много способов, но я не могу достичь этой цели. Может кто-нибудь мне помочь? Я прикрепил образец экрана.Как установить фоновое изображение с прозрачным цветом градиента в Android?
Исходный код
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bc"
android:orientation="vertical"
android:paddingLeft="20dp"
android:alpha="0.7"
android:id="@+id/about"
android:paddingRight="20dp"
android:paddingTop="60dp">
<android.support.design.widget.TextInputLayout
android:id="@+id/otp_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintTextAppearance="@style/hintStyle">
<EditText
android:id="@+id/mobNo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_mob"
android:inputType="number"
android:singleLine="true"
/>
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/submit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:background="@color/colorPrimary"
android:text="@string/submit"
android:textColor="@android:color/white"/>
</LinearLayout>
Заранее спасибо.
делитесь тем, что вы сделали. Также проверьте этот http: // stackoverflow.com/questions/3823607/how-to-make-transparent-gradient – masp
добавить свой xml-файл – DKV
@VV, я обновил свой вопрос – Kalanidhi