The widget package contains (mostly visual) UI elements to use on your Application screen. You can design your own

To create your own widget, extend {@link android.view.View} or a subclass. To use your widget in layout XML, there are two additional files for you to create. Here is a list of files you'll need to create to implement a custom widget:

ApiDemos sample application has an example of creating a custom layout XML tag, LabelView. See the following files that demonstrate implementing and using a custom widget: