Weird Text overlapping issue - android

Hi StackOverflow members,
I was playing around with the Open WordSearch project and I applied a custom ttf font and changed a phew things and now I get a weird overlapping of next words on top of previous words I tested the original code and it does not do this. I even reversed all my changes I could think of and it still happens. I experienced this same issue on another project too. It was not happening on my Desire HD buy I found it only on the emulator. Has anybody ever came across this issue? For the life of me I can not figure out were or how it is happening I cant even provide the code for it. Any help would be greatly appreciated.
Best Regards
Jason

I found the problem code this theme resource
<resources>
<style name="Theme.NoBackground" parent="android:Theme">
<item name="android:windowBackground">#null</item>
</style>
</resources>
Do not use this if you have scroll through text objects!

Related

Android marshmallow listview scrolling gets blurry

I have an android application which is running on production for several years. Lately, I have discovered a problem with a ListView in the app, that gets blurry while scrolling. The problem only occurs under Android Marshmallow.
Here is a screenshot of the ListView while scrolling
Any help would be much appreciated.
Thanks!
Preface: I posted a separate answer prior to this one, but that solution only worked on my MotoX. I later discovered it did not work for my Galaxy Tab A. The answer here seems to be more universal:
I was able to fix my scrolling blur by defining a separate ListView style for my application and specifying a different list divider. So, for my application theme I set this:
<item name="android:listViewStyle">#style/ListViewStyleNoBlur</item>
Where ListViewStyleNoBlur is defined as:
<style name="ListViewStyleNoBlur" parent="#android:style/Widget.ListView.White">
<item name="android:divider">#android:drawable/divider_horizontal_bright</item>
</style>
I specified these in a values-v23 resources folder so the change doesn't affect pre-Marshmallow devices.
My application theme is based off of android:style/Theme.Light, which is why my list view style's parent is android:style/Widget.ListView.White. My app min SDK is 8, which is why I'm using such an "old" theme. I also noticed that if I use a "newer" theme, such as Holo, the blur does not exist.
I also had this problem and, through trial-and-error, finally found a solution. Hopefully it will also work for you. This appears to be a bug in Marshmallow related to the scroll bar in list views. I had the following property set in my application theme, and removing this property fixed the blurry scrolling:
<item name="android:fadeScrollbars">false</item>
Using true instead of false also works, but is unnecessary since it is the default. I also discovered (through trail-and-error) that using android:fastScrollEnabled="true" causes the same blurring, but based on your scrollbar style, you do not appear to be using it.
In summary, don't use android:fadeScrollbars. If that doesn't fix your issue, try playing around with any other scrollbar-related styles you may be using on your ListView, bearing in mind these styles may be part of the view directly, or part of an activity or application theme.

Android - how to put 5 different Smiley in Rating Bar

I am creating a form in which i have to put five different smiley icon in rating bar to get feedback from user.
I tried but at a time only one type of icon is being displaying.
I am trying by changing style in style.xml
<style name="customRatingBar" parent="#android:style/Widget.RatingBar">
<item name="android:progressDrawable">#drawable/ratingstars</item>
<item name="android:minHeight">32dip</item>
<item name="android:maxHeight">32dip</item>
</style>
Please suggest me how could we achieve this in android?
Thanks in advance.
Here is a ratingbar which uses face morphing animation to animate different smiley reactions.
SmileyRating github
You can clearly see that the smiley is changing its reaction slowly.
From my experience with RatingBar I would say ditch it completely and implement your own mechanism for getting the feedback. Maybe a horizontal linear layout with 5 circular buttons?
I had the same problem and the only way I found is to make a LinearLayout with the 5 different faces as elements, and manually control touch position to change faces from selected to unselected, emulating how an old plain android RatingBar works.
I recently made a library out if this implementation, maybe it can help you.
An example of the library working with faces:
Checkout this EmojiRatingBar library.

Different colored buttons android

I want to have 2 different colored buttons for my app. I am currently using this in styles.xml but it applies this theme for the whole app:
<item name="android:colorButtonNormal">#color/primaryColor</item>
I tried using this in the button but it makes no difference,
android:backgroundTint="#color/accentColor"
Please help! I would appreciate clear answers as I cannot find the answer anywhere. Thanks!!

Bigger text icons in Action bar

I have this design to achieve:
but the result I got is this:
As you can see I am asked to create the submit button much larger that it actually is, I've tried setting it as an image with no luck, also I've tried entering it as normal text and manipulate the theme but that didn't work either, I'm using the latest and greatest API 21 .. Lollipop.
here's the code to the item in my menu:
<item
android1:title="submit"
android1:id="#+id/userLoginSubmitActionBar"
app:showAsAction="always|withText"/>
Have you tried using android:actionLayout attribute of the <item> tag? It will let you set a custom layout to be displayed. You could use a TextView and set the text size appropriately :)
As for the arrows, if I am not wrong, < means up navigation while <- means presence of a navigation drawer, right?
This is really a hack I suppose but what the hell, here's my solution to my own contribution,
I've set
<item name="android:actionMenuTextAppearance">
to my own custom theme parenting from
<style name="myStyle" parent="android:style/TextAppearance.Holo.Widget.ActionBar.Title">
and the damn thing worked like magic ! haha... thank u guys, really, no need for the drum rolls in the background :D

XML Layout - Entry Identifier 0x11a is larger than entry count 0xb2

'Entry Identifier 0x11a is larger than entry count 0xb2'
This is what's printed in my LogCat when switching to a specific fragment.
I think it may have something to do with my 'xml layout' resource being inflated. I am not sure what though.
My Question
Has anybody else had this problem or know what it means?
Thanks for your help
I've encountered this problem and worked around it with a hack. I added an empty style at the top of my styles.xml:
<style name="empty_style" />
According to this discussion on Google Groups the error occurs
...when HistoryRecord over in the framework is trying to read the theme defined in your resources. There isn't anything wrong with the code [...]. In fact, if you fiddle around with the ordering in your styles.xml, usually adding a few empty blocks near the top, might help get around this
temporarily.
I can't say if the cause quoted above is real, but it removed the issue for me. Hope this helps.

Categories

Resources