Skip to content
Commit beda2ddb authored by Jason Monk's avatar Jason Monk
Browse files

Add PluginInflateContainer

PluginInflateContainer extends AutoReinflateContainer, except that
it also uses the plugin interface to allow the view to be swapped
out with something else.

Define an interface or abstract class as follows that includes the
version and action.

public interface MyInterface {
    public static final String ACTION =
            "com.android.systemui.action.PLUGIN_MYINTERFACE";

    public static final int VERSION = 1;

    void myImportantInterface();
}

Then put in a PluginInflateContainer to use and specify the interface
or class that will be implemented as viewType.  The layout specified
will be used by default and whenever a plugin is not present.

<com.android.systemui.PluginInflateContainer
    android:id="@+id/some_id"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout="@layout/my_default_component"
    systemui:viewType="com.android.systemui.plugins.MyInterface" />

Test: Manual
Change-Id: I2ef3fa8dbe344c4635df20056182c1c0b3846fdf
parent f97de8b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment