安卓教程上的自定义视图创建自定义、视图、教程

2023-09-05 05:47:26 作者:劳资就不淑女范儿

任何人都可以提出有关如何创建自定义视图一个很好的教程?

Can anyone suggest a good tutorial about how to create custom view?

推荐答案

我问自己同样的问题。做一个搜索在谷歌,我发现了一些好消息。首先,你应该通过阅读由谷歌Android psented文件$ P $开始的:

I was asking myself the same question. Doing a searches on Google, I found some good info. First of all you should start by reading the documentation presented by Google Android:

http://developer.android.com/guide/topics/ui/custom-components.html

在此之后,该扩展视图的一般教程 android.view.View 类,这似乎是很好的例子:

After that, for general tutorials of a view that extends the android.view.View class, these seem to be good examples:

http://www.androidcompetencycenter.com/2009/08/creatingcustomviews/ http://www.skill-guru.com/blog/2011/01/20/creating-a-custom-widgets-in-android/ http://www.androidcompetencycenter.com/2009/08/creatingcustomviews/ http://www.skill-guru.com/blog/2011/01/20/creating-a-custom-widgets-in-android/

至于使用 android.view.ViewGroup ,似乎有已经一些关于这个问题的帖子:

As for using the android.view.ViewGroup, there seems to be already some posts on the subject:

如何使用的ViewGroup Android中 定制的ViewGroup的例子吗? Can谁能给一个自定义的ViewGroup包含与测量和布局实例自定义视图的一个很好的例子吗? (在Java) How to use viewGroup in android custom viewgroup example please? Can anyone give a good example of a Custom ViewGroup containing a Custom View with measure and layout examples? (In Java)