ListViewAnimations ([Play Store Demo][1])
===========
ListViewAnimations is an Open Source Android library that allows developers to easily create ListViews with animations.
Feel free to use it all you want in your Android apps provided that you cite this project and include the license in your app.
ListViewAnimations uses the [NineOldAndroids][2] library to support devices <3.0.
It also uses Roman Nurik's BETA [SwipeDismissListViewTouchListener][5] to support swipe to dismiss.
Known applications using ListViewAnimations
-----
* TreinVerkeer ([Play Store][6])
* Running Coach ([Play Store][9])
If you want your app to be listed as well please contact me via [Twitter][7] or [Google Plus][8]!
Setup
-----
* In Eclipse, just import the library as an Android library project.
* Project > Clean to generate the binaries you need, like R.java, etc.
* Then, just add ListViewAnimations as a dependency to your existing project and you're good to go!
Or:
* [Download the .jar file][4]
* Add the .jar to your project's `libs` folder.
Usage
-----
This library uses the [Decorator Pattern][3] to stack multiple `BaseAdapterDecorator`s on each other:
* Implement your own `BaseAdapter`, or reuse an existing one.
* Stack multiple `BaseAdapterDecorator`s on each other, with your `BaseAdapter` as a base.
* Set the `ListView` to your last `BaseAdapterDecorator`.
* Set your last `BaseAdapterDecorator` to the `ListView`.
Example:
-----
/* This example will stack two animations on top of eachother */
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MyListAdapter mAdapter = new MyListAdapter(this, getItems());
SwingBottomInAnimationAdapter swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(mAdapter);
SwingRightInAnimationAdapter swingRightInAnimationAdapter = new SwingRightInAnimationAdapter(swingBottomInAnimationAdapter);
// Or in short notation:
swingRightInAnimationAdapter =
new SwingRightInAnimationAdapter(
new SwingBottomInAnimationAdapter(
new MyListAdapter(this, getItems())));
// Assign the ListView to the AnimationAdapter and vice versa
swingRightInAnimationAdapter.setListView(getListView());
getListView().setAdapter(swingRightInAnimationAdapter);
}
private class MyListAdapter extends com.haarman.listviewanimations.ArrayAdapter<String> {
private Context mContext;
public MyListAdapter(Context context, ArrayList<String> items) {
super(items);
mContext = context;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
TextView tv = (TextView) convertView;
if (tv == null) {
tv = (TextView) LayoutInflater.from(mContext).inflate(R.layout.list_row, parent, false);
}
tv.setText(getItem(position));
return tv;
}
}
Custom AnimationAdapters
-----
Instead of using the ready-made adapters in the `.swinginadapters.prepared` package, you can also implement your own `AnimationAdapter`.
Implement one of the following classes:
* `ResourceAnimationAdapter`
* `SingleAnimationAdapter`
* `AnimationAdapter`
See the examples.
Developed By
-----
* Niek Haarman
License
-----
Copyright 2013 Niek Haarman
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.
[1]: https://play.google.com/store/apps/details?id=com.haarman.listviewanimations
[2]: http://nineoldandroids.com/
[3]: http://en.wikipedia.org/wiki/Decorator_pattern
[4]: https://github.com/nhaarman/ListViewAnimations/blob/master/com.haarman.listviewanimations-1.9.jar?raw=true
[5]: https://gist.github.com/romannurik/2980593
[6]: https://play.google.com/store/apps/details?id=com.haarman.treinverkeer
[7]: https://www.twitter.com/haarmandev
[8]: https://plus.google.com/106017817931984343451
[9]: https://play.google.com/store/apps/details?id=com.niek.runningapp
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
多种 ListView 动画效果 包含Google+ 等多种效果。 (163个子文件)
resources.ap_ 124KB
Blast_Monkeys.apk 5.64MB
MainActivity.apk 330KB
ListViewAnimationsExample.apk 330KB
jarlist.cache 119B
jarlist.cache 119B
SwipeDismissListViewTouchListener.class 9KB
ContextualUndoAdapter.class 8KB
ContextualUndoListViewTouchListener.class 7KB
AnimateDismissAdapter.class 6KB
AnimationAdapter.class 6KB
ArrayAdapter.class 4KB
GoogleCardsActivity$GoogleCardsAdapter.class 4KB
AnimateDismissActivity.class 4KB
SwipeDismissListViewTouchListener$2.class 3KB
ContextualUndoAdapter$RemoveViewAnimatorListenerAdapter.class 3KB
BaseAdapterDecorator.class 3KB
GoogleCardsActivity.class 2KB
ContextualUndoAdapter$UndoListener.class 2KB
ContextualUndoActivity.class 2KB
AnimateDismissActivity$MyListAdapter.class 2KB
ContextualUndoListViewTouchListener$1.class 2KB
SwipeDismissActivity$MyOnDismissCallback.class 2KB
MyListActivity$MyListAdapter.class 2KB
ContextualUndoView.class 2KB
AnimateDismissActivity$2.class 2KB
ScaleInAnimationAdapter.class 2KB
AnimationInExamplesActivity.class 2KB
ContextualUndoAdapter$RemoveViewAnimatorUpdateListener.class 2KB
AnimateDismissActivity$MyOnDismissCallback.class 2KB
AnimateDismissAdapter$2.class 2KB
ContextualUndoActivity$MyDeleteItemCallback.class 2KB
SwipeDismissListViewTouchListener$3.class 2KB
ContextualUndoListViewTouchListener$2.class 2KB
ContextualUndoAdapter$RecycleViewListener.class 2KB
SwingRightInAnimationAdapter.class 2KB
SwingLeftInAnimationAdapter.class 2KB
AnimateDismissAdapter$3.class 2KB
SwipeDismissActivity.class 2KB
SwingBottomInAnimationAdapter.class 2KB
MyListActivity.class 2KB
AnimateDismissAdapter$1.class 2KB
AnimateDismissActivity$1.class 1KB
ItemManipulationsExamplesActivity.class 1KB
SwingBottomRightInActivity.class 1KB
SwipeDismissListViewTouchListener$PendingDismissData.class 1KB
ResourceAnimationAdapter.class 1KB
GoogleCardsActivity$GoogleCardsAdapter$1.class 1KB
MainActivity.class 1KB
SwipeDismissAdapter.class 1KB
SwipeDismissListViewTouchListener$1.class 1KB
SwingBottomInActivity.class 1KB
SwingRightInActivity.class 1KB
SwingLeftInActivity.class 1KB
ScaleInActivity.class 1KB
SingleAnimationAdapter.class 1013B
R$string.class 919B
AnimationAdapter$AnimationInfo.class 870B
GoogleCardsActivity$GoogleCardsAdapter$ViewHolder.class 848B
R$layout.class 806B
R$id.class 752B
R$drawable.class 694B
R.class 675B
R$style.class 467B
ContextualUndoListViewTouchListener$Callback.class 449B
R$attr.class 376B
ContextualUndoAdapter$DeleteItemCallback.class 375B
BuildConfig.class 369B
BuildConfig.class 369B
OnDismissCallback.class 216B
.classpath 356B
.classpath 356B
classes.dex 1020KB
.gitignore 718B
android-support-v4.jar 377KB
android-support-v4-0e55cabbdafaa364b11a49933f721db0.jar 146KB
nineoldandroids-2.4.0.jar 108KB
nineoldandroids-2.4.0-41ebe1f83eeaf9a0f1d37944436e4d6f.jar 43KB
com.haarman.listviewanimations-1.9.jar 42KB
library.jar 42KB
library-3b2c09218a5994668b1c8ca191680c4e.jar 16KB
SwipeDismissListViewTouchListener.java 10KB
ContextualUndoListViewTouchListener.java 8KB
ContextualUndoAdapter.java 8KB
AnimationAdapter.java 7KB
GoogleCardsActivity.java 5KB
AnimateDismissAdapter.java 5KB
ArrayAdapter.java 5KB
R.java 4KB
AnimateDismissActivity.java 3KB
BaseAdapterDecorator.java 3KB
ScaleInAnimationAdapter.java 2KB
SwingRightInAnimationAdapter.java 2KB
SwingLeftInAnimationAdapter.java 2KB
SwingBottomInAnimationAdapter.java 2KB
MyListActivity.java 2KB
SwipeDismissActivity.java 2KB
ContextualUndoView.java 2KB
AnimationInExamplesActivity.java 2KB
ItemManipulationsExamplesActivity.java 2KB
共 163 条
- 1
- 2
dgzja
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页