activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".activity.MainActivity">
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/listView"></ListView>
</LinearLayout>

zoom_in.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"> <scale android:duration="1000"
android:fromXScale="0.1"
android:fromYScale="0.1"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="1.0"
android:toYScale="1.0"/> <alpha android:duration="1000"
android:fromAlpha="0"
android:toAlpha="1.0"/> </set>

MainActivity.java

package com.pingyijinren.helloworld.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.widget.ArrayAdapter;
import android.widget.ListView; import com.pingyijinren.helloworld.R; public class MainActivity extends AppCompatActivity {
private ListView listView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); listView=(ListView)findViewById(R.id.listView);
listView.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,new String[]{"work hard","make money","I want to be rich"}));
// listView.setAnimation(AnimationUtils.loadAnimation(MainActivity.this,R.anim.zoom_in));
listView.setLayoutAnimation(new LayoutAnimationController(AnimationUtils.loadAnimation(MainActivity.this,R.anim.zoom_in)));
}
}

Animation显示ListView的每一条记录的更多相关文章

  1. ListView 使用 LiveBindings 显示超过 200 条记录

    ListView 使用 LiveBindings 预设加载 200 条记录,这也许是速度的考量,但当需要全部加载的的情况时,该如何做呢?只需加入下面二行代码即可: FDQuery1.OptionsIn ...

  2. FRM-40400:事务完成:已应用和保存X条记录"消息框不显示处理方法

    oldmesl := :system.message_level; :system.message_level :;--不显示长度超过25的信息 do_key('COMMIT_FORM'); :sys ...

  3. 无废话Android之listview入门,自定义的数据适配器、采用layoutInflater打气筒创建一个view对象、常用数据适配器ArrayAdapter、SimpleAdapter、使用ContentProvider(内容提供者)共享数据、短信的备份、插入一条记录到系统短信应用(3)

    1.listview入门,自定义的数据适配器 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/and ...

  4. asp显示多条记录的代码

    asp显示多条记录的代码 仅供参考 <%for i=1 to RS.PageSize%> <% if RS.EOF then exit for end if %> <tr ...

  5. 一个表中的id有多个记录,把所有这个id的记录查出来,并显示共有多少条记录数

    一个表中的id有多个记录,把所有这个id的记录查出来,并显示共有多少条记录数 select id ,Count(*) from table_name group by id having count( ...

  6. sql 分组后显示每组的前几条记录

    sql 分组后显示每组的前几条记录 如   表中记录是             code       serialno             A1               1           ...

  7. ExtJS用Grid显示数据后如何自动选取第一条记录

    用Grid显示数据后,如何让系统自动选取第一条记录呢?在显示Grid时由于其Store正在loading,没法在Grid选取第一条记录,因为还没有记录,所以应在其Store进行操作. 查看Ext.da ...

  8. 数据库:随机显示n条记录

    1.sqlite3数据库select  * from QG  order by random() limit 6 以下显示前10条记录 2.SQL Server数据库select top 10 * f ...

  9. 常见数据库SELECT结果只显示前几条记录方法汇总

    常见数据库SELECT结果只显示前几条记录方法汇总 为了查看数据表中的数据情况.经常会遇到想让查询结果只显示N行,比如只显示10行的情况.不同的数据库有不同的关键字和SELECT实现语法. 1.SQL ...

随机推荐

  1. (4)《Head First HTML与CSS》学习笔记---文本的CSS规则和盒模型;div与span;<a>元素的链接色;伪类

    1.每个font-family包含一组共同特征的字体.共五个字体系列: sans-serif----这个系列包括了没有衬线的字体,与serif相比,通常认为这个系列更容易在计算机上识读. serif- ...

  2. OCP 11g 第一章练习

    练习 1-1 研究所在环境的DBMS 这是一个书面练习,没有具体的解决方案. 确定自己所在环境使用的应用程序, 应用服务器 , 和数据库. 然后集中精力研究数据库, 体验一下数据库的规模和忙碌程度. ...

  3. JDBC的fetchsize和maxrows

    在我们的项目开发中,可能有把SQL查询的结果保存到CSV然后提供下载的功能.当查询的结果集相当大的时候,很容易报内存不足错误(outofmemory).那该怎么解决这种情况的内存不足错误呢? 其实在J ...

  4. python * urllib_urlopen( )

    python * urllib_urlopen( ) Python urllib 库提供了一个从指定的 URL 地址获取网页数据,然后对其进行分析处理,获取想要的数据. 一.urllib模块urlop ...

  5. 原创 齐天大圣老司机亲传rescue恢复磁盘分区

    老葵花哥哥课堂开课了本文档秉承爱看不看的原则 一不要钱 二服务大众的高尚情操咱们今天讲一讲rescue恢复磁盘分区 首先咱们搭建环境搞起来 (parted) mkpart #创建分区 Partitio ...

  6. 创建线程的三种方式_Callable和Runnable的区别

    Java 提供了三种创建线程的方法 通过实现Runnable接口 通过继承Thread接口 通过Callable和Future创建线程 通过实现 Runnable 接口来创建线程 public cla ...

  7. Format a Hard Drive in Csharp

    Article Author(s): Audric Thevenet All Rights Reserved. Here's how to format hard drives, floppies, ...

  8. vue 点击按钮弹窗,点击关闭按钮关闭弹窗。

    <div @click="btnfc()">点击弹窗按钮</div> <div v-show="show"> <div ...

  9. [CF] 948A Protect Sheep

    A. Protect Sheep time limit per test1 second memory limit per test256 megabytes inputstandard input ...

  10. 【eclipse】使用说明

    一. 设置jdk版本 1. Window->Preferences->Java->Installed JREs,选择jdk安装目录: 2. Window->Preference ...