当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Is it possible to make a home-screen widget that contains a SeekBar?

问题描述:

A bit new to Android. I am trying to create a home-screen widget that lets you change ringtone or music volume, using the SeekBar View.

I was reading on widgets in http://developer.android.com/guide/topics/appwidgets/index.html, and was surprised to come across a section, "Creating the App Widget Layout," that says only certain classes can be handled by a RemoteViews object, and thus only these can be used in a home-screen widget. The ProgressBar class is supported, but the documentation explicitly says descendant classes are not supported.

Since I am trying to create a SeekBar in my widget, which is a descendant of ProgressBar, is this impossible via RemoteViews? If so, is there another method to create widgets which does not rely on RemoteViews? Thanks in advance for any help.

网友答案:

Since I am trying to create a SeekBar in my widget, which is a descendant of ProgressBar, is this impossible via RemoteViews?

Correct.

If so, is there another method to create widgets which does not rely on RemoteViews?

No. You can write your own home screen app, though, and there you can use whatever you want on the home screen, since it is your own app.

分享给朋友:
您可能感兴趣的文章:
随机阅读: