开发者

Turn Views Editable on Android

Is it possible to turn a view editable like this image?

I kn开发者_JAVA技巧ow I can do that using a GridView. But, Im trying to do that with TableRows, is it possible?

Edited: What I really wanna to do is to construct some interface to delete a TableRow.


Sure, you can remove TableRow from your TableLayout. You'll have to keep track of the different views (rows) in your table and then just call removeView when you want to delete one.

Edit (answer to your question in the comments) :

Yes, you can edit the View dynamically. For example, if your TableRow is an horizontal LinearLayout, you can call addView

Like you did (making the button invisible) works too... to not make it take space in the TableRow, use gone instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