In my app I'm using a listview with a section indexer that displays the letter of the current selection. It's fine on a lot of devices, but when I use my app on a Galaxy Tab running Android 3.2 the letter is displayed without the little box. I don't know how to make it appear or change the color of this letter.
I tried to use android:textColorPrimary but I didn't find how to use it and I find no sample.
To see my problem, below is a screenshot. If you look carefully, the letter G is in white above the second element of the list.
This is kind of a strange answer, because I fixed it, but I'm not sure why. When I set FastScrollEnable = true later than in the contructor of my derived ListView I get this behaviour aswell. Although, my letter is almost completly off the screen.
I'll probably get downvotes for this answer, but it saved me after 6 hours of prodding around. I noticed it when I removed my prototype code from our main classes to change the FastScrollEnable from outside.
Related
Another day, another bug...
I have three AutoCompleteTextFields with the filter overrided to get completion from my REST service, but my big problem is that the suggestions popups of those text are clickthrough... so when I've already completed one of them, any click on the suggestion popup of another will trigger the underlying ACTF, which is already filled and so show it's own popup, making impossible to select the item from the other ACTF suggestion popup.
The two screenshots here show the situation, the ACTF are the textfield hinted "Partenaire", "Contact..." and the already autocompleted one under.
On the second screenshot, I've tried to select the item over the third ACTF, and so the four first results are from the third ACTF, and the four last are from the "Partenaire" ACTF.
Is there a way to override something like onShow() for the popup and it's hiding equivalent, so I could disable the other ACTF when I type in one of them ?
I think it's a good way to solve the problem, but I am open to any other idea :)
I've forget to mention it, but the problem occur on Android and on the simulator, but iOS has not such problem.
Check that your UI has scrolling set correctly, only one container in the hierarchy can be scrollable on the Y axis. By default the Form's content pane should be scrollable on Y (unless it's a border layout).
I have a list view with some complex layouts.
Some parts of the layouts are set visible/adjusted at runtime (i.e. not everything set by the xml).
It has caught my attention than in some "rare" cases there is a specific part (the same in all cases) that is rendered visually either a few seconds after looking at the list item or if I scroll down the list and then scoll back up again.
What I observe is that it seems like after a few seconds the list item is "redrawn" and the item suddenly appears.
I have added debug output to check for its visibility and according to the console log, the item is visible when the getView is called for that the first time.
So I have no idea what the issue might be.
How can I debug issues like this?
There is an option in the developer pane on your cellphone that flash every time a piece of screen change.
You can also use something like this https://github.com/JakeWharton/scalpel
If you are using an android device you can activate 'developer options' (you'll have to google how to do this for your device as it varies) like Luca said. These are really cool because you can see where changes appear on the screen and add layout borders etc which make it easier to see exactly what is happening. They can be really useful for debugging sometimes!
I had a similar problem and I tried removing most of my code and adding chunks back in to make sure they were working and eventually you should be able to locate at least the general area where the problem is.
Good luck! Sometimes these things can take a while!
On some phones, mainly a Galaxy S2 I am having an issue where the results in a custom adapter overlap on each other. This is an example where user searched for the word "vaginal" in a search field, it is a medical app.
I am not sure the best way to describe this and the code is pretty convoluted at this point. The user types in a word, and database results come in showing matches. These results are in a List object and displayed via adapter.
On most phones this works as expected, with results being sequential. On at least one device, the above screenshot happens.
Is this is a known error and how can I fix it?
This looks rather like How often can you update a textview without mess , possibly caused by View reuse in the list adapter. The solution to that issue is to force the background to a fully opaque colour.
Something odd is going on, I think...
I have menu with sub-menu items.
One sub-menu gets GPS location, does some calc's and updates two display fields. No problems.
The other sub-menu takes user input and does calc's BUT, it uses the same display stuff as the fist sub-menu but, won't update the two fields with the new input for display. I have a second display just to see whats going on and this display does update the two fields correctly.
There are no differences between these displays (declarations, parameters or values) HOWEVER, and here's the lead-up to the odd thing, I got a warning when setting the display for the two fields (for displaying in the second sub-menu) and used a suggestion from the pop-up.
The suggestion was to make the TextView static. I clicked it for one (left the other as-is for trial and commented it). The warning went away but, crash! at run time.
So, here's the odd thing: Nowhere do I see anything that makes this TextView static! All related declarations and ref's to it are identical to the one I didn't make static. In fact, I tried to manually make the second one static but couldn't. I also checked the R.java file but nothing related in there...
Fortunately, I was able to use 'Undo' the Make-it-static.
Any comment/clarification for my education?
Thanks
The "Make it Static" suggestion only applies to your Java code. If you check out the declaration of your TextView it will now say something like static TextView mTextView. As for the other problem, there is no way to say for sure what is going on without seeing your code.
I used a spinner to display a list:
At the bottom of the list, there is this grey line. How i can remove it programatically??
Thanks
That only seems to appear on the HTC Evo, I'm not sure why it's there, but it's not something that I know of a work around for. If you run the same app on another device it should be fine. Hopefully this is something that will be fixed in an update.