[英]How do I Implement this? Can someone help me?
I want my share button to change to 'shared' or change color when I click on it or share a document.我希望我的共享按钮在我单击它或共享文档时更改为“共享”或更改颜色。 I want it to show the toast message and also change to reflect that the document has been shared.
我希望它显示 toast 消息并更改以反映文档已共享。 How do I Implement this?
我该如何实施? This is what I have.
这就是我所拥有的。
const handleSubmit = () => {
localStorage.setItem('isShared', 'true')
Toaster.show({ message: `Successfully shared!`, intent: 'success' })
if (onSubmit) onSubmit()
}
To change color on click of the button you should use the StateListDrawable in android to now more click on this link要在单击按钮时更改颜色,您应该使用 android 中的 StateListDrawable 现在更多单击此链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.