从布局回来动画列表视图 [英] Animate listview from back of layout

查看:106
本文介绍了从布局回来动画列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的动画,我有一个布局和列表视图和我正在申请动画列表视图从左至右,布局其工作正常,但列表视图幻灯片前,我想要做的从布局的背面

I am working on animation, I have one Layout and list-view and I am applying animation to list-view from left to right, Its working fine but list-view slide front of layout and I want to do from back of layout.

在点击布局列表视图会滑动由左到右,它持有的布局旁边的地方像下面的图片。

On click of layout list-view will slide from left to right and it hold the place beside layout like below images.

感谢。

推荐答案

试着去了解查看订单(层次) 让我说清楚一个例子

Try to Understand the View order(Hierarchy) let me make it clear with an example

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
> 

<TextView 
android:id="@+id/tvMessage" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="dasdjfiuihuhds" /> 
<Button 
android:id="@+id/btnOk" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Ok" /> 

</RelativeLayout>

这将使TextView的超过ButtonView

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
> 
<Button 
android:id="@+id/btnOk" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Ok" /> 
<TextView 
android:id="@+id/tvMessage" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="dasdjfiuihuhds" /> 

</RelativeLayout>

这会使按钮上的TextView

第一种情况code

<RelativeLayout > 
<TextView> 
<Button>

第二种情况code

2nd case code

<RelativeLayout > 
<Button> 
<TextView>

总之你可以按照code等级维持秩序

这篇关于从布局回来动画列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