The story begins like this:
- There's a QQ group for technical discussions, where a group of highly skilled individuals actively participates. They possess exceptional technical expertise, exploring various realms of technology. They know things you don't and have dabbled with apps you've never heard of.
- One dark and stormy night, a mysterious figure, a stranger to us all, said, "Tantan's app is impressively crafted, with seamless scrolling and stunning shadow effects." Filled with admiration and paying homage to this masterpiece, I secretly downloaded the app. During a moment of solitude, I registered an account and launched the app.
- It was genuinely breathtaking, a true work of art! The card-based user interface introduced me to a new realm of user experience. Some time ago, a fellow enthusiast remarked, "The left and right swipe effect in the 'Boss Zhipin' app's 'Daily Recommendations' section is top-notch." I downloaded it, installed it, registered, and even caught the attention of our company's HR department. However, at the time, I found the UI to be a bit sluggish (please spare me, I'm sensitive to pain).
- Time has passed, and Tantan is before me now. I finally understood the magic of ViewDragHelper. I've made up my mind to do justice to this project.
Take a look at these images:
I must admit that Tantan's UI effects are truly remarkable. Prior to commencing this project, I refrained from referencing similar open-source projects on GitHub. Therefore, if this project seems to reinvent the wheel, please be understanding. For ease of discussion, let's refer to this project as "thisProj."
Upon the completion of thisProj, a friend introduced me to another open-source project that shares similarities with thisProj. I downloaded the source code, imported it into Android Studio, and when I ran the APK, I encountered some issues: cards would fly to both sides, and if the animation wasn't completed, the next drag action wasn't allowed. This could be frustrating for users with OCD.
However, Tantan overcame all these challenges. Perhaps only those well-versed in these knowledge areas can truly appreciate it. I spent a considerable amount of time pondering it and devised a pretty effective solution. As you delve deep into the code, you'll have your "aha" moment.
If I may be a bit shameless, let me highlight some of the project's key strengths:
- Speed: It's incredibly smooth, and even the fastest swipes can't match the speed at which the code refreshes the view.
- Efficiency: With just four card views, it effortlessly handles a multitude of data.
- Flexibility: A custom ViewGroup ensures that card views adapt to their content's height.
- Attention to Detail: The visual effects between cards are finely tuned to the pixel.
Don't take my word for it; download it and see for yourself.
Understanding how to use it is as simple as examining the code.
Download APK (It's included right in the thisProj project)
Copyright 2016, xmuSistone
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.