I am trying to "play" with a webView. I slide it and rotate it, and it works fine. The problem is that when I rotate it, I get a ugly white rectangle in the background emcompassing the webview. I tried to change the background color but it's still there, and it's still very white and ugly.
Any idea how I can make it go away?
I guess it's the background color of the window. You can change it in your theme file
Extremly strange. While playing around, I tried to modify the alpha value of the webview. Turns out it make the white background disappear! When setting any value other than 1 with the setAlpha method, the white immediatly goes away.
Another thing appear thought : I have a TextEdit just above the webview in my layout, with a black blackground. When I rotate the webview, part of it's corner go over the TextEdit, and this part (on th TextEdit) become white...
I corrected this with invalidate(), but this is really strange.
I suspect both occurrences are bugs.
Related
so ive created a fragment for my app where a window pops up, and asks whether to take the picture from the camera or to get it from the gallery. Everthing, but the two buttons in the middle, are exactly 1 .png. This background png (that also includes the texts), has two transparancies. One in the white background (which is at about 25 percent) and one in the black background that takes about most of the screen. This opacity level was first set to 1%, now it is set to 0. The black basically doesnt even exist anymore. Yet it is almost fully black. You can see from the image i attach, that one is bearly able to see anything through. But why is that? Where does this heavy alpha channel come from?
Thanks!
I'm using Unity's animator to change the color of two images as well as a text color. The color change is on a loop until the player presses "start" and then it is disabled at which point the game runs smoothly. There is some automated character movement going on in the background that starts to lag big time when the images/text are changing color.
Ive also tried lerping the colors in code and experienced the same lag. Do image color changes typically slow down games like this? Any ideas on how to fix this?
Here are two pics of my setup:
Try to use the CanvasRenderer's SetColor() function. Changing the UIBehaviour's color property will force the canvas to rebuild.
I am having a View and i have placed a background image.Taking the snapshot works fine in this case.
But i setAlpha to make background image semi transparent then snapshot becomes blackish in color depending on how much I am making it Transparent.
How to programmatically take a screenshot in Android?
having seen this link but doesn't help much with this case.
Any help?
if you put an alpha color the screen shot will get a non-color (black) mix on it, always.
If you want a screen shot, and keep your alpha, you'll probably have to remove the alpha, wait it to render on the screen, get the screen shot, and then change it back to alpha.
I know cause I've used this before in an application.
I'm using an image with transparency as a ImageButton in my Android app - but when it appears on the android screen - it still has a whitish surrounding border.
I even changed the image to one of the template ones supplied and that still is not transparent (although it is in photoshop).
Am a missing some declaration or something ?
I tried in both the emulator and also running on my phone and its still shows as white on the black background.
Cheers
ScottyB
The whitish color IS the button part of the image button :)
Use regular Button and set your image as the android:background of it. Don't set any text.
I have a ListView that has a subtle gradient bitmap in the background of each item. I noticed that when I scroll the list, the background gradient becomes banded and changes color. The gradient is a dark gray and when it scrolls is becomes subtly green and banded. It basically looks like the quality of the images greatly decreases as it scrolls.
Most of the time, as soon as it finishes scrolling, it returns to the normal quality. Sometimes it actually stays poor quality even after scrolling stops. On a Nexus One it almost always stays low quality after scrolling.
Is there a way to avoid this?
Note: This is not the common ListView background problem discussed here: http://developer.android.com/resources/articles/listview-backgrounds.html
Here is an enlarged screen cap to show the difference. On the left side is the background normally. On the right half you can see what it looks like when it scrolls.
You need to add android:cacheColorHint="#0000" to your ListView in xml.