1

Is it possible to allow a view to expand when clicked? Right now I am using a linearlayout to keep three different layouts in descending order. When a component is clicked I want the component to expand and take over the screen. How can this be done?

Example:

Before Click
 ___________
|           |
|      A    |
|           |
|___________|
|           |
|      B    |
|___________|
|           |
|      C    |
|___________|

After "C" component is clicked:

 ___________
|           |
|           |
|           |
|           |
|     C     |
|           |
|           |
|           |
|           |
|___________|

A, B, and C are LinearLayouts held in position with weighted values given in the main.xml.

Also, the C is meant to expand upwards using Animations perhaps.

4

1 回答 1

2

为什么不直接删除视图 A 和 B?

viewA.setVisibility(View.GONE);
viewB.setVisibility(View.GONE);
于 2012-09-13T23:17:39.320 回答