如何隐藏/显示一个元素时,pressed一个按钮? [英] How can I hide/show an element when a button is pressed?

查看:146
本文介绍了如何隐藏/显示一个元素时,pressed一个按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想学习如何使用Eclipse IDE开发Android。我想要做的事情是让隐藏TableLayout可见,当一个按钮是pressed。不过,我不知道是什么,我需要把按钮的单击属性。

I'm trying to learn how to develop Android using the Eclipse IDE. What I'm trying to do right now is make a hidden TableLayout visible when a button is pressed. However, I have no idea as to what I need to put in the button's OnClick property.

此外,是否有任何在线教程,可以帮助我了解如何在Eclipse中开发Android应用程序?

Also, are there any tutorials online that could help me learn how to develop Android apps in Eclipse?

谢谢!

推荐答案

也只取TableLayout的由<$ C $使用 findViewById(INT)引用C> onClickListener()。一旦你有TableLayout的对象,调用 setVisibility(View.VISIBLE)

well just take the reference of the TableLayout by using findViewById(int) in the onClickListener(). once you have the object of TableLayout, call setVisibility(View.VISIBLE)

这篇关于如何隐藏/显示一个元素时,pressed一个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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