Android: pixelization of upscaled/downscaled resources - android

I have a problem with the "pixelization" of the embedded icons (main/res) on some devices. It can be reproduced on some Android 9 TV boxes and it happenes when an icon is upscaled/downscaled somehow (see images as example). But I do not know why it happens. And I can not reproduce this bug on any devices of mine and on any Android Emulator. I am using regular Android resources (R.drawable) in an XML layout. As I can see, it is not an anti-alias problem. Also, the same APK works great on the other TV boxes. This problem was reported by the user and as I said - I can not reproduce it. These resources were set just via android:src in ImageView, nothing special.
What I need to check first? Thanks.
Example of the pixelization:
https://i.stack.imgur.com/k76jx.png
https://i.stack.imgur.com/Tp8iX.png
UPDATE:
I tested this behavior with the user on his TV box: it happens only with SVG(VectorDrawable) graphics and with android:hardwareAccelerated="true" (it is true by default). If I set android:hardwareAccelerated="false" everything works as expected. Any solution for this?

android:resource="#7F160010" />

Related

Bootstrap 3 glyphicons (font-face) causing weird HTML layout issues

I got a weird problem with bootstrap 3 and the glyphicons!
The problem appears on my android mobile phone with Chrome (latest).
Problem description: If the font-face-statement exists in the bootstrap.css to load the glyphicon font file(s), the layout of the page gets a little bit broken.
On a windows phone, it's fine. It's fine # Firefox on a Desktop machine too and also in Chrome Desktop.
If I load the page the first time, the layout is OK! If i reload the page or change the page: The weird problem appears and keep! (-> Cache?)
E.g., screenshots from Android Mobile Chrome (latest):
Button group vertical with glypihcons. Icons are moved to the right. (Padding problem?)
Buttons with text # footer. (Padding problem at right side?)
Label for an input field. (It just breaks)
A self styled Checkbox + Label after it. (Unwanted new line break after the checkbox because the parent container is a lil' bit too small (width)...)
I don't know whats going on! If I remove the font-family for the Glyphicon Icons from bootstrap.css, everything is and keeps okay (insteat the missing glyphicon icons off course). If I let the font-face statement in the file, the problem occurs # android mobile phone.
Does someone already have had this problemand how can I fix this and what is the problem?
Fixed it for my self. It don't know what Chrome did, but clearing all the Chrome App Cache worked for me. The Problem was App related.

Keyboard covers edittext and webview in Lollipop ONLY

I do understand that similar issues have been reported here but mine is somewhat different.
I have recently upgraded the com.android.support:appcompat-v7 to v21 and com.android.support:support-v4 to v19.
Everything seemed normal on a pre-lollipop device but when I started to test the device on Android L, two issues appeared:
The softkeyboard was covering EditText
In the webview, system wasn't resizing, pushing the form-fields to the top as it normally should, rather did on pre-lollipop devices.
I read various articles and added the following line to my AndroidManifest.xml file:
android:windowSoftInputMode="adjustPan". It did push the edittextfields on top of the keyboard removing the toolbar from the view however it did not resize the view in webview and still covered the form fields at the bottom.
And after the changes, the app on pre-lollipop devices is malfunctioning in the same fashion as well.
Any help will be very much appreciated.
Extract from android-manifest:
<activity
.....
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan">
...
</activity>
I am using the Theme.AppCompat.Light.NoActionBar theme for my app.
Incase anyone lands here facing the same issue, the behavior occurs because "they" (Google) have changed the behavior of adjustPan moving forward from Android L.
To fix the issue, I am using a keyboard util in the library as indicated here.
A note from the developer is that this fix is to be used only in fragment/activity becaues this uses a GlobalLayoutListener which lowers the frameRate a bit but this is the only option to get it working

CordovaWebView: Black screen when change div from display:none to display:block or use css3 translate

When I add a class to make appear a div (display:block) , suddenly view change to black screen. I touch the screen, elements in view still fire event.
How can I resolve the problem?
You should make sure you are using the most recent API (You can probably adjust this in eclipses android sdk manager).
If you still have any issues, make sure you have hardware acceleration on. You can adjust this in the manifest file:
<application
...
android:hardwareAccelerated="true"
...
>
If you still have an issue, try applying a css3 translate to something like your global body on app load. That will help to narrow down the issue. Otherwise, without some more code/information it's going to be hard to answer.
Let me know if I can help with anything else, but for what it's worth I haven't had this issue at all using the most recent android API and cordova 4.0.

Android - Emulator showing garbled layout

I'm developing an android app. So far I've been testing everything on my Galaxy Nexus with android 4+. I've done all my programming with backwards compatibility in mind.
I'm very close to release, and want to make sure that it runs okay on API 9+. Since I don't have a real android 2.3 phone, I'm using the emulator.
Everything seems to work fine, but the layout is sometimes okay, and sometimes completely garbled!
The background is horrible, and TextViews are a lot of times missing. But sometimes they're okay for just a few moments before garbling up.
How reliable is this emulator? Is this how it would really look if I ran it on a real machine? What can cause this?
EDIT:
The layout in the screenshot is made up of 7 small ViewGroups containing ListViews.
This is the code for the main background drawable (the blue-green-gray garbled one):
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="#drawable/main_bgtile"
android:tileMode="repeat" />
EDIT2:
I also noticed that when a transaction animation when switching fragments is played, the fragments look perfect for the duration of the animation, and then re-garble when it's done.
EDIT 3:
My logcat seems to be flooded with the following error:
10-09 00:41:40.385: D/skia(327): SkGL unimplemented: stroke path
A few dozens of those. What should I do to fix this?
Thanks
I solved it:
I'm using actionbarsherlock; and for some reason I decided to disable the actionbar in the style, but then re-request it in the activity.
By removing this line from my onCreate() method in my activity, I was able to solve the problem:
this.getWindow().requestFeature(Window.FEATURE_ACTION_BAR)

Strange background of text in custom theme

I recently updated my app, changing it's design a bit. Amongst other things, I styled buttons with custom drawables (well - not exactly custom, just taken from ICS release). Everything works well, except for one of the users.
Instead of:
He sees:
This is a Button, but I have also other controls styled with the same background drawable and the problems appears there (so, it's not limited to buttons).
There are two changed style properties that these controls have in common. One is, of course, a background drawable. The other is textAppearance:
<item name="android:textAppearance">?android:attr/textAppearanceMediumInverse</item>
I came to a conclusion, that this user is using some strange theme, which alters the default value of textAppearance* styles. But I have no idea what attribute may control this "text background color" (android:background does not work, checked this just in case). Or maybe I'm looking in the wrong place and this problem is not related to textAppearance?
EDIT:
The background image is a semi-transparent PNG file.
Android version 2.3.7, Motorola Milestone. That's all I got.
EDIT 2, Fixed:
OK, the problem was at the users side, it turned out he was using CyanogenMod7 with forced 16bit trasparency. After switching that option off, everything works.
OK, the problem was at the users side, it turned out he was using CyanogenMod7 with forced 16bit trasparency. After switching that option off, everything works.

Categories

Resources