Danish Ansari
12/15/2022, 2:48 PMPopup
and PopupPositionProvider
The background and arrow are the most challenging part as it’s position will be dynamic, for eg. arrow will be on top normally and it might be on bottom if the anchoring view (trailing icon of text view) is on bottom of screen and very less space is available below. And the arrow should point exactly to the “help” icon as shown in first imageDanish Ansari
12/15/2022, 2:52 PMPopup
https://medium.com/codex/how-to-accomplish-dynamic-absolute-positioning-in-androids-jetpack-compose-afa14f0e8deaChris Sinco [G]
12/16/2022, 5:54 AMDanish Ansari
12/16/2022, 6:54 AMChris Sinco [G]
12/16/2022, 6:57 AMDanish Ansari
12/16/2022, 7:17 AMefemoney
12/16/2022, 3:01 PMonPlaced
or onGloballyPositioned
plus locationInWindow
, then use that information within the popup to figure out where the triangle of the shape should beAmrJyniat
01/27/2023, 12:24 PMDanish Ansari
01/27/2023, 12:29 PMDanish Ansari
01/27/2023, 12:59 PMDanish Ansari
01/27/2023, 1:00 PMDanish Ansari
01/27/2023, 1:00 PMAmrJyniat
01/27/2023, 1:01 PMefemoney
01/27/2023, 1:03 PMDanish Ansari
01/27/2023, 1:05 PMDanish Ansari
01/27/2023, 1:10 PMTooltipShape.kt
) as per your need.AmrJyniat
01/30/2023, 8:39 AMPopup
, here you declared the the width to take 3/4 the screen's width, but in my case I want to make it wrap the content and change the X offset of it, I changed the `anchorCoordinates`'s X, but this didn't help, any tip?