我的一个布局中有 TextView。我想让它隐藏起来,只想在单击按钮时使其可见,我该怎么做?我的观点如下。谢谢。
<TextView
android:layout_marginBottom="16dp"
android:layout_marginRight="8dp"
android:id="@+id/textAuthorSign"
android:layout_gravity="right"
android:text="- ABJ Abdul Kalam"
android:textStyle="italic"
android:textSize="16sp"
android:typeface="serif"
android:visibility="invisible"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
谢谢
原文由 Rajubhai Rathod 发布,翻译遵循 CC BY-SA 4.0 许可协议
我想你想要一个切换(如问题标题所述)
XML 文件:
爪哇: