【发布时间】:2018-03-04 09:17:58
【问题描述】:
以图片为例
我想实现一个登录屏幕,我希望用户仅通过 Google plus 登录来登录。我一直在寻找可供选择的设计,但无法理解。但后来我遇到了类似的事情。我试图实现它。
这是我尝试过的。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context="com.bt4u.shopcite.login">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha=".5"
android:background="@drawable/ny"/>
<ImageView
android:id="@+id/imageView3"
android:layout_width="@dimen/_100sdp"
android:layout_height="@dimen/_100sdp"
android:layout_centerHorizontal="true"
app:srcCompat="@drawable/applogo" />
<com.google.android.gms.common.SignInButton
android:id="@+id/Sign_in_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:alpha="1" />
</RelativeLayout>
您可以看到我尝试使用 alpha,但它没有给我相同的结果。我想要图像中显示的克隆类型。
【问题讨论】:
标签: android xml user-interface