Skip to content

Commit

Permalink
Add search and toolbar layouts to the canonical layout showcase activ…
Browse files Browse the repository at this point in the history
…ity.
  • Loading branch information
shamalip committed Dec 2, 2024
1 parent 154c03f commit 25b25cf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ import com.example.platform.ui.appwidgets.glance.layout.collections.ImageGridApp
import com.example.platform.ui.appwidgets.glance.layout.collections.ImageTextListAppWidgetReceiver
import com.example.platform.ui.appwidgets.glance.layout.text.LongTextAppWidgetReceiver
import com.example.platform.ui.appwidgets.glance.layout.text.TextWithImageAppWidgetReceiver
import com.example.platform.ui.appwidgets.glance.layout.toolbars.SearchToolBarAppWidgetReceiver
import com.example.platform.ui.appwidgets.glance.layout.toolbars.ToolBarAppWidgetReceiver
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch

Expand Down Expand Up @@ -290,4 +292,16 @@ private val canonicalLayoutWidgets = listOf(
imageRes = R.drawable.cl_activity_row_image_grid,
receiver = ImageGridAppWidgetReceiver::class.java,
),
CanonicalLayoutRowData(
rowTitle = R.string.cl_title_toolbar,
rowDescription = R.string.cl_description_toolbar,
imageRes = R.drawable.cl_activity_row_toolbar,
receiver = ToolBarAppWidgetReceiver::class.java,
),
CanonicalLayoutRowData(
rowTitle = R.string.cl_title_search_toolbar,
rowDescription = R.string.cl_description_search_toolbar,
imageRes = R.drawable.cl_activity_row_search_toolbar,
receiver = SearchToolBarAppWidgetReceiver::class.java,
),
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,9 @@
<string name="cl_description_long_text">Ideal for titles, status updates, short descriptions, or any scenario where a single line of text effectively conveys the message.</string>
<string name="cl_title_checklist">Checklist</string>
<string name="cl_description_checklist">The checklist layout is perfect for displaying tasks, providing clear tap targets for users to easily mark items as done.</string>
<string name="cl_title_toolbar">Toolbar</string>
<string name="cl_description_toolbar">Increase user engagement and streamline key workflows by providing instant access to your app\'s most important features with a toolbar widget.</string>
<string name="cl_title_search_toolbar">Search Toolbar</string>
<string name="cl_description_search_toolbar">Ideal for apps where search is paramount, this layout provides a dedicated search entry point while allowing for additional shortcuts based on available widget space.</string>

</resources>

0 comments on commit 25b25cf

Please sign in to comment.