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 的各种动画效果
共216个文件
class:63个
java:60个
xml:32个
需积分: 3 23 下载量 54 浏览量
2015-08-26
12:23:29
上传
评论 1
收藏 2.69MB RAR 举报
温馨提示
集合了listview的各种源码实现,本源码是用eclipse建立的工程。初学者可根据代码注释进行各种listview界面效果的代码部署。
资源推荐
资源详情
资源评论
收起资源包目录
listview 的各种动画效果 (216个子文件)
resources.ap_ 124KB
listviewanimations.apk 760KB
SwipeDismissListViewTouchListener.class 8KB
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
SwipeDismissActivity$MyOnDismissCallback.class 2KB
MyListActivity$MyListAdapter.class 2KB
ContextualUndoListViewTouchListener$1.class 2KB
AnimateDismissActivity$2.class 2KB
AnimationInExamplesActivity.class 2KB
ScaleInAnimationAdapter.class 2KB
ContextualUndoView.class 2KB
AnimateDismissActivity$MyOnDismissCallback.class 2KB
ContextualUndoAdapter$RemoveViewAnimatorUpdateListener.class 2KB
ContextualUndoActivity$MyDeleteItemCallback.class 2KB
AnimateDismissAdapter$2.class 2KB
SwipeDismissActivity.class 2KB
SwipeDismissListViewTouchListener$3.class 2KB
SwingRightInAnimationAdapter.class 2KB
SwingLeftInAnimationAdapter.class 2KB
ContextualUndoListViewTouchListener$2.class 2KB
ContextualUndoAdapter$RecycleViewListener.class 2KB
AnimateDismissAdapter$3.class 2KB
SwingBottomInAnimationAdapter.class 2KB
MyListActivity.class 2KB
ItemManipulationsExamplesActivity.class 1KB
AnimateDismissActivity$1.class 1KB
AnimateDismissAdapter$1.class 1KB
SwingBottomRightInActivity.class 1KB
GoogleCardsActivity$GoogleCardsAdapter$1.class 1KB
ResourceAnimationAdapter.class 1KB
MainActivity.class 1KB
SwipeDismissListViewTouchListener$PendingDismissData.class 1KB
SwipeDismissAdapter.class 1KB
SwingBottomInActivity.class 1KB
SwingRightInActivity.class 1KB
SwingLeftInActivity.class 1KB
SwipeDismissListViewTouchListener$1.class 1KB
ScaleInActivity.class 1KB
SingleAnimationAdapter.class 989B
R$string.class 919B
GoogleCardsActivity$GoogleCardsAdapter$ViewHolder.class 848B
AnimationAdapter$AnimationInfo.class 830B
R$layout.class 806B
R$id.class 752B
R$drawable.class 694B
R.class 675B
R$style.class 467B
ContextualUndoListViewTouchListener$Callback.class 431B
R$attr.class 376B
BuildConfig.class 369B
ContextualUndoAdapter$DeleteItemCallback.class 357B
OnDismissCallback.class 207B
.classpath 650B
classes.dex 609KB
.gitignore 718B
android-support-v4.jar 384KB
android-support-v4.jar 384KB
android-support-v4.jar 377KB
nineoldandroids-2.4.0.jar 108KB
nineoldandroids-2.4.0.jar 108KB
nineoldandroids-2.4.0.jar 108KB
com.haarman.listviewanimations-1.9.jar 42KB
annotations-68c8418622b97bd546a5fafcc3106437.jar 943B
SwipeDismissListViewTouchListener.java 10KB
SwipeDismissListViewTouchListener.java 10KB
ContextualUndoListViewTouchListener.java 8KB
ContextualUndoListViewTouchListener.java 8KB
ContextualUndoAdapter.java 8KB
ContextualUndoAdapter.java 8KB
AnimationAdapter.java 7KB
AnimationAdapter.java 7KB
GoogleCardsActivity.java 5KB
GoogleCardsActivity.java 5KB
AnimateDismissAdapter.java 5KB
AnimateDismissAdapter.java 5KB
ArrayAdapter.java 5KB
ArrayAdapter.java 5KB
R.java 4KB
AnimateDismissActivity.java 3KB
AnimateDismissActivity.java 3KB
BaseAdapterDecorator.java 3KB
BaseAdapterDecorator.java 3KB
ScaleInAnimationAdapter.java 2KB
ScaleInAnimationAdapter.java 2KB
SwingRightInAnimationAdapter.java 2KB
SwingLeftInAnimationAdapter.java 2KB
SwingBottomInAnimationAdapter.java 2KB
共 216 条
- 1
- 2
- 3
资源评论
人工智控
- 粉丝: 2
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功