OutlinedBox TextInputLayout and gravity center?
up vote
1
down vote
favorite
How to achieve centered new OutlinedBox style with TextInputLayout ?
Current behavior:
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout2"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:hint="hint"
/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:hint="hint2"
/>
</android.support.design.widget.TextInputLayout>
I use com.android.support:design:28.0.0.
Any ideas how to implement centered normal looking TextInputEditText?
android material-design android-support-library material-components
add a comment |
up vote
1
down vote
favorite
How to achieve centered new OutlinedBox style with TextInputLayout ?
Current behavior:
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout2"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:hint="hint"
/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:hint="hint2"
/>
</android.support.design.widget.TextInputLayout>
I use com.android.support:design:28.0.0.
Any ideas how to implement centered normal looking TextInputEditText?
android material-design android-support-library material-components
Use hint onTextInputLayout
instead ofTextInputEditText
.
– Jeel Vankhede
Nov 21 at 13:55
@JeelVankhede it's not working, looks the same
– Kikju
Nov 22 at 6:48
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
How to achieve centered new OutlinedBox style with TextInputLayout ?
Current behavior:
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout2"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:hint="hint"
/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:hint="hint2"
/>
</android.support.design.widget.TextInputLayout>
I use com.android.support:design:28.0.0.
Any ideas how to implement centered normal looking TextInputEditText?
android material-design android-support-library material-components
How to achieve centered new OutlinedBox style with TextInputLayout ?
Current behavior:
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout2"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:hint="hint"
/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:hint="hint2"
/>
</android.support.design.widget.TextInputLayout>
I use com.android.support:design:28.0.0.
Any ideas how to implement centered normal looking TextInputEditText?
android material-design android-support-library material-components
android material-design android-support-library material-components
edited Nov 22 at 7:47
asked Nov 21 at 13:28
Kikju
17712
17712
Use hint onTextInputLayout
instead ofTextInputEditText
.
– Jeel Vankhede
Nov 21 at 13:55
@JeelVankhede it's not working, looks the same
– Kikju
Nov 22 at 6:48
add a comment |
Use hint onTextInputLayout
instead ofTextInputEditText
.
– Jeel Vankhede
Nov 21 at 13:55
@JeelVankhede it's not working, looks the same
– Kikju
Nov 22 at 6:48
Use hint on
TextInputLayout
instead of TextInputEditText
.– Jeel Vankhede
Nov 21 at 13:55
Use hint on
TextInputLayout
instead of TextInputEditText
.– Jeel Vankhede
Nov 21 at 13:55
@JeelVankhede it's not working, looks the same
– Kikju
Nov 22 at 6:48
@JeelVankhede it's not working, looks the same
– Kikju
Nov 22 at 6:48
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53413119%2foutlinedbox-textinputlayout-and-gravity-center%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Use hint on
TextInputLayout
instead ofTextInputEditText
.– Jeel Vankhede
Nov 21 at 13:55
@JeelVankhede it's not working, looks the same
– Kikju
Nov 22 at 6:48