SlideShare a Scribd company logo
Khrisna Indrawan Eka Putra
Google Associate Android Developer, Code Reviewer Dicoding
Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi Androidmu
1. Information Widgets
2. Collection Widgets
3. Control Widgets
4. Hybrid Widgets
https://developer.android.com/guide/topics/appwidgets/overview
Information widgets typically display a few
crucial information elements that are
important to a user and track how that
information changes over time.
Example
- Weather widgets
- Clock widgets
- Sports score trackers.
https://developer.android.com/guide/topics/appwidgets/overview
Collection widgets specialize in displaying
multitude elements of the same type, such as a
collection of pictures from a gallery app, a
collection of articles from a news app or a
collection of emails/messages from a
communication app.
Focus :
- Browsing the collection
- View more detail information
Collection widgets can scroll vertically.
https://developer.android.com/guide/topics/appwidgets/overview
The main purpose of a control widget is to display
often used functions that the user can trigger right
from the home screen without having to open the app
first. Think of them as remote controls for an app. A
typical example of control widgets are music app
widgets that allow the user to play, pause or skip
music tracks from outside the actual music app.
Interacting with control widgets may or may not
progress to an associated detail view depending on if
the control widget's function generated a data set,
such as in the case of a search widget.
https://developer.android.com/guide/topics/appwidgets/overview
While all widgets tend to gravitate towards one of the
three types described above, many widgets in reality
are hybrids that combine elements of different types.
For the purpose of your widget planning, center your
widget around one of the base types and add
elements of other types if needed.
A music player widget is primarily a control widget,
but also keeps the user informed about what track is
currently playing. It essentially combines a control
widget with elements of an information widget type.
https://developer.android.com/guide/topics/appwidgets/overview
1. Gestures
Because widgets live on the home screen, they have to co-exist with the navigation
that is established there.
The only gestures available for widgets are:
- Touch
- Vertical swipe
2. Elements
Given the above interaction limitations, some of the UI building blocks that rely on
restricted gestures are not available for widgets.
https://developer.android.com/guide/topics/appwidgets/overview
1. Content
2. Navigation
3. Resizing
4. Layout Considerations
5. Configuration
https://developer.android.com/guide/topics/appwidgets/overview
Widgets should consolidate and
concentrate an app's information and
then provide a connection to richer
detail within the app.
Always make sure that your app shows
more detail about an information item
than what the widget already displays.
https://developer.android.com/guide/topics/appwidgets/overview
Besides the pure information content, you should also consider to round out your
widget's offering by providing navigation links to frequently used areas of your
app.
Good candidates for navigation links to surface on widgets are:
- Generative functions.
- Open application at top level
https://developer.android.com/guide/topics/appwidgets/overview
Resizing allows users to adjust the height and/or the
width of a widget within the constraints of the home
panel placement grid.
Allowing users to resize widgets has important
benefits:
- They can fine-tune how much information they
want to see on each widget.
- They can better influence the layout of widgets
and shortcuts on their home panels.
https://developer.android.com/guide/topics/appwidgets/overview
https://developer.android.com/guide/topics/appwidgets/overview
Information widgets on the other hand require a bit more hands-on planning, since they are
not scrollable and all content has to fit within a given size. You will have to dynamically
adjust your widget's content and layout to the size the user defined through the resize
operation.
It will be tempting to layout your widgets according to the dimensions of the
placement grid of a particular device that you own and develop with. This can be
a useful initial approximation as you layout your widget, but keep the following in
mind:
- The number, size and spacing of cells can vary widely from device to device.
- In fact, as the user resizes a widget, the system will respond with a dp size
range in which your widget can redraw itself.
https://developer.android.com/guide/topics/appwidgets/overview
Sometimes widgets need to be setup before they can become useful. Think of
an email widget for example, where you need to provide an account before
the inbox can be displayed. Or a static photo widget where the user has to
assign the picture that is to be displayed from the gallery.
Keep the widget configuration light and don't present more than 2-3
configuration elements.
https://developer.android.com/guide/topics/appwidgets/overview
1. Focus on small portions of glanceable information on your widget. Expand on
the information in your app.
2. Choose the right widget type for your purpose.
3. For resizable widgets, plan how the content for your widget should adapt to
different sizes.
4. Make your widget orientation and device independent by ensuring that the
layout is capable of stretching and contracting.
https://developer.android.com/guide/topics/appwidgets/overview
Contact:
khrisna@dicoding.com
Follow us: @dicoding

