I am running the HelloGallery example for Android (using the XML layout file below), and I am now wondering how I would use it in my app.
It is referred to as a “layout widget”. Is this different than an “app widget”?
I am having trouble finding resources for adding this to my app, since when I search for “layout widget” I get references to widgets that float around on the home screen, and not using them within apps.
How would this be done?
<?xml version="1.0" encoding="utf-8"?>
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
A layout widget would be some custom view that is part of your layout for an activity in an application. An App widget is exactly what you stated, as “widgets that float around on the home screen”. They are an external interface to your application, and here’s a tutorial link for you on them. http://developer.android.com/guide/topics/appwidgets/index.html