3

I'm looking for a simple and stable way to change the images of the MediaController control. My research is so far that I looked at the source codes of the MediaController and its layout file and also a copy of com.android.internal.R for figgering out the correct ids. But I'm not sure if this is a good way to use the fixed ids form that page. I'm not sure if the I should use the ids, because they may change thrue the differnt SDK versions. The ids can change isn't it?

So far I thought to use another solution where I walk down the elements of the MediaController like explained in this answer. This may work but could make trouble if the control is changed in future releases or is this save to use?

My newest idea is to uses Themes, but I'm not sure if it is simple to replace the style because the controls uses style="@android:style/MediaButton.Xxx" which is another namespace/package. So is theming an option to change the layout?

Community
  • 1
  • 1
rekire
  • 47,260
  • 30
  • 167
  • 264
  • I think,yes changing theme would be an option of what you want.. – ridoy Dec 28 '12 at 07:49
  • Could you add a small example for one button? I'm not sure if I understood the structure corectly. – rekire Dec 28 '12 at 07:56
  • See..http://groups.google.com/group/android-developers/browse_thread/thread/e2be250424fad51f http://stackoverflow.com/questions/1759862/how-can-i-get-an-android-mediacontroller-to-appear-from-layout-xml http://stackoverflow.com/questions/2044000/change-style-of-android-mediacontroller – ridoy Dec 28 '12 at 17:40
  • Here is an example MediaController customization: http://stackoverflow.com/questions/12482203/how-to-create-custom-ui-for-android-mediacontroller/14323144#14323144 – Blago Jan 14 '13 at 17:12
  • I'll have a look to that tomorrow right now I'm a little sceptic how you override the images dynamically. That was my main problem. – rekire Jan 14 '13 at 18:27

0 Answers0