Can't see the text in SearchView widget suggestions - android

I think my SearchView widget population is working. However, all I see in the suggestions list are white text blocks. When I select one of the white blocks I see an orange highlight and I see the text behind the orange highlight. So it seems I'm showing white text and white background in my suggestions list. Any ideas on how to change that?

It doesn't look like you can customize your searchView. You could try setting the backgroundcolor of your searchview to (Color.WHITE).

I had exactly the same issue. I found that the root cause of the issue is related to theme I selected when creating the Android application project in Eclipse. I was using Android API 14, and originally I selected theme as None. I searched the web extensively and did not find an answer or even a similar question about this issue, which made me think that this is a very uncommon issue (most of people don't run into this issue). So I decide to create a new Android Project, with exactly the same components and set up, this time, only changed the theme from None to "Hollow Light with Dark Action Bar", suddenly, my search view suggestion drop down texts started to become visible. Now I went back to my original project, in AndroidManifest.xml, under Application tag, set android:theme="#android:style/Theme.Holo.Light.DarkActionBar", the search view suggestion drop down texts start to become visible in my old project now.

Related

Why don't components show up in the Design Mode in Android Studio?

The Design view in Android Studio is just blank for me. I've already followed the advice in this link but it doesn't work. If I right click ConstraintLayout and then Convert view it opens a window where I can click RelativeLayout but this doesn't work. Does anyone have any advice?
I had this problem earlier this week. Everything I selected for my ConstraintLayout was invisible for a new project. I ended up selecting a different theme and it woke up after that and started showing the picked views.
Screenshot Attached:
On the right on the API number ["28" in my case]. Click on the theme [NoActionBar in my case]. I think if you try a few different themes they will eventually become visible again.

Chrome Mobile, Change System Navigation Bar (Back, Home, Recent Buttons) Background Color?

recent update to google chrome on android makes the navigation bar background white & dark themed sites look crappy with this at the bottom imo (screenshot below).
im wondering if there is a way to control the color with meta tags or something similar to how the top area theme color can be controlled like...
<meta name="theme-color" content="#353535" />
or any sorta way to alter this? even just setting to black would be great, dont really need a custom color. tried looking around through documentation but couldnt find anything exact, might not be doable. apologize if my terminology might be off.
screenshot of the white navigation bar at the bottom for reference
This is not fixable in Chrome 67. Whether or not it will be fixed is tracked in this chromium issue. Star it if you're interested in the issue getting more attention
https://bugs.chromium.org/p/chromium/issues/detail?id=797527
According to what I saw, there isn't a way to do this now. Maybe Google will add a way to do this in a future update but for now they are apparently using this to limit the burn in on the screens.
So we are unfortunately stuck with it for now

Is it possible to customize the BottomNavBar without Icons, Change the text and Changing the selected tab background

BottomBarNavigationBar template
BottomBarNavigationBar
Note : It should follow google material design guidelines also.
Removing Bottom Navigation Bar is not possible in non-rooted android device. But you can set buttons to just above the Bottom navigation Bar,it would work fine and look nice.
For changing text style you can go through this link. It would clear your doubt.
Changing the selected tab is definitely possible. For this go through this link
And finally I am sorry that I am giving just link here, as all the questions you asked are already available on SO.
So please, next time when you ask any question, then do a detail research about it then post that here.

Error indicators (for form validations) not shown for android 4.2?

Background
On Android, you can set an error indication for any EditText view when you want to show the user that what is typed there (or not typed) is wrong (called "form validations").
There is even a nice library for this (here) , and many post here are available of how to use it.
All worked well for me till I've ran it on a nexus 4 with Android 4.2 .
The problem
Sometimes, it just won't show the icons of the errors. In such a case , only when i give the editText (that has the problem) focus, it shows the bubble, but it's empty and doesn't show the icon of the error.
Also, in all cases, the bubbles are always empty.
Why does it occur, and how can I fix it?
Note: I use actionBarSherlock library so I need to use their themes or a theme that is based on theirs.
EDIT:
here are some screenshots:
android 4.2.2 :
android 2.3.5 :
EDIT:
after i thought that this was solved by itself, i've finally figured out when this bug occurs:
if the focus is on another editText which doesn't have an error, and the error of validation is on another editText , the indicator isn't shown till the editText gets focus.
Problem 1: The problem is the Theme of the application.
Try changing the theme to some darker theme like:
<style name="AppBaseTheme" parent="android:Theme.Black">
and it should solve your problem. I found this similar issue earlier and rectified this by changing the theme.
But I didn't research much but I feel that this is Android issue and the bubble should try to change the text colour according to the theme.
Let me know if it solves your problem, or not.
Problem 2: The other issue you are talking about for not taking focus, you may consider the following link: Text Truncating and Focus Issue.
----------------------------------------Updated Answer---------------------------------------------
Q1) What should I add to the theme configuration in order for it to always work, no matter what theme I use?
According to my findings here are some results:
[Note: Only applicable for devices running 3.0 and up]
If your build target is:
less than 11, then using
parent="android:Theme.Light" --> setError() message doesn't work or shows very faded text colour almost blending with color white
parent="android:Theme" --> setError() message works
greater than 11, then using
parent="android:Theme.Holo.Light" --> setError() message works
parent="android:Theme.Holo" --> setError() message works
Since, your project is supported for devices less than 11 API level and you want to support 4.0 and plus too, your best bet would be to go and integrate HoloEverywhere in your project which will solve your problem and you will be able to use your ActionBarSherlock too, for compatibility, check this SO Post.
Q2) What are the available configurations for the error indication UI ?
Mostly you can customise drawables and icons but I doubt you will be able to configure your text and background(If anyone knows more may point out on this)
I would suggest you to check this SO Post for immediate answers.
And for placing the correct focus, for every validation checks, you may place this code:
EditText.setFocusableInTouchMode(true);
EditText.requestFocus();
EditText.setError("My Error Text");
Let me know for any issues.

Trouble with Android UI: main theme does not match with popups' theme

So I am still working on my messaging app, and I have successfully implemented a few popups on my own, but then they don't turn out exactly as I want...
The theme is supposed to be strictly black text on white background, zero transparency (Theme.Light.NoTitleBar). While I have no problems whatsoever in the activity itself, my trouble is with the popups, whose theme does not seem to match as I expected. Can anybody tell me how to fix these?
It looks like after much trial and error, I only had to force the views to use specific styles/themes.
For the popup menu (PopupWindow):
menu.setBackgroundDrawable(getResources().getDrawable(
android.R.color.background_light));
For the dialog (DialogFragment), it's...:
setStyle(android.R.style.Widget_ListView, android.R.style.Theme_NoTitleBar);
...Or it just corrected itself.

Categories

Resources