Я пытаюсь симулировать слайд-анимацию. Идея состоит в том, чтобы при нажатии кнопки сдвигать и сдвигать таблицу с помощью 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"));
Вот 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>