Latest Android Studio will create & integrate a Basic Widget to your Application in 2 steps.
.
It will show a Screen like below & fill the fields
Its Done.
It will create & integrate a basic HelloWorld Widget(Including Layout File , Meta Data File , Declaration in Manifest File etc.) to your Application.