我是Android新手,我的activity
基于内置版LoginActivity
,但我对登录按钮感到困惑。在相关的xml
文件中,应用于此按钮的文本最多显示为:
<string name="action_sign_in_register"><b>Sign up</b> or register</string>
但是在预览xml
文件时,该按钮中的文字只是“注册”。那么b tag
之外的人物在哪里?
谢谢!
完整的strings_activity_login.xml文件:
<string name="title_activity_login">Sign in</string>
<!-- Strings related to login -->
<string name="prompt_email">Email</string>
<string name="prompt_password">Password</string>
<string name="action_sign_in_register"><b>Sign in</b> or register</string>
<string name="action_sign_in_short">Sign in</string>
<string name="menu_forgot_password">Recover lost password</string>
<string name="login_progress_signing_in">Signing in…</string>
<string name="error_invalid_email">This email address is invalid</string>
<string name="error_invalid_password">This password is too short</string>
<string name="error_incorrect_password">This password is incorrect</string>
<string name="error_field_required">This field is required</string>
</resources>
这是按钮的xml。
`<Button
android:id="@+id/sign_in_button"
android:layout_width="281dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="16dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:text="@string/action_sign_in_register" />`