wangjiegulu / draggableflagview Goto Github PK
View Code? Open in Web Editor NEW可拖拽的红点,(仿新版QQ,tab下面拖拽标记为已读的效果),拖拽一定的距离可以消失回调。
License: Apache License 2.0
可拖拽的红点,(仿新版QQ,tab下面拖拽标记为已读的效果),拖拽一定的距离可以消失回调。
License: Apache License 2.0
限制太大了,首先必须父布局要是RelativeLayout,其次父布局必须要全屏大小的,才能在全屏拖动。
float value = (float) animation.getAnimatedValue();在这行代码,提示:Cannot cast from Object to float。请问如何解决。
你可以试试ListView,我估计也会出现这样的问题。
报的exception比较古怪:
java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to android.widget.LinearLayout$LayoutParams
但是我不放入DraggableFlagView就没事!
item布局:
<TextView
android:id="@+id/item_0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|start"
android:textAppearance="?attr/textAppearanceListItem"
android:textColor="@android:color/holo_blue_dark"
android:textSize="20sp" />
<com.mb.widget.DraggableFlagView
android:id="@+id/dfv"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center_vertical|end"
android:layout_margin="15dp"
app:fv_color="#FF3B30" />
在Adapter中使用:
dfv = (DraggableFlagView) view.findViewById(R.id.dfv);
dfv.setOnDraggableFlagViewListener(new DraggableFlagView.OnDraggableFlagViewListener() {
@Override
public void onFlagDismiss(DraggableFlagView view) {
// TODO Auto-generated method stub
Log.i("tag", "DraggableFlagView--->onFlagDismiss");
}
});
dfv.setText("7");
貌似缺少android.library.reference.1=../AndroidBucket啊
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.