More Related Content

PDF
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
PDF
Android Jetpack
PPTX
07.4. Android Basic Simple Browser (WebView)
PPSX
Android architecture components
PPTX
Android Training For Beginner @DILO Bandung
PPTX
06. Android Basic Widget and Container
PPTX
11.1 Android with HTML
PPT
Android application development for TresmaxAsia
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
Android Jetpack
07.4. Android Basic Simple Browser (WebView)
Android architecture components
Android Training For Beginner @DILO Bandung
06. Android Basic Widget and Container
11.1 Android with HTML
Android application development for TresmaxAsia

What's hot (20)

PPTX
Introduction to AngularJS Framework
PPTX
What's new in android jakarta gdg (2015-08-26)
PDF
Recap of Android Dev Summit 2018
PDF
Liferay UG Meetup #8 - Portal 7.3 + portlets com nodeJS - 2020-03-04
PDF
Five android architecture
PPTX
I/O Rewind 215: What's new in Android
PDF
AngularJS : Superheroic JavaScript MVW Framework
PPTX
Android application development the basics (2)
PDF
Angular JS - Develop Responsive Single Page Application
PPT
IntroToAndroid
PPT
Angular Seminar-js
PPTX
Top 15 most popular drupal 8 modules
PDF
Starting an AngularJS Project with Visual Studio
PPTX
Android Widget
PDF
01 11 - graphical user interface - fonts-web-tab
PPTX
Live Demo : Trending Angular JS Featues
PPTX
Model viewviewmodel2
PPT
Android
PDF
04 user interfaces
Introduction to AngularJS Framework
What's new in android jakarta gdg (2015-08-26)
Recap of Android Dev Summit 2018
Liferay UG Meetup #8 - Portal 7.3 + portlets com nodeJS - 2020-03-04
Five android architecture
I/O Rewind 215: What's new in Android
AngularJS : Superheroic JavaScript MVW Framework
Android application development the basics (2)
Angular JS - Develop Responsive Single Page Application
IntroToAndroid
Angular Seminar-js
Top 15 most popular drupal 8 modules
Starting an AngularJS Project with Visual Studio
Android Widget
01 11 - graphical user interface - fonts-web-tab
Live Demo : Trending Angular JS Featues
Model viewviewmodel2
Android
04 user interfaces
Ad

Similar to Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi Androidmu (20)

PPTX
Notes Unit3.pptx
PDF
Android Application Development - Level 1
PPTX
App widget
PDF
Introduction to Andriod Studio Lecture note: Android Development Lecture 1.pdf
PPTX
MAD_UNIT-3.pptx mobile application development
PPTX
Android Homescreen Widgets Demystified
PPTX
行動App開發管理實務 unit2
PDF
2012/02/15 Android 4.0 UI Design Tips@happy designer meetup
PDF
Test Bank for Java How to Program Late Objects 10th Edition Deitel 0132575655...
PPTX
Mobile Application Development
PDF
Cdc widgets
PDF
ODP
Nativa Android Applications development
PPTX
Mobile Application Development class 003
PPTX
Android Development : (Android Studio, PHP, XML, MySQL)
PDF
Embedded Systems.pdf
PDF
Android 4.0 UI Design Tips
PPTX
Android Wearable App Development - 1
DOC
Future fashion report
Notes Unit3.pptx
Android Application Development - Level 1
App widget
Introduction to Andriod Studio Lecture note: Android Development Lecture 1.pdf
MAD_UNIT-3.pptx mobile application development
Android Homescreen Widgets Demystified
行動App開發管理實務 unit2
2012/02/15 Android 4.0 UI Design Tips@happy designer meetup
Test Bank for Java How to Program Late Objects 10th Edition Deitel 0132575655...
Mobile Application Development
Cdc widgets
Nativa Android Applications development
Mobile Application Development class 003
Android Development : (Android Studio, PHP, XML, MySQL)
Embedded Systems.pdf
Android 4.0 UI Design Tips
Android Wearable App Development - 1
Future fashion report
Ad

More from DicodingEvent (20)

