Android 编辑文本错误工具提示位置已关闭
我想让我的错误工具提示显示在这张图片中 但我的是这样的 我怎样才能解决这个问题 我的布局代码如下Android 编辑文本错误工具提示位置已关闭,android,android-layout,Android,Android Layout,我想让我的错误工具提示显示在这张图片中 但我的是这样的 我怎样才能解决这个问题 我的布局代码如下 <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".main.EditProfileActivity"
tools:showIn="@layout/activity_edit_profile">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="60dp"
android:orientation="vertical"
android:paddingBottom="56dp"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="@dimen/label_margin_right"
android:src="@drawable/ic_account_grey600_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="@+id/editTextNickname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:hint="@string/profile.nickname"
android:maxLength="16"
android:maxLines="1"
android:singleLine="true"
android:textSize="16sp" />
<Button
android:id="@+id/buttonNicknameClear"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical|right"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:background="@drawable/ic_close_grey600_24dp"
android:onClick="onNicknameClearClicked"
android:padding="0dp"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="@dimen/label_margin_right"
android:src="@drawable/ic_email_grey600_24dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="@+id/editTextEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="40dp"
android:hint="@string/profile.email"
android:inputType="textEmailAddress"
android:maxLength="30"
android:maxLines="1"
android:singleLine="true"
android:textSize="16sp" />
<Button
android:id="@+id/buttonEmailClear"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical|right"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:background="@drawable/ic_close_grey600_24dp"
android:onClick="onEmailClearClicked"
android:padding="0dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
第一个和第二个编辑文本都会发生这种情况。
我做错了什么
编辑:
我正在添加额外的代码以获取更多信息。
这是父布局文件
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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"
android:fitsSystemWindows="true"
tools:context=".main.EditProfileActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_edit_profile" />
</android.support.design.widget.CoordinatorLayout>
尝试删除
android:paddingBottom="56dp"
试着删除
android:paddingBottom="56dp"
移除
app:layout\u behavior=“@string/appbar\u scrolling\u view\u behavior”
修复了该问题
谢谢大家! 删除
app:layout\u behavior=“@string/appbar\u scrolling\u view\u behavior”
修复了该问题
谢谢大家! 谢谢你的回复。事实上,我添加了这一行来帮助解决问题。意思不管填充物是否存在,都是一样的(感谢您发布答案。事实上,我添加了这一行来帮助解决问题。意思是……无论填充是否存在,都是一样的。:(这在本项目的所有活动中都会发生,但在其他项目中不会发生……嗯……奇怪……这在本项目的所有活动中都会发生,但在其他项目中不会发生……嗯……奇怪.)。。