I have an EditText
in my xml and I get this warning
No label views point to this text field with an android:labelFor="@+id/@+id/et_password" attribute
I have searched in SO and I found these posts but unfortunately I don't find any answer that explains the reason of getting this warning.
1- Meaning of "No label views point to this text field" warning message
2- EditText warning in android app development
Here is my xml code:
<LinearLayout
android:id="@+id/ll_password"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/tv_password"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:text="@string/tv_password" />
<EditText
android:id="@+id/et_password"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:background="@color/background"
android:gravity="start|center_vertical"
android:inputType="textPassword"
android:singleLine="true" />
</LinearLayout>
I don't know why I'm getting this warning. What I have done so far:
1- I tried changing my EditText
id
2- Removing TextView
in my layout
But warning still remain.
I just wondered because I have the same LinearLayout
for my username without any warning.
Am I doing wrong? And what's the reason I'm getting this warning?