Loading src/com/android/launcher3/widget/picker/WidgetsFullSheet.java +13 −0 Original line number Diff line number Diff line Loading @@ -891,6 +891,19 @@ public class WidgetsFullSheet extends BaseWidgetSheet return false; } /** Gets the sheet for widget picker, which is used for testing. */ @VisibleForTesting public View getSheet() { return mContent; } /** Opens the first header in widget picker and scrolls to the top of the RecyclerView. */ @VisibleForTesting public void openFirstHeader() { mAdapters.get(AdapterHolder.PRIMARY).mWidgetsListAdapter.selectFirstHeaderEntry(); mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView.scrollToTop(); } /** A holder class for holding adapters & their corresponding recycler view. */ final class AdapterHolder { static final int PRIMARY = 0; Loading tests/AndroidManifest-common.xml +11 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,17 @@ android:resource="@xml/appwidget_no_config"/> </receiver> <receiver android:name="com.android.launcher3.testcomponent.AppWidgetNoConfigLarge" android:exported="true" android:label="No Config Large"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_no_config_large"/> </receiver> <receiver android:name="com.android.launcher3.testcomponent.AppWdigetHidden" android:exported="true" Loading tests/res/xml/appwidget_no_config_large.xml 0 → 100644 +15 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="1dp" android:minHeight="1dp" android:minResizeWidth="1dp" android:maxResizeWidth="3000dp" android:targetCellHeight="1" android:targetCellWidth="5" android:updatePeriodMillis="86400000" android:initialLayout="@layout/test_layout_appwidget_red" android:previewLayout="@layout/test_layout_appwidget_red" android:resizeMode="horizontal|vertical" android:widgetCategory="home_screen"> </appwidget-provider> No newline at end of file Loading
src/com/android/launcher3/widget/picker/WidgetsFullSheet.java +13 −0 Original line number Diff line number Diff line Loading @@ -891,6 +891,19 @@ public class WidgetsFullSheet extends BaseWidgetSheet return false; } /** Gets the sheet for widget picker, which is used for testing. */ @VisibleForTesting public View getSheet() { return mContent; } /** Opens the first header in widget picker and scrolls to the top of the RecyclerView. */ @VisibleForTesting public void openFirstHeader() { mAdapters.get(AdapterHolder.PRIMARY).mWidgetsListAdapter.selectFirstHeaderEntry(); mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView.scrollToTop(); } /** A holder class for holding adapters & their corresponding recycler view. */ final class AdapterHolder { static final int PRIMARY = 0; Loading
tests/AndroidManifest-common.xml +11 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,17 @@ android:resource="@xml/appwidget_no_config"/> </receiver> <receiver android:name="com.android.launcher3.testcomponent.AppWidgetNoConfigLarge" android:exported="true" android:label="No Config Large"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_no_config_large"/> </receiver> <receiver android:name="com.android.launcher3.testcomponent.AppWdigetHidden" android:exported="true" Loading
tests/res/xml/appwidget_no_config_large.xml 0 → 100644 +15 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="1dp" android:minHeight="1dp" android:minResizeWidth="1dp" android:maxResizeWidth="3000dp" android:targetCellHeight="1" android:targetCellWidth="5" android:updatePeriodMillis="86400000" android:initialLayout="@layout/test_layout_appwidget_red" android:previewLayout="@layout/test_layout_appwidget_red" android:resizeMode="horizontal|vertical" android:widgetCategory="home_screen"> </appwidget-provider> No newline at end of file