- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我想模拟一个上滑动画。我的想法是在按下按钮时使用 id searchForm 上滑和下滑表格布局,这样我就可以将额外的空间用于列表。我设法向上滑动 searchForm 和按钮,列表似乎是可见的,但在此之后我无法单击按钮,这是负责向上滑动动画的代码:
TranslateAnimation slide = new TranslateAnimation(0, 0, 0,
-findViewById(R.id.searchForm).getHeight());
slide.setDuration(500);
slide.setFillAfter(true);
findViewById(R.id.searchForm).startAnimation(slide);
findViewById(R.id.listBut).startAnimation(slide);
adapterSearch.add(new NotificationEntry("","444/2010","TEste","Etapa de teste2","2010"));
这是包含 View 元素的 xml:
<TableLayout android:id="@+id/search"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:stretchColumns="1">
<TableLayout android:id="@+id/searchForm"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:stretchColumns="1">
<TableRow android:paddingTop="5px">
<TextView android:text="Nº Processo:" />
<EditText android:id="@+id/processNr" />
</TableRow>
<View android:id="@+id/View01"
android:layout_width="wrap_content"
android:background="#B5B5B5"
android:layout_height="1px"
android:paddingBottom="2px">
</View>
<TableRow android:paddingTop="5px">
<TextView android:text="Etapa:" />
<EditText android:id="@+id/tasksearch" />
</TableRow>
<View android:id="@+id/View01"
android:layout_width="wrap_content"
android:background="#B5B5B5"
android:layout_height="1px"
android:paddingBottom="2px">
</View>
<TableRow android:paddingTop="5px">
<TextView android:text="Data inicio:"
android:id="@+id/datepick" />
<EditText android:id="@+id/datebegvalue" />
</TableRow>
<View android:id="@+id/View01"
android:layout_width="wrap_content"
android:background="#B5B5B5"
android:layout_height="1px"
android:paddingBottom="2px"
android:paddingTop="5px">
</View>
<TableRow android:paddingTop="5px">
<TextView android:text="Data Fim:"
android:id="@+id/dateendpick" />
<EditText android:id="@+id/dateendvalue" />
</TableRow>
<View android:id="@+id/View01"
android:layout_width="wrap_content"
android:background="#B5B5B5"
android:layout_height="1px"
android:paddingBottom="2px"
android:paddingTop="5px">
</View>
</TableLayout>
<TableLayout android:id="@+id/listBut">
<TableRow android:paddingTop="5px">
<Button android:id="@+id/send"
android:text="Procurar"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</TableRow>
<ListView android:id="@+id/processlistsearch"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</TableLayout>
最佳答案
我相信动画 View 实际上并没有移动它们的 x,y 点,但您只是通过动画直观地看到它们的移动。 View 实际上仍处于原始位置
也许可以在动画结束的位置放置一个GONE
View ,并在动画结束时将可见性更改为VISIBLE
。它看起来好像实际上移动了,并且 View 上的任何操作(例如按钮上的单击事件)都可以用来执行您想要的操作
关于android - TranslateAnimation 结束后按钮不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3824340/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!