android:layoutAnimation 属性定义在ViewGroup中,因此所有ViewGroup的子类都可以定义android:layoutAnimation。 ViewGroup可以嵌套定义,从而layout animation 也可以嵌套。
本例使用了TableLayout(ViewGroup的子类),其子View TableRow (也是ViewGroup的子类):
<TableLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:layoutAnimation=”@anim/layout_animation_table”
android:animationCache=”false”
android:clipToPadding=”false”
android:padding=”12dp”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
android:stretchColumns=”1″>
<TableRow
android:layoutAnimation=”@anim/layout_animation_row_right_slide”>
<TextView
android:gravity=”right”
android:text=”@string/layout_animation_name” />
<EditText />
</TableRow>
<TableRow
android:layoutAnimation=”@anim/layout_animation_row_left_slide”>
<TextView
android:gravity=”right”
android:text=”@string/layout_animation_lastname” />
<EditText />
</TableRow>
<TableRow
android:layoutAnimation=”@anim/layout_animation_row_right_slide”>
<TextView
android:gravity=”right”
android:text=”@string/layout_animation_phone” />
<EditText />
</TableRow>
<TableRow
android:layoutAnimation=”@anim/layout_animation_row_left_slide”>
<TextView
android:gravity=”right”
android:text=”@string/layout_animation_address” />
<EditText android:lines=”3″ />
</TableRow>
</TableLayout>
为TableLayout 定义 slide_top_to_bottom, 从上到下滑入屏幕,而TableLayout 的子ViewTableRow,每列向左滑,向右滑动交替。
分享到:
相关推荐
NULL 博文链接:https://kakukemeit.iteye.com/blog/1806388
android apidemos代码的示例解析,讲的挺全的
最新版ApiDemos Android SDK 中带有很多例子,其中ApiDemo 详细介绍了Android 平台主要API,分成了 · App · Content · Graphics · Media · OS · Text · Views 几个大类,每个大类又分为几个小类,...
Android ApiDemos apk, 包括Android presentation双屏异显 demon, App>Activity>Presentation
demos :jdk-8u202-linux-arm64-vfp-hflt-demos.tar.gz
demos :jdk-8u202-linux-x64-demos.tar.gz
最新Android apidemos
Centos7离线安装文件 jdk-8u231-linux-x64.tar.gz压缩包 免费下载,现在博客都是付费文件,搞得头大,现在免费分享
api ------------- API目录 demos ------------- 本地demos目录 lib ------------- 框架源代码目录 index.htm ------------- 主页面 loading.gif ------------- loading图标 welcome.htm ------------- 欢迎页面 ...
API Demos 是 Google 为了 Android 开发者所提供的一个 Android API 合集,其中包含了很多的 API 范例,同时遵循了良好的代码规范,是一个值得开发者研究和学习的典型。android的ApiDemos,需要解压缩后使用。
android APIdemos,android 源码简单使用demos
demos :jdk-8u202-linux-arm32-vfp-hflt-demos.tar.gz
文件名称: jdk-8u231-solaris-x64-demos.tar.gz 文件大小: 8.43 MB (8,846,115 字节) MD5: 3b62803c4e86b40f1a83b68be7bce224 SHA1: 3aba5de2157163b949179a5b654494da05b4da9c SHA256: 774c5d41a1422d22d026eaaa39...
该Api Demos 源码是基于Android6.0 ,Eclipse下的,可以直接使用Android studio 导入工程即可。
The history of the EhLib library -------------------------------- Version 6.1 + A new component TDBVertGridEh - DataSet Grid with the ... <EhLib Archive> \ Demos \ Bin \ DBGridEh.LoadingStatus.Exe
The history of the EhLib library -------------------------------- Version 6.1 + A new component TDBVertGridEh - DataSet Grid with the ... <EhLib Archive> \ Demos \ Bin \ DBGridEh.LoadingStatus.Exe
springBoot-demos springBoot-demos 1.springboot-invoke 2.springboot-demo2 3.springboot-static 4.springboot-redis 5springboot-quartz-cluster 6.springboot-shiro 7.springboot-admin 8.springboot-html 9....
AndroidDemosStudio AndroidDemos ------- Android Studio
Android 系统原生应用API示例程序集合,是初学Android 开发的重要参考资料 https://github.com/longtaoge
Run demos in Assets/FairyGUI/Examples/Scenes. The UI project is in Examples-UIProject.zip, unzip it anywhere. Use FairyGUI Editor to open it. Using FairyGUI in Unity: * Place a UIPanel in scene by ...