如何为在xml中扩展View的类设置路径? Android的工作室

我找到了以下课程https://android.googlesource.com/device/google/accessory/demokit/+/4de77996b19a3851675080072f029b0c7d0865ff/app/src/com/google/android/DemoKit/ColorWheel.java ,但我真的不知道如何显示它。 我对android很新,直到现在我还没有使用过这样的东西。 你能告诉我如何在活动中展示该课程吗?

当我这样做

 android:id="@+id/view" android:layout_width="fill_parent" android:layout_height="wrap_content"  

您需要在布局xml中使用自定义视图的完全限定路径。

所以这:

  

而不仅仅是这个:

  

请注意,您需要修改程序包以匹配项目中存在类的位置,即com.google.android.DemoKit需要更改为此View子类所在的任何package