我已经创建了下面的登录活动是屏幕截图和代码 enter image description here如何使背景透明,改变我的活动设计
代码
<RelativeLayout 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"
tools:context="pk.itbrowser.rehbar.LoginActivity"
android:layout_marginTop="20sp"
android:layout_marginRight="20sp"
android:layout_marginLeft="20sp">
<LinearLayout
android:id="@+id/linearLayout"
android:background="@android:color/transparent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="10">
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:text="Login with Email"
android:textSize="20sp"
android:gravity="center"/>
<EditText
android:layout_marginTop="2sp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:hint="Email"/>
<EditText
android:layout_marginTop="2sp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:hint="Password"
android:inputType="textPassword"/>
<Button
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:textColor="@color/white"
android:background="@color/colorAccent"
android:text="Login"/>
<Button
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="1dp"
android:text="Need an Account?"
android:layout_weight="1"/>
<TextView
android:layout_marginTop="10sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Forget Password?"
android:layout_centerInParent="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center" />
</LinearLayout>
现在我想改变此活动喜欢低于一个 lightText简单地想要建立这样的设计 enter image description here
设置的背景是什么问题呢? –
使用框架布局 – Krish
设置ARGB颜色代码(#10000000)作为背景。 – Chetan