Android :: PNG 24 With Gradient / Not Showing Correctly
Jun 5, 2009
I have a LinearLayout and I am setting a Background image. I am using a PNG24, and the image has a gradient in it. When I see the image on the computer the gradient is perfect, but when I see it on the emulator or on a real phone, some colors are lost and I see only like 10 colors, so I see lines and not a perfect gradient. Is the emulator 'compressing' the images? Should I make them in other format?
View 3 Replies
Oct 14, 2010
For some reason, on the X10 Mini Pro Toast Notifications are not showing up correctly. It only displays a single line of the Toast, and cuts off the rest so you cannot see the text.
After testing on the X10 Mini, it seems to work fine on this device. So its just the Mini Pro which has the issue...
Its like the Toast is not being wrapped properly, and the text is not being displayed over two lines.
View 3 Replies
View Related
Jul 23, 2010
Is there a way to have 2 gradients in a drawable xml using either a <layer-list> or <shape> or some combination of them?
View 1 Replies
View Related
May 28, 2010
How can I get rid of the gradient at the top of my screen (the very top of the blue in the screenshot below... below the notification bar)?
View 1 Replies
View Related
Dec 11, 2009
I'm trying to apply an Alpha gradient to a bitmap that I've created from a PNG. I want the image to be opaque at the top and fade to transparent at the bottom. I know this can be done be using getPixels and setPixels for Bitmap and iterating through each row of pixels in the Bitmap and setting the alpha values accordingly, but i was hoping there was a slightly neater way of doing this. I have been looking at the LinearGradient Class and using a Porter Duff transfer mode, but i don't seem to be having much luck with this. It seems that my source image is lost when i apply the Shader to the drawable. Anyone have any tips on how i might apply an alpha gradient to a bitmap?
View 2 Replies
View Related
Jul 26, 2010
In my app i have gradient as drawable which i am using as background and i want it to make it look as smooth as possible. After googling and trying by myself i came up with the following. On nexus one if you call only setDither(true) your gradient is still banding so you have to set PixelFormat like this Window.setFormat(PixelFormat.RGBA_8888). But on the other side G1 does not support RGBA_8888 so calling it make the gradient even uglier than before so Window.setFormat(PixelFormat.RGBA_8888) will not work well on devices that don't support it.What is the correct way smooth my gradient on all devices on which my app will run.
View 1 Replies
View Related
Sep 21, 2009
I have got another mysterious issue. So, I am setting a background image for LinearLayout. This image contains gradient. Don't know why, but after I launch application the image appears to consist of several parts that actually form "smooth transition" of gradient, and that's why it seems that background image is not a gradient.
View 1 Replies
View Related
Nov 2, 2009
I've been looking at some issues with the background of our application, particularly on high-density devices (240 dpi, 480x854). I managed to eliminate banding on existing devices (i.e. G1/G2, 160 dpi) by applying the android:dither="true" attribute to our nine-patch image, which is a 1x480px PNG with no noise added. Looks great. However, if I use the same image on a higher resolution device, the banding is pretty nasty looking. Same happens regardless of whether I use a shape+gradient, a noisy nine-patch PNG, or an android:dithered nine-patch PNG -- even if I create an 854px-tall image. Is the use of gradients going to become a problem on high screen density devices, purely because of the display colour depth, or is there any way to solve this?
View 5 Replies
View Related
Sep 23, 2010
I have a gray gradient drawable (png image in res/drawable). If I draw it on a white Canvas it looks banded (not smooth). If I put the gradient on white background in GIMP, and then draw this drawable on the Canvas, it looks great. What's the problem? I tested this on Nexus One. Calling setDither(true) on the drawable has no noticable effect.
View 2 Replies
View Related
Oct 25, 2009
I have a shape with a gradient that I'm using as a divider between ListView items. I've defined it as follows:
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#ccd0d3"
android:centerColor="#b6babd"
android:endColor="#ccd0d3"
android:height="1px"
android:angle="0" />
</shape>
I would like to add 6 pixels of padding on either side of the gradient, so that it doesn't extend from edge to edge of the screen.
However, no matter where I put an android:left="6px" and android:right="6px", it doesn't seem to take effect. I can put it in the <shape> element, the <gradient> element, or in a separate <padding> child of <shape>, and it doesn't change anything.
How can I add padding on the left and right of my list divider?
View 2 Replies
View Related
Aug 10, 2010
In my Android application I've hidden the default title bar, introduced a TabView and added my own titlebar under that TabView's tabs. At the moment, I'm using the ?android:attr/windowTitleStyle style which makes my new titlebar look gray and gradient. It looks pretty good, but my screens are looking pretty grayscale. I'd like to spice things up a bit by making this titlebar a different color gradient.
What am I looking at here? Creating my own image and using it? The ?android:attr/windowTitleStyle style seems to expand depending on the height of your custom titlebar; so I'm not sure it's actually a single image.
I've attempted to throw a LinearLayout over it with a bit of translucency (ex: making the color #800000FF), but the gradient style I have behind this LinearLayout disappears.
Update:
Per my answer down below, I've figured out that I can create an XML file that defines a gradient and use that. It works fine inside a LinearLayout (titlebar_gradient) I have on my layout. However, it is not working on the outer-most LinearLayout (background_gradient). Could someone tell me why? As I understand it, the ListView should be transparent...
code:...............
View 1 Replies
View Related
Feb 15, 2010
I want to make a custom seek bar having color gradient as shown in the below image URL.
View 6 Replies
View Related
May 14, 2010
Given a closed Path object result is like this: http://www.tutorialguide.net/images/adobe_photoshop/0043/001.jpg. Although that is a rectangle I'm looking for something which works with any closed Path.
View 2 Replies
View Related
Oct 29, 2010
Seems my original post ("ugly pngs...") somehow disappeared :( nvm.
I have a problem with a png resource that has gradient fade-out alpha.
The png looks great in the emulator, but displays an artefact known as "color banding" (http://en.wikipedia.org/wiki/Colour_banding)
Has anyone surpassed this issue ?
My designer wants to trop a shadow behind his icons, and that's where the bands appear.
What are my options ?
View 13 Replies
View Related
Apr 21, 2010
How would I extend TextView to allow the drawing of text with a gradient effect?
View 2 Replies
View Related
Nov 11, 2010
Is there a way to draw a circular gradient mask on a bitmap in Android? Trying to produce something similar to a foggy window. Click the window and a transparent circle shows up revealing whats behind the window. Prefferably using a gradient so the center of the circle is completely transparent and the further out from the center the less transparent. Is this possible?
View 1 Replies
View Related
Jan 27, 2010
I am creating a button programmatically. It is rounded and has a gradient background, and works fine and looks nice, but I couldn't do two things I wanted:
Set a 1 pixel stroke with a given color. I tried getPaint().setStroke(), but couldn't figure how to set the stroke color. How should I do it?
Align the gradient to the bottom of the button, no matter what height it has. Is this possible?
For reference, this is the code I'm using:
CODE:...................
View 1 Replies
View Related
May 28, 2010
I'm trying to apply a linear gradient to my ListView.
This is the content of my drawable xml code...
So I apply it to my ListView with:
android:background="@drawable/shape_background_grey"
It works but it looks very "banded" on emulator and on a real device too.
Is there any way to reduce this "behavior"?
View 2 Replies
View Related
Feb 21, 2010
I'm trying to create a drawable in xml, a rectangle with one gradient on the top half, and another on the bottom half.
This is NOT the way to do it, apparently:
CODE:................
How can I do this, preferably in a way that makes it stretchable to any height?
View 2 Replies
View Related
Feb 10, 2010
In my application I need to react on APN changes (including going back and forth between WiFi and GSM connections) and change proxy settings in case it needs to be taken into account to connect with the network. I'm listening for ConnectivityManager.CONNECTIVITY_ACTION broadcasts to check for APN changes which contains 'reason' extra among others. Unfortunately the 'reason' for APN change is not documented, maybe it should not be used? I was using (with limited success) reason:apnChanged and reason:apnSetupComplete as indicators of APN change being done but that does not work well with going back and forth between WiFi and mobile connection. What is the correct way of listening for changes of current network APN/Interface?
View 2 Replies
View Related
May 23, 2010
I got my droid eris last Feb. 2010. I was always able to retrieve my POP yahoo mail, but it never worked like it should. Then one day a couple of weeks ago, it started working correctly, meaning I would hear a notification sound, the phone would vibrate and there would be a green number on the mail icon on my home page. I don't know what setting I changed, but it was working. Then I decided to get a Mail Plus yahoo account so I could store all my emails in my Mail program on my Mac. I set up it up and all was working.
Then the 2.1 software update came through last week. Mail was not working correctly, so I reset up the yahoo account. The phone did it automatically and I noticed now it's using an IMAP and android.imap.mail.yahoo.com server address. I could retrieve my email OK, but again, it did not work as I expected. Now, in the last 2 days, it is deleting mail from my server when I delete the mail from my phone. There WAS a setting that said Never Delete from Server in the Send/Receive setting area, BUT NOW THAT IS GONE!
View 3 Replies
View Related
Feb 13, 2010
I am having problems getting Torrent Fu to work correctly on my Eris. I have done everything I can think of and need a new pair of ears to help me get past these problem. I have done everything (which I think I did correctly (according to the setup page)) and it is still not working. I have a port on my router open and even tested it and that is ok. However my Eris is not able to see it nor send a torrent to the uTorrent app on the computer.
View 13 Replies
View Related
May 15, 2010
The Gmail app on my Samsung Galaxy Portal/Lite/Spica (i5700) doesn't seem to be syncing mail correctly when previously it was.
I have updated via Odin to Eclair, however the problem was there in 1.5 and I was hoping 2.1 fixed it. Curiously, the issue wasn't there when I first got the phone and it is a relatively recent issue.
When I read a mail in the Gmail app it should mark as read, however when I log on to Gmail from a PC it still shows as unread. But the phone will still mark it as unread.
How do I make the Gmail app show all mail read through it as read when I log on via a PC?
View 4 Replies
View Related
Oct 29, 2009
I've been trying to load a class with DexClassLoader, but it doesn't really work. There was a couple of posts about this, so I tried some of them, but it didn't work.Here's my code:
DexClassLoader dLoader = new DexClassLoader("/data/app/ com.testpackage.test2.apk", "/data/dalvik-cache", null, ClassLoader.getSystemClassLoader()); try { Class cLoad = dLoader.loadClass("com.testpackage.test2.Test2");
} catch (ClassNotFoundException e) { Log.d("ERROR", "Class Not Found"); e.printStackTrace(); } ..............
View 4 Replies
View Related
Feb 19, 2010
Google Sky map is not working correctly.
The display remains stationary when I slowly rotate from North around 360deg.
When I move the phone vertically from the horizon upwards, the constellations change,as expected.
GPS is enabled and gives my correct location when Sky Map starts.
Has anyone, any suggestions. I am an astronomer, and bought my Hero because of this application.
My phone details are:-
HTC hero
Firmware 1.5
Build No: 2.73.61.66
Software version: 1.0.0.A6288
View 6 Replies
View Related
Mar 29, 2010
I've activity, which send files using Bluetooth. When I want to stop server socket which is waiting for accept I call close(). After that activity just hang. How should I close BluetoothServerSocket correctly?
View 4 Replies
View Related
Jun 1, 2010
Is there any way to correctly stop the camera service? This does not seem to work: After doing that the camera does not work, even if I use the program that is pre installed in my handset.
View 2 Replies
View Related
Feb 17, 2010
I've gotten headaches from this too.
Usually a double loop works fine for me:
CODE:....................
View 2 Replies
View Related
Aug 28, 2010
i have a list view and custom list adapter for it. There are various other fields in it and a Checkbox. The problem is that it is not able to map Checkboxes properly. I mean if an entry is already present in database it should come checked.When i put a log in the View function it shows some of the entries that are repeated, i think this is the main reason.
View 3 Replies
View Related
Sep 9, 2010
Youtube app has never worked correctly and now doesn't work at all Since I've had the droid x the youtube app had given myself and others the log in problems where you try to log in and it will log you in"username@youtube.com" how and why does it even do this? The error "There is a problem with network response" I've had since the beginning aswell only now force closes on it self.
View 1 Replies
View Related