Android :: Subclassed Drawable Disables AlphaAnimation

Dec 21, 2009

I have been applying a simultaneous rotate and alpha animation to an ImageView using AnimationSet. It was working fine when I set a Bitmap as the image with Image.setImageBitmap(my_bitmap).

I then extended the Drawable class with my own drawing routine. In my custom drawable I do some porter-duff compositing on the bitmap i was using earlier. I set the image with Image.setImageDrawable( new MyCustomDrawable( my_bitmap ) Now my animation rotates but no longer performs the alpha transition!

One of the things I have tried is returning different values from getOpacity() in my Drawable. None of PixelFormat.TRANSLUCENT, PixelFormat.TRANSPARENT, PixelFormat.OPAQUE, or PixelFormat.UNKNOWN work.

Android :: subclassed Drawable disables AlphaAnimation


Android :: FindViewById In A Subclassed SurfaceView Throwing RuntimeException

Oct 9, 2010

This code works fine if I move the findViewById call in to the Activity. Any hints as to why it doesn't work from inside the LearningView class? I've tried moving the TextView inside the com.example.LearningView tag but no joy. I'd prefer to get the TextView from within the SurfaceView subclass as I feel it's more logical to treat the TV as a "child" of the SV.

This is a contrived example I wrote to figure out the problem in a larger application, but the gist of it is the same, and the stack trace is basically the same.

For what it is worth, the findViewById call is returning null, which obviously threw NullPointerExceptions in some attempts to fix this.

As you can probably gather from my attempts I'm flying blind on this one.

Learning.java:

CODE:..........

main.xml:

CODE:..............

Stack trace:

CODE:......................

View 1 Replies View Related

Android :: High Density Emulator Use Drawable Mdpi Folder Instead Of Drawable Hdpi

Oct 19, 2010

I am running my application in the emulator using a high density skin (like WVGA800). However the ressources in my application are loaded from the drawable- mdpi folder instead of drawable-hdpi ... what else should I do so that android use the correct folder ?

View 4 Replies View Related

Android :: App That Disables Wifi When Lock Phone

Jul 29, 2010

I did some searching and couldn't find an app like this, figured I'd try here. Anyone know of a app that will disable your wifi when you lock your phone, and enable it when it's unlocked?

View 9 Replies View Related

HTC EVO 4G :: Froyo - Android 2.2 - Update Disables USB Tethering

Aug 3, 2010

Just FYI my co-worker has upgraded his Evo to run Froyo today. The update takes quite a while to execute so be patient, but one thing I noticed was that the USB tethering no longer works. On my phone (still running 2.1) I can plug in the USB cable, enable the 4G radio, and then go to Menu -> Settings -> Wireless & networks and click on the "Internet sharing" option. Once I do this, my computer automatically picks up the new USB device and can use it for internet access (it shows up as "usb0" in my ifconfig on Ubuntu 10.04). Note that this USB tethering ONLY works when the phone has a connection to the 4G network, otherwise tapping the "Internet sharing" option will produce an error 67 message.

I tested on my co-worker's phone after he upgraded to 2.2 and found that:

1) The "Internet sharing" option has been renamed to "USB tethering"
2) Tapping the "USB tethering" option will immediately disconnect your phone from the 4G network. Consequently, this means that you cannot tether.

Anyone else notice this issue after moving to Froyo? I have downloaded the update but I haven't applied it yet (for this and other horror stories I have heard). If you do lose the ability to perform USB tethering after the upgrade, have you been successful with tethering the Evo to a Linux machine? I have tried these two tutorials and been unsuccessful:

Linux + GNU = Humans Enabled: How to Tether your Android to Ubuntu(or Fedora) GNU+Linux for Internet Connectivity

James Titcumb Blog Archive Tethering your HTC Magic Android Phone in Ubuntu 9.04 (Jaunty Jackalope)

View 23 Replies View Related

Android :: App That Disables Letter Pop Up In Stock Keyboard

Feb 28, 2010

i cannot stand those letters popping up. distracting on dro

View 2 Replies View Related

Android :: OnLongClickListener On ChildView Disables OnTouchListener On ParentView

Sep 15, 2010

I have an AbsoluteLayout which has an OnTouchListener. Inside this layout there is a much smaller LinearLayout positioned dynamically. The OnTouchListener works as expected.

Now the problem comes when I add a LongClickListener to my LinearLayout. That disables my OnTouchListener if the touch hits the LinearLayout but it is still triggered, if the LinearLayout was not hit by the touch.

My listeners:

CODE:..............

How can I delegate the touch on the LinearLayout where the OnLongClickListener is registered, to the parent?

View 2 Replies View Related

Android : Any Alternative To Screenmodewidget That Disables Lock Screen

Jan 9, 2010

Droid 2.0.1 screenmodewidget 'awake stay' not working (is supposed to disable lock screen)

