Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove underline on Android #165

Open
dan-fein opened this issue Oct 24, 2019 · 9 comments
Open

Remove underline on Android #165

dan-fein opened this issue Oct 24, 2019 · 9 comments

Comments

@dan-fein
Copy link

dan-fein commented Oct 24, 2019

Is it possible to remove the underline that appears on Android?

I see the native TextInput has a prop called underlineColorAndroid="transparent" but checking the TS file I don't see anything for this, any work arounds to achieve it?

Screenshot 2019-10-23 23 32 50

@iRoachie
Copy link
Collaborator

@alpha0010 How hard would it be to add this?

@alpha0010
Copy link
Contributor

Hmm. Surprisingly difficult unfortunately. This is implemented via a SearchView, not a TextInput. As such, in order to modify unexposed styles, one must parse the element for the appropriate base widget to modify. The "underline" is not (on most platforms) implemented as an actual underline. Automatically determining the underline would be hard to confidently implement for all targeted SDKs.

The only solid option I can think of would be re-implementing the entire widget (off of primitive components), which rather feels like it defeats the goal of being completely native.

@RodolfoGS
Copy link

Same issue

@Noitidart
Copy link

I'm thinking of use a view to overlap the underline to hide it.

@Noitidart
Copy link

Oh gosh my overlaid view covers hanging part of characters, that was silly of me.

@alpha0010
Copy link
Contributor

Did some searching around. You may be able to adapt this solution: https://stackoverflow.com/a/27687155

Also, grep for search_plate and mSearchPlate in the Android sdk source.

If you are trying your hand at this, be aware the hard part with react native style properties is to correctly (re)apply the native styles when the JS code does not explicitly set a value.

@Ainias
Copy link

Ainias commented Feb 2, 2022

Is there any update on this?

@YogaSulistiyoWidodo
Copy link

set query backround to transparant

@techdev77
Copy link

techdev77 commented Nov 8, 2024

just use
android:queryBackground="@null"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants