简体   繁体   English

我该如何实施? 有人能帮我吗?

[英]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.

相关问题 我无法解决此错误。 有人能帮我吗? - I can't solve this error. Can someone help me? 有人可以帮我如何在Android中用手指拖动来裁剪图像吗? - Can someone help me how can i crop image by dragging with fingers in android? 有人可以帮我把我使用的下载代码放在ASyncTask中吗? - Can someone help me put this download code that I use in ASyncTask? 我无法在我的模拟器上运行这个应用程序有人可以帮助我吗 - i cant run this app on my emulator CAN someone help me 如何使用 flutter 开发集成 PDF 的应用程序? 请有人帮我制定路线图 - How can I develop a app using flutter with integrating a PDFs ? Pls someone help me with the roadmap 我无法理解如何实施“结果回调”。 有人可以指出我正确的方向吗? - I'm having trouble understanding how to implement a “Result Callback”. Can someone point me in the right direction? 有人可以帮助我进行JSON解析吗? - Can someone help me with this JSON Parsing? 有人可以帮我处理全局变量吗? - can someone help me with my global variables? 有人可以帮我解决这段代码中的mcallback错误 - Can someone help me with the error in mcallback in this code 有人可以帮我写正则表达式吗? - Can someone help me with writing a regular expression?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM