Last active
July 24, 2023 16:48
-
-
Save NedaTop/db2594d528e6093d6dd55b0907e563ce to your computer and use it in GitHub Desktop.
Revisions
-
NedaTop renamed this gist
Jul 24, 2023 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ Note: There is a [script](https://gist.github.com/NedaTop/5c3b72cda4c6450df3670eb6300db4e4) available that does this for you! To manually change imports in order to migrate from Tiles to ProtoLayout, follow: 1. Replace all `androidx.wear.tiles.material` imports with the `androidx.wear.protolayout.material` (this includes .layouts library too) 2. Replace all other `androidx.wear.tiles` imports with the `androidx.wear.protolayout` a. Imports for `androidx.wear.tiles.EventBuilders`,` androidx.wear.tiles.RequestBuilders`, `androidx.wear.tiles.TileBuilders`, `androidx.wear.tiles.TileService` should stay the same -
NedaTop created this gist
Jul 24, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ 1. Replace all `androidx.wear.tiles.material` imports with the `androidx.wear.protolayout.material` (this includes .layouts library too) 2. Replace all other `androidx.wear.tiles` imports with the `androidx.wear.protolayout` a. Imports for `androidx.wear.tiles.EventBuilders`,` androidx.wear.tiles.RequestBuilders`, `androidx.wear.tiles.TileBuilders`, `androidx.wear.tiles.TileService` should stay the same 3. Rename a few methods from `TileService`/`TileBuilder` classes that have been deprecated and replaced: a. `get/setTimeline` to` get/setTileTimeline` b. `onResourcesRequest` to `onTileResourcesRequest` c. `get/setDeviceParameters` to get/setDeviceConfiguration d. `get/setState` to `get/setCurrentState` i. Note that this is for RequestBuilders’ method and that there is a v1.2 method with the same name in TileBuilders that is valid.