From 73ec048e4de50419d2d49907be0acae0893f92ca Mon Sep 17 00:00:00 2001 From: Katie McCormick Date: Mon, 27 Aug 2012 15:43:21 -0700 Subject: Doc update: Appwidgets JB additions. --- docs/html/guide/topics/appwidgets/index.jd | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'docs/html/guide/topics/appwidgets') diff --git a/docs/html/guide/topics/appwidgets/index.jd b/docs/html/guide/topics/appwidgets/index.jd index a46f9a7..5a4e03a 100644 --- a/docs/html/guide/topics/appwidgets/index.jd +++ b/docs/html/guide/topics/appwidgets/index.jd @@ -307,6 +307,7 @@ following layout classes:

  • {@link android.widget.FrameLayout}
  • {@link android.widget.LinearLayout}
  • {@link android.widget.RelativeLayout}
  • +
  • {@link android.widget.GridLayout}
  • And the following widget classes:

    @@ -327,6 +328,9 @@ following layout classes:

    Descendants of these classes are not supported.

    +

    RemoteViews also supports {@link android.view.ViewStub}, which is an invisible, zero-sized View you can use +to lazily inflate layout resources at runtime.

    +

    Adding margins to App Widgets

    @@ -410,6 +414,25 @@ App Widget, done. (See Creating an App Widget Configuration Activity below.) + +
    + {@link android.appwidget.AppWidgetProvider#onAppWidgetOptionsChanged onAppWidgetOptionsChanged()} +
    +
    +This is called when the widget is first placed and any time the widget is resized. You can use this callback to show or hide content based on the widget's size ranges. You get the size ranges by calling {@link android.appwidget.AppWidgetManager#getAppWidgetOptions getAppWidgetOptions()}, which returns a {@link android.os.Bundle} that includes the following:

    + + +This callback was introduced in API Level 16 (Android 4.1). If you implement this callback, make sure that your app doesn't depend on it since it won't be called on older devices. +
    {@link android.appwidget.AppWidgetProvider#onDeleted(Context,int[])}
    This is called every time an App Widget is deleted from the App Widget host.
    @@ -533,12 +556,13 @@ you would like to receive the App Widget broadcasts directly, you can implement your own {@link android.content.BroadcastReceiver} or override the {@link android.appwidget.AppWidgetProvider#onReceive(Context,Intent)} callback. -The four Intents you need to care about are:

    +The Intents you need to care about are as follows:

    -- cgit v1.1