Skip to content

yixiaolunhui/FloatingView

Repository files navigation

FloatingView

悬浮view,之前写的https://github.com/dalong982242260/SuspendedBall 现在换成方式实现。

##使用范围 1、可以随便添加view或者layout,不受限制。 2、支持点击事件。 3、适合app中首页活动等使用。

##效果图

image image image image image image

##说明 |name|format|description| |:---:|:---:|:---:| | dl_duration | long |设置归位时间 | dl_percent | float |设置显示百分比 | dl_scale | float |设置按下view缩放值

##使用方式

###xml: <com.dalong.floatview.FloatingView android:id="@+id/floatingView" app:dl_duration="100" app:dl_scale="1.4" app:dl_percent="0.8" android:layout_width="wrap_content" android:layout_height="wrap_content" />

###java: floatingView=(FloatingView)findViewById(R.id.floatingView); View view= LayoutInflater.from(this).inflate(R.layout.item_view,null); ImageView image= (ImageView) view.findViewById(R.id.test_img);

                floatingView.addFloatingView(view)
                        .setFloatingDuration(200L)
                        .setFloatingPercent(0.5f)
                        .setFloatingScale(1f);
        
                Glide.with(this)
                        .load("http://img2.imgtn.bdimg.com/it/u=2679297709,1421413045&fm=21&gp=0.jpg")
                        .placeholder(R.mipmap.ic_launcher)
                        .into(image);

Releases

No releases published

Packages

No packages published

Languages