mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Replace horizontal ScrollViews with tables in the full widgets picker
Test: Run gnl test, AddWidgetTest
Run Robolectric tests for widgets
Manual test video: https://drive.google.com/file/d/1uwCtVNIlC9150kv5eEfILfP5r5M7ARYm/view?usp=sharing
Bug: 179797520
Change-Id: I2f4cdf84338a91b63967879d0c9268c312ace19b
This commit is contained in:
@@ -43,4 +43,20 @@ public class WidgetItem extends ComponentKey {
|
||||
activityInfo = info;
|
||||
spanX = spanY = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} if this {@link WidgetItem} has the same type as the given
|
||||
* {@code otherItem}.
|
||||
*
|
||||
* For example, both items are widgets or both items are shortcuts.
|
||||
*/
|
||||
public boolean hasSameType(WidgetItem otherItem) {
|
||||
if (widgetInfo != null && otherItem.widgetInfo != null) {
|
||||
return true;
|
||||
}
|
||||
if (activityInfo != null && otherItem.activityInfo != null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user