android-custom-view

Android - Is it possible to create a custom library to use across several appilcations?

Is it possible to create a custom library in android (having its own layout resources) for use across several android applications? I created a regular *.jar file but when I tried to create/style my views dynamically most of the properties do not work. Even referencing simple styles from the android.jar file such as android.attr.listSe...

Draw Custom View on specific position of screen - Android

I have a custom component which consists of 2 text view and 4 toggle buttons. I want to draw this view at some specific position on the screen. How is that possible? ...

Android custom view - setting it to take up max space available but no more

I have a custom View class in my app that I'm using in xml layouts. Wherever I'm using this view in my xml, I don't want it to stretch it's container, but I want it to fill out whatever space is available. Here's an example to make it a little clearer. I have a LinearLayout set to horizontal orientation with my custom view followed by...

Scratchable Ticket kind Custom View Item in Android ?

Hi All, I need to develop a Instant Lottery game app. I need an idea/procedure to implement Scratchable custom widget similar to instant Lottery Tickets in Android. The requirement is like, the actual content(secret number) should be covered by some image(which indicates scratch area). When the user touch and scratch the image, the ima...

Making Overlaid image transparent on touch in Android ?

Hi All, I need help on making the touched areas of bitmap image transparent(seems like erasing) while I am moving my finger on that image. I am having a PNG file with Alpha channel in it. I want to turn the touched pixels to transparent so that, the user can feel that he is actually erasing it. For this I am using frame layout to load ...

Android - Customizing the Spinner widget Look and Feel

Hi, Is it possible to change the color of the radio button in the android spinner widget. By default it displays the green color for the radio button I need to change it to some other color, Is it possible Suggestions and guidance are welcome. Thanks Vinayak ...

How do I design a custom Android control and use it in Xml?

I understand how to create a custom Android control, and I believe I understand how to pull attributes for it from the Xml layout. I don't know, however, how to get any children elements from it. Here's a visual example of what I'm trying to accomplish: public class Menu extends LinearLayout { // Custom Code } public class MenuIte...

SurfaceView vs Custom View (extended from View). SurfaceView is slower, Why?

I wrote the same program two ways. One using a Surfaceview, and the other using a custom view. According to the android SDK development guide, using a surface view is better because you can spawn a separate thread to handle graphics. Th SDK development guide claims that using a custom view with invalidate calls is only good for slower a...