mylock also has problems. Anyone (ON DROID!) found an app or widget that disables lock screen that works without problems?

View 3 Replies View Related

Android :: Froyo 2.2 Disables RequestWindowFeature - Window.FEATURE NO TITLE

May 26, 2010

Just trying to get a confirmation, has anyone else found that since updating to 2.2 the following line has no effect: requestWindowFeature(Window.FEATURE_NO_TITLE);. Is there a new permission required?

View 4 Replies View Related

HTC Hero :: Charger Disables The Touch Screen

May 31, 2010

when charging my Hero the touch screen will not work, when not charging it works fine, is this normal.

View 5 Replies View Related

General :: Car Bluetooth Disables Navigation Voice

Jun 9, 2013

I drive a VW Jetta with bluetooth, which has easily paired with my last two phones (Bionic and S4, respectively). While Google map's turn-by-turn map navigation works fine with my phone's bluetooth on, in so far as I can see directions on the map, the navigation voice is disabled. Only when my phone's bluetooth is off do I hear a voice. I'm not sure if this is a function of my phone or my car.

View 1 Replies View Related

HTC Desire :: App That Disables Unlock Screen After I Press Top Power Button?

Apr 19, 2010

is there an app that disables the unlock screen after i press the top power button? (i hate having to currently press the power button and then swipe down every time i want to use the device)

View 21 Replies View Related

HTC Droid Eris :: Otterbox Case Disables Proximity Sensor

Mar 14, 2010

I got an Otterbox (IMPACT) case for my wife's Droid Eris. I have verified that when the case is on, the proximity sensor does not operate at all. Take case off, works fine. Case is on correctly (there's not a whole lot of ways to have it on wrong). Pressing it harder onto my head (which one shouldn't have to do) or holding it farther away don't help, either. Does the other Otterbox case do this?

View 11 Replies View Related

Android :: Res / Drawable / Not In Eclipse?

Aug 25, 2010

I am new application development. I am using Eclipse for making applications. When trying to create new project using Eclipse It is not creating simple res/drawable/ instead its creating three drawable folder. i.e. 1] drawable-hdpi 2] drawable-ldpi, 3]drawable-mdpi What is this all three for? General scenario as per Google it needs res/drawable/ to save icon image. Now on Eclise where to save icons? On all folder or?

View 4 Replies View Related

Android :: Add XML Drawable In Eclipse

Oct 19, 2010

According to official documentation Google says that "Once you've defined your Drawable in XML, save the file in the res/drawable/ directory of your project." is the way to add a XML drawable to the project. But when I created the project ADT created 3 different drawable folders for mdpi, hdpi, and ldpi. So when I wanted to create my XML drawable, I right click on my drawable-hdpi folder and select "Add new Android XML file", and there I have to select what kind of XML file I want to create, but there isn't "drawable" to select. If I create new text file and save it as button_drawable.xml Eclipse says that there is an Error in the file and that It can't build my project.

View 3 Replies View Related

Android :: Set Drawable Without Using Lot Of Images?

Oct 3, 2010

When i have an ImageButton and a drawable and i want to do something like the Drawer or Twitter where when i press the button and the corner of the image is highlighted over the edge, in drawer its yellow, in twitter its white. Like the one below.How do i set my drawable without using a lot of images?

View 1 Replies View Related

Android :: Is This Built In Drawable?

Feb 8, 2010

In this linked image , I see the button on the right quite often in a lot of apps. On my Moto Droid, it is used extensively in the settings app. It is also used as the default AlertDialog icon. Can I use this via a android.r.drawable?

View 2 Replies View Related

Android :: Can I Get ID From Created Drawable

May 26, 2009

I created a new Drawable with: Drawable dx = resources.getDrawable(R.drawable.mydaysminipic_ov); dx.setColorFilter(0xff00ff00, Mode.SRC_ATOP);

and for: updateViews.setImageViewResource(predefinedDraw, --> ID from dx); I need the ID from it... but how to get?

Or any other Idea how to assign my Drawable dx to the above predefinedDraw?

View 2 Replies View Related

Android :: Add TouchListener To Drawable?

Jan 9, 2010

I want to make a Drawable touchable for a component I am creating, does anyone know how to do that? code...

View 2 Replies View Related

Android :: Converting Canvas To Drawable?

Sep 5, 2009

Is it possible to convert a Canvas to Drawable?I may be really off in my solution, so if you have a better suggestion, please do tell me. This is what I'm trying to do.I'm trying to create a custom RadioButton. to set different states of the radio button, I need to use this parameter and one of the parameter to addState is Drawable. I know I can easily provide an image file and use it as a Drawable, but I want to do some image manipulation to the image before using it.There is a tutorial in ApiDemo called AlphaBitmap. It uses the onDraw method of a View to change a PNG file to full red and draw something with a gradient. So I customized it to shade an icon with gradient. So the problem now is that this is a View, and the View works perfectly fine if I add this View to the main view. But i want to convert this View to Drawable so I can use it as one of the parameter in addState. What I really want to achieve is to have different colour shades for different state of the RadioButton without providing different images to do so.

