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
Loading
Please register or sign in to comment