Android : Draw Circle On Alpha Channel?
Jan 12, 2010
I've created a bitmap that I'm overlaying over another bitmap. I'd like to alter the transparency of sections of the overlaid bitmap, revealing the bitmap beneath. I can't find a way to write only to the alpha channel of the overlaid bitmap.
For example, I have a bitmap filled with red pixels, and an alpha that is 255, opaque. A solid red bitmap. How do I draw a circle on this map that would lower the alpha values toward 0, transparent?
View 2 Replies
May 19, 2009
I've just migrated to 1.5 and a strange bug has occured. I have the following code...
That means I want my image button to have no background, just image. It worked well in sdk 1.1, but now it shows a black rectangle as background. Why can it be and is there another way to remove the background?
View 3 Replies
View Related
Sep 2, 2009
I'm new to openGL and I have done some first tests with drawing a triangle. Now I would like to draw a circle, which is filled with a texture, but I have no idea, how to do so.Can someone of you give me a hint?
View 5 Replies
View Related
Aug 15, 2010
Hopefully this is a simple one as I've been asking loads recently...
I am trying to draw the a white circle with the following code...
but it is being displayed as a solid disk, how do I get it to just display as an circular outline with a transparent centre?
I've had a look in the help and it makes no sense to me, probably because I'm not used to the drawing terms like stroke and dither. What's wrong with background and border eh?
View 2 Replies
View Related
Aug 1, 2009
I've this code:
Java: (http://nopaste.me/4449 )
package com.patrick.games.whackgroundhog; import android.app.Activity;
import android.content.Context; import android.graphics.Canvas;
import android.graphics.Color; import android.graphics.Paint;
import android.os.Bundle; import android.view.MotionEvent; import android.view.View;
public class Game extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(new Ground(this));
} class Ground extends View { public Ground(Context context) { super(context);
} public void onDraw(Canvas canvas) { canvas.drawColor(Color.BLACK);
} @Override public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
//TODO: draw the circle } return true;
} } }
View 2 Replies
View Related
Sep 5, 2010
In my android application I use this method in "draw" Overlay class for draw route on map. Can someone tell me if this method is good (in terms of performance) for route draw on map or I must to put code in Thread ??
I'm new to android.
public synchronized void draw(Canvas canvas, MapView mapView, boolean shadow) {
if (pointsAndTimes.isEmpty()) {
return;
}
Projection projection = mapView.getProjection();
Paint paint = new Paint();
paint.setARGB(250, 255, 0, 0);.............
View 1 Replies
View Related
Aug 3, 2010
How can I do this? There's a setAlpha but no getAlpha.
View 2 Replies
View Related
Aug 4, 2013
I have been having issues downloading the latest version of my app as part of Alpha testing. I have uploaded 6 versions and every time i download the app i just get the first version.
Thinking this is something to do with cache on google play store, on few versions, i waited more then 24 hrs for the download. Even this did not work.
Is there anything that i can do to make sure that i download the latest version. All the previous versions are archived and only the latest version is published/active.
View 2 Replies
View Related
Mar 21, 2009
Is it possible to generate an EGL Config with an alpha buffer on the G1? When I request a non-zero number of bits for the alpha buffer I can get a R5G5B5A1 or R8G8B8A8 visual, but neither of them renders correctly to the screen. I assume that's because the G1 only supports R5G6B5 visuals. It does surprise me that I can even get those visuals though. It's fairly obvious looking at the 32bpp visual artifacts that the frame buffer is indeed laid out with 32bpp, but display hardware is treating it as 16bpp, resulting in the left and right halves of my scene rendering in alternate scan lines, with distorted colors. So does anyone know if there is any way to get an alpha buffer on the G1? I've tried using FBO's but they don't seem to be implemented either. Or I'm using them incorrectly. If I call glGenFrameBuffersOES on a GL11ExtensionPack reference I get an UnsupportedOperationException. I am getting my GL11ExtensionPack reference by casting the return value from my EGLContext.getGL() call.
View 2 Replies
View Related
May 24, 2009
Since Google groups doesn't let you add posts to threads more than 60 days old, and I want to leave a solution to the problem I encountered a while back, I'm posting this message with the same title in hopes that anyone running into the problem I had will find this message as well. I was having trouble getting my G1 to render an RGBA_8888 OpenGL context to the screen. Everything was twice the size it should be because the 8888 pixels were being interpreted as two 565 pixels. The colors were obviously wrong as well. I had missed a critical function call. You must configure the Surface that is being used by EGL using the SurfaceHolder method setFormat. The pixel format needs to be TRANSLUCENT, or more specifically you can use RGBA_8888.
View 2 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
Oct 28, 2010
I have a single-channel PNG file I'd like to use as an alpha mask for Porter-Duff drawing operations.If I load it without any options, the resulting Bitmap has an RGB_565 config, i.e. treated as grayscale.If I set the preferred config to ALPHA_8, it loads it as a grayscale ARGB_8888 instead.How can I convince Android to treat this file as an alpha mask instead of a grayscale image?
mask1 = BitmapFactory.decodeStream(pngStream);
// mask1.getConfig() is now RGB_565
BitmapFactory.Options maskOpts = new BitmapFactory.Options();
maskOpts.inPreferredConfig = Bitmap.Config.ALPHA_8;
mask2 = BitmapFactory.decodeStream(pngStream, null, maskOpts);
// mask2.getConfig() is now ARGB_8888 (the alpha channel is fully opaque)
View 1 Replies
View Related
Jul 14, 2010
Is there a way to apply a color to an alpha animation in android? I know how to use the <alpha> element, but i'd like to have the alpha apply a color as well as an alpha so i can hightlight a layout. is this possible?
View 1 Replies
View Related
Aug 27, 2010
How can I get the alpha/opacity of a View after I've animated it? code...
View 1 Replies
View Related
Oct 11, 2010
I've been struggling for a few days on this, finally just decided to ask. It's so simple I've got to be missing something very basic.I have an XML layout page with an image defined. I have two anim XML pages, one to change alpha from 0 to 1, and the other from 1 to 0 in order to create a "blinking" effect. So the alphaAnimation is defined in XML, I just need to call it. The image pops up, but there's no looping blinking effect.
View 2 Replies
View Related
Nov 28, 2010
There is Froyo running on an X10, I know its true because its my x10, this is an Alpha version and runs from the SD Card, it is not even a beta version yet but this version is around 90% done, still some things to resolve. This is not a re-flash of the phone it is a dual boot so has not affected the SE base operating system currently installed being 2.1.
The guys at XDA are working on this and if they get it fully resolved then it will become available as an alternative system, if they keep it as dual boot it will never affect your warranty. At all as this installs on your SD Card, there is a thread on the XDA forum but in respect of this forums policy on rooting and other things I wont post the link but searching the XDA forum for x10 Custom Rom will return a number of results so you can find it from there yourself.
If the guys at XDA can do this then SE can, the only thing is XDA are not restricted by International markets and operator restrictions like SE are, if XDA make a custom rom that runs 2.2. From the SD Card then for me its perfect it keeps the phone warranty and software as is and lest you run your own free Froyo version. The pictures are not photo shopped except for clipping and sizing from the original.
View 7 Replies
View Related
Jul 23, 2010
How in the world does one get rid of the temperature display/notification in the above bar once The Weather Channel app is opened? There doesn't seem to be any app-specific settings here.
View 1 Replies
View Related
Jan 20, 2010
Sometime yesterday Discovery Channel announced the availability of their application for Android. Has anyone been able to find it? Following the link provided in their official twitter feed led me to a 404, and Marketplace searches yield nothing for me. I'm on Droid Eris.
Discovery Channel Launches Android App - AppScout
Even the QR code I found here yields nothing:
http://www.androlib.com/android.application.com-rhythmnewmedia-discovery-pFjq.aspx
View 21 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
Sep 3, 2010
I am drawing some textures with alpha channel, but when they are displayed it looks like the alpha channel is only binary. So a pixel is either transparent or opaque, although in the texture file itself the pixel is half-transparent.
The blending is set up like this:
code:............
The above shows how it should be like, and the below shows how it is:
View 4 Replies
View Related
Aug 7, 2009
When applying an alpha value to an imageview, Eclipse displays the view accurately in layout mode. But when exporting to a target device (such as a phone), the alpha appears to be ignored. This impacts developers trying to create fade ins/outs of elements in a widget. Has anyone else come across this issue yet? Not sure if this behavior is by design or by error.
View 2 Replies
View Related
Aug 17, 2010
I am having issues with videos from Roosterteeth's channel ( primarily Red vs Blue episodes) playing on my droid.I have added the videos to my playlists and my favorites, but thet will not play in either the youtube app or the mobile site.I get the error message "Sorry, this video could not be played".Anyone have any ideas? All other videos seem to work fine.
View 3 Replies
View Related
Nov 20, 2008
Just found out that if you swipe side to side on the Weather Channel's weather app it'll move between your locations.
View 11 Replies
View Related
Jan 19, 2010
Is there any way to stop the Weather Chanel from broadcasting alerts. In San Francisco, wind and rain, constitute alerts. So this week there's a new alert every hour or two. I know it's raining and I know it's windy. It seems to be draining the battery.I've looked in the menu but I can't figure out how to stop the alerts from waking up my phone all the time. Any suggestions other than uninstalling?
View 1 Replies
View Related
Feb 26, 2010
The Contacts app shows a button on the side of the screen that acts as a little thumb to allow you to quickly scroll the big list. I have a very long list that would benefit from this navigation behavior, but can't find any documentation as to how to enable it.
Is it a behavior that's built into the SDK, or must I write it myself?
View 1 Replies
View Related
Aug 22, 2009
Is it possible to get a handle on the outgoing data (voice) stream during a call? I'd like to be able to intercept the outgoing data, alter it slightly, then write it back out.
View 15 Replies
View Related
Apr 3, 2010
Over the past couple days, it seems like my Weather Channel app hasn't been working properly. When I move to the home screen that has the widget, it will be displaying the wrong temperature and picture (i.e. it might be showing "partly sunny" when it's night time). It just shows the temperature for the last time I opened the app.So, I click on the widget to open the app, and it brings me to one of the screens and it just says "N/A", while a green circle rotates in the upper-right corner. After a few seconds, it finally updates and shows me the current temperature/forecast (whichever screen I was in last).I've never had these problems before, up until the past few days. Usually I would just move over to my other home screen, look at the temp, and move back. It would always be [somewhat] updated by itself (usually every 30-60 minutes it seemed). Now it doesn't update until I actually open the app.Any ideas or suggestions? Or is anyone else having this problem? I am using the Droid Eris. I restarted the phone yesterday, still doing the same thing.
View 2 Replies
View Related
Jan 26, 2010
I like the Weather Channel App, but the alerts are driving me crazy.Maybe I just live in a volatile area, but sheesh it seems like the app is constantly alerting me to heavy rain, then high winds, then this, then that. I don't need any of that!(I have a window.)Is there any way to turn these alerts OFF?
View 3 Replies
View Related
Nov 11, 2009
Is there an app that would let me listen to Z100 and/or the Elvis Duran channel?! I love those stations, but I can't find an app that has it yet.
View 5 Replies
View Related
Sep 3, 2010
Alternative to i Heart radio - (which only plays clear channel) Check out "tunein radio" just found my Friday night HIGHSCHOOL FOOTBALL GAME ON THIS APP!!!!!!!
View 10 Replies
View Related