View 6 Replies View Related

Android :: Organizing Res / Drawable Folder

Aug 10, 2010

My app has loads of images in the drawable folder, and I want to organize them into sub folders to make them more manageable. When I create a new folder, and move the images, they are no longer found (and not compiled into the R.java file). Can this be done, or do all my hundreds of images have to sit directly in the drawable folder?

View 9 Replies View Related

Android :: Modify The Drawable Of An ImageView

Oct 25, 2009

I have a gridView generated using BaseAdaptor. (and implementing methods getView() , getCount() ,...) My problem is that i want to specify a drwable image for each ImageView created using BaseAdaptor.

i tried this line: myBaseAdapterInstance.getView(i, null, gridview).setImageDrawable(R.drawable.myimage);

where i is the position of the ImageView that i want.

But myImage isnt displayed on the gridView.

View 2 Replies View Related

Android :: How To Appear Scrollbar Drawable Properly?

Oct 7, 2010

I tried replacing scrollbar image with another drawable,setting scrollbar to a listview,but scrollbar image is appearing very weird,it is stretched vertically. I am setting to list view as android:scrollbarThumbVertical="@drawable/scrollbar" android:scrollbarTrackVertical="@drawable/scrollbar"
Is there any other attribute i need to set to make image appear properly.

View 2 Replies View Related

Android :: Defining Selector Drawable

Feb 14, 2009

I am trying to setup a selector drawable in my asset file like this: * 2 different images for 'on'/'off' mode in rest mode (i.e. it does not has focus) * another 2 different images for 'on'/'off' mode in focus mode (i.e. it has the focus). In my case, the rest mode works, but the 'focus' mode does not. Can you please tell me what am I missing in the focus mode? Code...

View 4 Replies View Related

Android :: Gallery3D Apk Does Not Contain Drawable Hdpi?

Feb 22, 2010

I have built android 2.1 on freescale's i.MX platform. But after running Gallery3D, it will crash with the log of failed to load resource. I found that the whole drawable-hdpi/ (it really contains in the Gallery3D source code res/) is not in the apk package, and cause lack of drawable-hdpi/icon_cancel.png. The apk only contains drawable-mdpi/ and drawable/. My question is why the drawable-hdpi/ resource is dropped when building apk? Per my understanding is that, which drawable-* resource loading is determined on runtime, and all the drawable-* should be in the apk package.

View 7 Replies View Related

Android :: Detecting Which Drawable Folder Was Used

Nov 26, 2009

Is there a way to detect whether a image was pulled from the folder res/drawable or res/drawable-hdpi?I am trying to save space and have a program that is using some hdpi bitmaps and some mdpi bitmaps. When an image is placed in drawable-hdpi it automatically replaces the mdpi version. I need to know when this happens beacuseI am using bitamp.resize() to fix the image sizes.The problem is that the getDensity() method (in the if statment after the && ) returns the screen density and I need the original bitmap density. This allays matched the screenDPI and returns false. I have a lot of artwork and do not want to duplicate everything for every size screen. I am trying to just create hdpi bitmaps for the ones that don't look good when re-sized.

View 2 Replies View Related

Android :: Drawable Folders In Res Folder?

Mar 28, 2010

What is the difference between the three drawable folders in the res folder in the project hierarchy? If I have an image to put into a folder, which folder do I put it in?

View 1 Replies View Related

Android :: Shape Drawable As Background Xml?

Aug 14, 2009

I really appreciate if someone can help me with using how to use shape drawable as my background xml for my view. This is what I tried: But I never get the color. Android always gives me black text on white background, regardless what color attribute I put.

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dip" android:color="#FBBB" />
<solid android:color="#6000"/>
</shape>.............................

View 1 Replies View Related

Android :: Drawable Or Uri For Notification Icon

Mar 25, 2009

The Notification API allows to set a drawable resource id for the icon of a notification. This drawable resource id is used to put the icon in the status bar and in the expanded window shade.This is a limitation if the icon images are to be represented by a Drawable or from a content provider at runtime. I propose that the Notification class adds fields (or methods) that would allow to set a Drawable or an Uri for the notification icon. This Drawable or Uri would then be used by the system notification service to put the icon in the status bar and in the expanded window shade.

View 2 Replies View Related

Android :: Implementing Customized Drawable

Jun 3, 2010

I was trying to get hold of 2D graphics in Android.As a example i want to implement a custom drawable and show it in my Activity But when i run the app i see no rectangle on the activity, can anyone help me out? Where am i going wrong?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved