Android - custom layout for android widget

552 Views Asked by At

I want to customize the standard MediaController layout that comes with android, the way i think to do this is to make a custom MediaController layout and overwrite it in some kind of way so that Android uses my layout instead of the layout that it uses normally

Is there any way you can help me achieve my goal?

2

There are 2 best solutions below

0
On
  1. create a class extend ViewGroup

  2. Override onMeasure() to measure this view and its child view.

  3. Override onLayout() to layout your child view.

0
On

here's a sample code of how to create your own customized layout :

it's very similar to the wrapPanel of WPF/silverlight .