Android implementation double-click the titlebar back to the top of the function sample code

preface

The content introduced in this article is accidentally found. This function has been moved and sorted out. It is also implemented in a class, which is very convenient to use

Special thanks to @ takwolf for his great open source project and learning a lot about Android

Double click to return to the top code

usage method

To illustrate, the delaytime property in the doubleclickbacktocontenttoplistener class is the time difference between double clicks. The default setting here is 300 milliseconds

It's so simple. A good package can save much!

summary

The above is the whole content of this article. I hope the content of this article has a certain reference value for your study or work. If you have any questions, you can leave a message. Thank you for your support for programming tips.

reference resources

https://github.com/TakWolf/CNode-Material-Design

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
分享
二维码
< <上一篇
下一篇>>