xamarin-forms-tab-badge icon indicating copy to clipboard operation
xamarin-forms-tab-badge copied to clipboard

[Android] Badge icon is stuck to the device's screen

Open toussam opened this issue 5 years ago • 3 comments

Hi,

I am using your package to set a badge icon internally and I mixed it with Xamarin's Android specification that is allowing the TabbedPage to be set at the bottom.

The badge icon is working great, but on Android devices this last one is almost stuck to the device's screen. I checkout your wiki and I know we can change its position (TopLeft, BottomLeft, etc..), but in my case I simply would like to keep at the TopRight (default value) and be more on the related icon (like on iOS devices).

Could you allow us set a more precise position for the badge or set it more closer to the related icon ? I am sharing you some screenshots to illustrate my saying. :)

I thank you in advance for everything and wish you a great weekend ! Best regards,

Screenshots.zip

EDIT: this case is happening since I applied the badge to the lefty tab's children and only when this last one being selected.

toussam avatar Nov 09 '18 11:11 toussam

@toussam Use the BadgeMargin property to fine tune the position on android ;) Run the sample app to see how this influences the badge position.

xabre avatar Nov 11 '18 11:11 xabre

Hey @xabre ! It worked well. I noticed that with a bottom TabbedPage android:TabbedPage.ToolbarPlacement="Bottom"

The classic xamarin behavior changes the position of the Icon but the badge stays at the same position. It makes the badge on a different place compared to the icon wether you have the focus on the Content page or not.

I implemented my own fix with different margins when you leave or enter the page. I tought handling this behavior in your plugin could be a nice improvement for futur developpers!

Best regards.

Romain1Lambert avatar Nov 14 '18 14:11 Romain1Lambert

Hi @xabre ,

Could you help us with this issue ? We would like to remove our temporary fix in the future hoping your package will handle such by itself. :)

Best regards,

toussam avatar Dec 13 '18 14:12 toussam