I have simple Login page with some textview and edittex and i set static text to textview and hint to edittext from string.xml working fine.
But Now
i am receiving that strings(which i set form stirng.xml as i explained above) form webservices and i have to set webservice string.
Issue is i didn't set any id to that login screen elements(edittext and textview).
Update
I have AppCompatTextView like below in my XML
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_20sdp"
android:gravity="center"
android:text="@string/login_text_welcome"
android:textColor="@color/colorTextLightGrey"
android:textSize="@dimen/textview_size_medium"
android:textStyle="bold" />
I want to settext to above AppCompatTextView without ID.
Is it possible to setText to textview and edittext without setting any id?
You can use
findViewByNamerather thanfindViewByIdand then continue with your code.