Skip to content

android沉浸式状态栏+图片背景+标题栏渐变+背景伸缩

Notifications You must be signed in to change notification settings

yanjunhui2014/TranslucentScrollView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TranslucentScrollView

效果如图: image

用法请参见 Demo

主要API

 //设置HeaderView(也就是拉伸区域)
 PullZoomView.setHeaderView(R.layout.view_header);
 //设置普通(追加)视图,可以添加多个
 PullZoomView.addNormalView(R.layout.view_normal, R.layout.view_normal);
 //设置阻力系数
 PullZoomView.setDamping(0.2f, 0);
 
 //关联渐变视图 - 可选
 PullZoomView.attachTransView(mActionBar, getResources().getColor(R.color.colorPrimary), -1, -1);
 //设置透明度变化监听 - 可选
 PullZoomView.setTranslucentChangedListener(new TranslucentScrollView.TranslucentChangedListener() {
       @Override
       public void onTranslucentChanged(int transAlpha) {
            //回调alpah值,0-255
       }
  });
  //隐藏ScrollBar - 可选
  PullZoomView.mLayoutTransSV.setVerticalScrollBarEnabled(false);

About

android沉浸式状态栏+图片背景+标题栏渐变+背景伸缩

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages