Created
January 4, 2016 07:40
-
-
Save Logan676/03793bfbecc043db59f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
提示:默认情况下,当您将 EditText 元素设置为使用 "textPassword" 输入类型时,字体系列将设置为固定宽度。因此,您应该将其字体系列更改为 "sans-serif",以便两个文本字段都使用匹配的字体样式。 | |
``` | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content"> | |
<ImageView | |
android:src="@drawable/header_logo" | |
android:layout_width="match_parent" | |
android:layout_height="64dp" | |
android:scaleType="center" | |
android:background="#FFFFBB33" | |
android:contentDescription="@string/app_name" /> | |
<EditText | |
android:id="@+id/username" | |
android:inputType="textEmailAddress" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="16dp" | |
android:layout_marginLeft="4dp" | |
android:layout_marginRight="4dp" | |
android:layout_marginBottom="4dp" | |
android:hint="@string/username" /> | |
<EditText | |
android:id="@+id/password" | |
android:inputType="textPassword" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="4dp" | |
android:layout_marginLeft="4dp" | |
android:layout_marginRight="4dp" | |
android:layout_marginBottom="16dp" | |
android:fontFamily="sans-serif" | |
android:hint="@string/password"/> | |
</LinearLayout> | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://developer.android.com/intl/zh-cn/guide/topics/ui/dialogs.html#CustomLayout