PDF
Developer Coaching #114.pdf
PDF
Ask Us Anything about Studi Independen Bersertifikat Kampus Merdeka X Dicodin...
PPTX
tantangan menjadi developer di abad 21
PDF
Mengenalkan augmented reality (ar) pada snapchat
PDF
Membangun Aplikasi Serverless di Platfrom AWS
PDF
IDCamp X Madrasah: Pengenalan Computational Thinking
PDF
Membuat Produk Digital Terbaik ala Startup Unicorn
PDF
TechTalk 2021: Peran IT Security dalam Penerapan DevOps
PDF
TechTalk 2021: Peningkatan Performa Software Delivery dengan CI/CD
PDF
Membuat Solusi Bermanfaat dengan Programming - Nur Rohman
PDF
Potensi karier menjadi ios developer di masa depan
PDF
Id camp x dicoding live : persiapan jadi software engineer hebat 101
PDF
Tips sukses berkarir sebagai developer dan programmer 2021
PPTX
Teknologi Baru Android di Google I/O 2021 - Andrew Kurniadi
PDF
Dicoding Developer Coaching #38: Android | 5 Library Android yang Patut Kamu ...
PDF
Dicoding Developer Coaching #37: Android | Kesalahan yang Sering Terjadi pada...
PDF
Pengantar Cloud Computing dengan AWS - Petra Novandi Barus
PDF
Dicoding Developer Coaching #36: Android | Pentingnya Performa pada Aplikasi ...
PDF
Dicoding Developer Coaching #35: Android | Setup Continuous Integration di An...
PDF
Dicoding Developer Coaching #33: Android | Depedency Injection dengan Dagger,...
Developer Coaching #114.pdf
Ask Us Anything about Studi Independen Bersertifikat Kampus Merdeka X Dicodin...
tantangan menjadi developer di abad 21
Mengenalkan augmented reality (ar) pada snapchat
Membangun Aplikasi Serverless di Platfrom AWS
IDCamp X Madrasah: Pengenalan Computational Thinking
Membuat Produk Digital Terbaik ala Startup Unicorn
TechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peningkatan Performa Software Delivery dengan CI/CD
Membuat Solusi Bermanfaat dengan Programming - Nur Rohman
Potensi karier menjadi ios developer di masa depan
Id camp x dicoding live : persiapan jadi software engineer hebat 101
Tips sukses berkarir sebagai developer dan programmer 2021
Teknologi Baru Android di Google I/O 2021 - Andrew Kurniadi
Dicoding Developer Coaching #38: Android | 5 Library Android yang Patut Kamu ...
Dicoding Developer Coaching #37: Android | Kesalahan yang Sering Terjadi pada...
Pengantar Cloud Computing dengan AWS - Petra Novandi Barus
Dicoding Developer Coaching #36: Android | Pentingnya Performa pada Aplikasi ...
Dicoding Developer Coaching #35: Android | Setup Continuous Integration di An...
Dicoding Developer Coaching #33: Android | Depedency Injection dengan Dagger,...

Recently uploaded (20)

PPTX
Relationship Management Presentation In Banking.pptx
PPTX
Intro to ISO 9001 2015.pptx wareness raising
PPTX
Hydrogel Based delivery Cancer Treatment
PDF
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
PPTX
Human Mind & its character Characteristics
PPTX
PHIL.-ASTRONOMY-AND-NAVIGATION of ..pptx
PPTX
BIOLOGY TISSUE PPT CLASS 9 PROJECT PUBLIC
PPTX
2025-08-10 Joseph 02 (shared slides).pptx
PPTX
chapter8-180915055454bycuufucdghrwtrt.pptx
PPTX
The Effect of Human Resource Management Practice on Organizational Performanc...
PPTX
fundraisepro pitch deck elegant and modern
PPTX
Introduction to Effective Communication.pptx
PDF
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
PPTX
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
PPTX
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
PPT
First Aid Training Presentation Slides.ppt
PPTX
nose tajweed for the arabic alphabets for the responsive
PPTX
Primary and secondary sources, and history
PPT
The Effect of Human Resource Management Practice on Organizational Performanc...
Relationship Management Presentation In Banking.pptx
Intro to ISO 9001 2015.pptx wareness raising
Hydrogel Based delivery Cancer Treatment
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
Human Mind & its character Characteristics
PHIL.-ASTRONOMY-AND-NAVIGATION of ..pptx
BIOLOGY TISSUE PPT CLASS 9 PROJECT PUBLIC
2025-08-10 Joseph 02 (shared slides).pptx
chapter8-180915055454bycuufucdghrwtrt.pptx
The Effect of Human Resource Management Practice on Organizational Performanc...
fundraisepro pitch deck elegant and modern
Introduction to Effective Communication.pptx
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
First Aid Training Presentation Slides.ppt
nose tajweed for the arabic alphabets for the responsive
Primary and secondary sources, and history
The Effect of Human Resource Management Practice on Organizational Performanc...

