All Projects → lx8421bcd → Neteaseprofiledemo

lx8421bcd / Neteaseprofiledemo

仿照网易云音乐歌手资料页面滑动效果实现的Demo

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Neteaseprofiledemo

Tableexport
The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
Stars: ✭ 781 (+3154.17%)
Mutual labels:  demo
Threadandjuc
⭐⭐⭐⭐高并发-高可靠-高性能three-high-import导入系统-高并发多线程进阶
Stars: ✭ 807 (+3262.5%)
Mutual labels:  demo
Casbin Example
A Demo App of Attribute-based Access Control in Node.js Based on Casbin.
Stars: ✭ 19 (-20.83%)
Mutual labels:  demo
Arshooter
A demo Augmented Reality shooter made with ARKit in Swift (iOS 11)
Stars: ✭ 794 (+3208.33%)
Mutual labels:  demo
Landio Html
Landio design (Sketch to HTML)
Stars: ✭ 809 (+3270.83%)
Mutual labels:  demo
Raincatcher Demo Mobile
[Inactive] Mobile application example
Stars: ✭ 6 (-75%)
Mutual labels:  demo
Demo Magic
A handy shell script that enables you to write repeatable demos in a bash environment.
Stars: ✭ 770 (+3108.33%)
Mutual labels:  demo
Algolia Swift Demo
iOS instant search tutorial
Stars: ✭ 23 (-4.17%)
Mutual labels:  demo
Android 3d Model Viewer
Android OpenGL 2.0 application to view 3D models. Published on Play Store
Stars: ✭ 809 (+3270.83%)
Mutual labels:  demo
Great Big Example Application
A full-stack example app built with JHipster, Spring Boot, Kotlin, Angular 4, ngrx, and Webpack
Stars: ✭ 899 (+3645.83%)
Mutual labels:  demo
Demo Progressive Web App
🎉 A demo for progressive web application with features like offline, push notifications, background sync etc,
Stars: ✭ 798 (+3225%)
Mutual labels:  demo
Demo Scene
👾Scripts and samples to support Confluent Demos and Talks. ⚠️Might be rough around the edges ;-) 👉For automated tutorials and QA'd code, see https://github.com/confluentinc/examples/
Stars: ✭ 806 (+3258.33%)
Mutual labels:  demo
Regl Fire
Fire particle system made with regl
Stars: ✭ 16 (-33.33%)
Mutual labels:  demo
Awesome Kotlin Android
🔥📱收集利用 Kotlin 进行 Android 开发的开源库,扩展,工具,开源项目,资料等高质量资源
Stars: ✭ 784 (+3166.67%)
Mutual labels:  demo
Graphql Server Demo
GraphQL server demo with nodejs
Stars: ✭ 19 (-20.83%)
Mutual labels:  demo
Fucking Java Concurrency
🎏 Simple show cases of java concurrency problems, seeing 🙈 is believing 🐵
Stars: ✭ 779 (+3145.83%)
Mutual labels:  demo
Hb Tufte
💀 No longer in use, for reference only || HarpJS blog boilerplate based on TufteCSS
Stars: ✭ 5 (-79.17%)
Mutual labels:  demo
Esp Homekit Demo Stepbystep
tutorial step by step esp homekit demo
Stars: ✭ 24 (+0%)
Mutual labels:  demo
Embree viewer
Embree viewer is a simple implementation of a progressive renderer, based on Intel's Embree raytracing kernels. Its UI is written in SDL2, and it supports Alembic, OBJ file formats, with a JSON file to describe a scene.
Stars: ✭ 19 (-20.83%)
Mutual labels:  demo
Demo Multi Lang
Simple libp2p demos implemented in Go, JS and Rust
Stars: ✭ 17 (-29.17%)
Mutual labels:  demo

NetEaseProfileDemo

仿照网易云音乐歌手资料页面滑动效果实现的Demo.
A Demo Modeled on sliding effect of NetEase Cloud Music singer profile page. ##Features image
在使用网易云音乐时研究此页面,个人认为此页面十分适合作为某些商城应用首页,因此将其模仿出来以供以后使用。

Introduction

基于原项目代码抽出修改而成,使用了Activity中嵌套HomeFragment的布局,在列表页(HomeListFragment)和歌手资料页(HomeProfileFragment)监听其中滑动组件的滑动距离,滑动距离与Header变动距离,颜色变化是一次函数关系,因此在初始化时先根据设定值计算好k值,在HomeFragment中调整对应Header,实现PagerSlidingTabStrip的悬停,顶部NavigationBar变色等效果。
在不同页面切换时,为了防止各个页面的滑动距离不同使列表与Header显示异常,因此在切换到某一页面时需要重设其滑动距离为当前Header所滑动的距离。

这里没有采用网易云音乐的下拉刷新方法,而是使用了下拉刷新布局,为了防止下拉刷新与页面上滑操作冲突,在下拉刷新布局中需要重设对滑动事件的监听,在列表没有滑到顶端时不触发下拉刷新。


This demo based on one of my project, used fragment to show views and used activity to manage fragment. I set Listeners on the list page and profile page to listen the scroll distance, the relationship between scrolling distance and header view changes can be described by a linear function, so we calculated the k value at initialization, change header according to the scrolling distance to achieve the PagerSlidingTabStrip hover effect and Toolbar color changes.

To avoid the exceptions at Header display that caused by the different scrolling distance in each page when page swithing, we need to reset the current page scrolling distance to current header scrolling distance.

In this demo, I did not use the pull-to-refresh method that NetEase Cloud Music has used, I used SwipeRefreshLayout instead, in order to avoid the conflict between swipe refresh and scroll up, we need to override onInterceptTouchEvent() at SwipRefreshLayout to judge tigger refresh or not.

License

Copyright 2016 linxiao

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].