Customize the shape of toast. Multiple clicks will not always pop up the implementation method of toast

The effect is as follows:

I encapsulated a class:

The following two textviews make the toast wider and higher respectively, which will look better.

In drawable / selected_ etoast_ The code in background is as follows:

The exclamation point picture above is as follows:

When this is used in activity, the following code is shown:

Customertoast.showtoast (appwallactivity. This, "please select type first!");

end.

The above custom toast shape will not always pop up after multiple clicks. The implementation method of toast is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>