如何在Android中创建自定义控件?

时间:2022-09-25 18:44:20

I would like to create a custom control in my Android App. It will be a circular control with some smaller moveable circles that will indicate a specific value.

我想在我的Android应用程序中创建一个自定义控件。它将是一个圆形控件,带有一些较小的可移动圆圈,表示特定值。

Is there a way to realize this?

有没有办法实现这一点?

Are there at least some nice tutorials where I can read how to create a custom control?

是否至少有一些很好的教程,我可以阅读如何创建自定义控件?

1 个解决方案

#1


Have a look at the custom components section of the Android Dev Guide. The usual approach is to extend a View and override applicable methods.

请查看Android Dev Guide的自定义组件部分。通常的方法是扩展View并覆盖适用的方法。

#1


Have a look at the custom components section of the Android Dev Guide. The usual approach is to extend a View and override applicable methods.

请查看Android Dev Guide的自定义组件部分。通常的方法是扩展View并覆盖适用的方法。