<?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" tools:context=".user.userprofile.UserProfileFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <include layout="@layout/user_profile_header"/> <LinearLayout android:layout_width="200dp" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/outlinedTextField" android:layout_width="match_parent" android:layout_height="wrap_content" android: hint = "@string/label" app:hintTextColor="@color/text_primary" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:boxStrokeWidthFocused="2dp" app:hintTextColor="@color/text_primary" app:boxStrokeColor="@color/border_primary"/>border_primary"> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </LinearLayout> </ScrollView> <?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" tools:context=".user.userprofile.UserProfileFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <include layout="@layout/user_profile_header"/> <LinearLayout android:layout_width="200dp" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/outlinedTextField" android:layout_width="match_parent" android:layout_height="wrap_content" android: hint = "@string/label" app:hintTextColor="@color/text_primary" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:boxStrokeWidthFocused="2dp" app:hintTextColor="@color/text_primary" app:boxStrokeColor="@color/border_primary"/> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </LinearLayout> </ScrollView> <?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" tools:context=".user.userprofile.UserProfileFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <include layout="@layout/user_profile_header"/> <LinearLayout android:layout_width="200dp" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/outlinedTextField" android:layout_width="match_parent" android:layout_height="wrap_content" android: hint = "@string/label" app:hintTextColor="@color/text_primary" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:boxStrokeWidthFocused="2dp" app:hintTextColor="@color/text_primary" app:boxStrokeColor="@color/border_primary"> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </LinearLayout> </ScrollView> <?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" tools:context=".user.userprofile.UserProfileFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <include layout="@layout/user_profile_header"/> <LinearLayout android:layout_width="200dp" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/outlinedTextField" android:layout_width="match_parent" android:layout_height="wrap_content" android: hint = "@string/label" app:hintTextColor="@color/text_primary" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:boxStrokeWidthFocused="2dp" app:hintTextColor="@color/text_primary" app:boxStrokeColor="@color/border_primary"/> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> android:hint="@string/label"/> </LinearLayout> </LinearLayout> </ScrollView> <?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" tools:context=".user.userprofile.UserProfileFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <include layout="@layout/user_profile_header"/> <LinearLayout android:layout_width="200dp" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/outlinedTextField" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:boxStrokeWidthFocused="2dp" app:boxStrokeColor="@color/border_primary"/> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/label"/> </LinearLayout> </LinearLayout> </ScrollView> <?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" tools:context=".user.userprofile.UserProfileFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <include layout="@layout/user_profile_header"/> <LinearLayout android:layout_width="200dp" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/outlinedTextField" android:layout_width="match_parent" android:layout_height="wrap_content" android: hint = "@string/label" app:hintTextColor="@color/text_primary" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:boxStrokeWidthFocused="2dp" app:hintTextColor="@color/text_primary" app:boxStrokeColor="@color/border_primary"/> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </LinearLayout> </ScrollView> I'm trying to create a TextInputLayout with Outline Boarder. But whenever I use the,following style, it malfunction(crash) the app.
Before posting I have tried every solution that listed in and outside the stackoverflow, but nothing fixed the issue so far.
currentCurrent layout
Complete 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://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".user.userprofile.UserProfileFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <include layout="@layout/user_profile_header"/> <LinearLayout android:layout_width="200dp" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/outlinedTextField" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:boxStrokeWidthFocused="2dp" app:boxStrokeColor="@color/border_primary"/> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/label"/> </LinearLayout> </LinearLayout> </ScrollView> More Info : when style is added hint goes out of focus. Also border doesn't appear.
I'm trying to create a TextInputLayout with Outline Boarder. But whenever I use the,following style, it malfunction the app.
Before posting I have tried every solution that listed in and outside the stackoverflow, but nothing fixed the issue so far.
current layout
I'm trying to create a TextInputLayout with Outline Boarder. But whenever I use the,following style, it malfunction(crash) the app.
Before posting I have tried every solution that listed in and outside the stackoverflow, but nothing fixed the issue so far.
Current layout
Complete 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://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".user.userprofile.UserProfileFragment"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <include layout="@layout/user_profile_header"/> <LinearLayout android:layout_width="200dp" android:layout_height="wrap_content" android:orientation="vertical"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/outlinedTextField" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:boxStrokeWidthFocused="2dp" app:boxStrokeColor="@color/border_primary"/> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/label"/> </LinearLayout> </LinearLayout> </ScrollView> More Info : when style is added hint goes out of focus. Also border doesn't appear.