How to add button to MediaController?

by stef » Wed, 24 Sep 2008 08:25:41 GMT

Sponsored Links
 Hi, been trying to modify the MediaController widget to add a few
custom buttons.
I have tried to subclass it and add buttons to the linearlayout before
te rewind and after tge fast forward with no success... is this even

I can always create my own MediaController class but that seems to be
a waste...



How to add button to MediaController?

by Jeff Hamilton » Wed, 24 Sep 2008 08:47:18 GMT

 This isn't possible in 1.0.



Sponsored Links

How to add button to MediaController?

by Matteo Crippa » Wed, 24 Sep 2008 17:29:20 GMT

 MediaController seems to work only with VideoView atm.


How to add button to MediaController?

by Timmah » Sat, 01 Nov 2008 01:07:58 GMT

 Have you tried overriding makeControllerView() method ? This is the
method returns a view where you could try to create your own buttons


Other Threads

1. Keyboard.Key android:iconPreview attribute doesn't work

I'm trying to change the default key preview used by the keyboard, and
it seems to does not work: the key preview never changes from the
default one.

I'm trying to use a drawable (png file) for that as below:

<Key android:codes="49" android:keyLabel="1"
android:horizontalGap="1%"android:iconPreview="@drawable/my_preview" /

I'm adding the iconPreview to several keys, but none of them worked.

Have anyone used this? How did you use it?  Any help are appreciated.



2. Loading and displaying an image from a resource

Currently I'm successfully loading and displaying an image from a
webserver using the code below.

URL imgURL = new URL("");
URLConnection conn = aURL.openConnection();
InputStream is = conn.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
bm= BitmapFactory.decodeStream(bis);

canvas.drawBitmap(bm, 0, 0, null);

What I want to do is load it from a resource.  I've put myimage.png
into res/drawable and referenced the bitmap as follows :-

Bitmap bm = BitmapFactory.decodeResource(getResources(),

However when I try to display it with canvas.drawBitmap(bm, 0, 0,
null); I get a Force Close.

What am I missing?



3. Is possible to determine which service providers available ?

4. uploading image + optional tags via HTTP POST

5. Removing BC from Android

6. Multiple bluetooth device support

7. Book the mailing lists