Dicoding Developer Coaching #21: Android | Cara Membuat Widget di Aplikasi Androidmu

  • 1. Khrisna Indrawan Eka Putra Google Associate Android Developer, Code Reviewer Dicoding
  • 3. 1. Information Widgets 2. Collection Widgets 3. Control Widgets 4. Hybrid Widgets https://developer.android.com/guide/topics/appwidgets/overview
  • 4. Information widgets typically display a few crucial information elements that are important to a user and track how that information changes over time. Example - Weather widgets - Clock widgets - Sports score trackers. https://developer.android.com/guide/topics/appwidgets/overview
  • 5. Collection widgets specialize in displaying multitude elements of the same type, such as a collection of pictures from a gallery app, a collection of articles from a news app or a collection of emails/messages from a communication app. Focus : - Browsing the collection - View more detail information Collection widgets can scroll vertically. https://developer.android.com/guide/topics/appwidgets/overview
  • 6. The main purpose of a control widget is to display often used functions that the user can trigger right from the home screen without having to open the app first. Think of them as remote controls for an app. A typical example of control widgets are music app widgets that allow the user to play, pause or skip music tracks from outside the actual music app. Interacting with control widgets may or may not progress to an associated detail view depending on if the control widget's function generated a data set, such as in the case of a search widget. https://developer.android.com/guide/topics/appwidgets/overview
  • 7. While all widgets tend to gravitate towards one of the three types described above, many widgets in reality are hybrids that combine elements of different types. For the purpose of your widget planning, center your widget around one of the base types and add elements of other types if needed. A music player widget is primarily a control widget, but also keeps the user informed about what track is currently playing. It essentially combines a control widget with elements of an information widget type. https://developer.android.com/guide/topics/appwidgets/overview
  • 8. 1. Gestures Because widgets live on the home screen, they have to co-exist with the navigation that is established there. The only gestures available for widgets are: - Touch - Vertical swipe 2. Elements Given the above interaction limitations, some of the UI building blocks that rely on restricted gestures are not available for widgets. https://developer.android.com/guide/topics/appwidgets/overview
  • 9. 1. Content 2. Navigation 3. Resizing 4. Layout Considerations 5. Configuration https://developer.android.com/guide/topics/appwidgets/overview
  • 10. Widgets should consolidate and concentrate an app's information and then provide a connection to richer detail within the app. Always make sure that your app shows more detail about an information item than what the widget already displays. https://developer.android.com/guide/topics/appwidgets/overview
  • 11. Besides the pure information content, you should also consider to round out your widget's offering by providing navigation links to frequently used areas of your app. Good candidates for navigation links to surface on widgets are: - Generative functions. - Open application at top level https://developer.android.com/guide/topics/appwidgets/overview
  • 12. Resizing allows users to adjust the height and/or the width of a widget within the constraints of the home panel placement grid. Allowing users to resize widgets has important benefits: - They can fine-tune how much information they want to see on each widget. - They can better influence the layout of widgets and shortcuts on their home panels. https://developer.android.com/guide/topics/appwidgets/overview
  • 13. https://developer.android.com/guide/topics/appwidgets/overview Information widgets on the other hand require a bit more hands-on planning, since they are not scrollable and all content has to fit within a given size. You will have to dynamically adjust your widget's content and layout to the size the user defined through the resize operation.
  • 14. It will be tempting to layout your widgets according to the dimensions of the placement grid of a particular device that you own and develop with. This can be a useful initial approximation as you layout your widget, but keep the following in mind: - The number, size and spacing of cells can vary widely from device to device. - In fact, as the user resizes a widget, the system will respond with a dp size range in which your widget can redraw itself. https://developer.android.com/guide/topics/appwidgets/overview
  • 15. Sometimes widgets need to be setup before they can become useful. Think of an email widget for example, where you need to provide an account before the inbox can be displayed. Or a static photo widget where the user has to assign the picture that is to be displayed from the gallery. Keep the widget configuration light and don't present more than 2-3 configuration elements. https://developer.android.com/guide/topics/appwidgets/overview
  • 16. 1. Focus on small portions of glanceable information on your widget. Expand on the information in your app. 2. Choose the right widget type for your purpose. 3. For resizable widgets, plan how the content for your widget should adapt to different sizes. 4. Make your widget orientation and device independent by ensuring that the layout is capable of stretching and contracting. https://developer.android.com/guide/topics/appwidgets/overview