【发布时间】:2013-03-06 00:20:19
【问题描述】:
我有两个布局,我想在单击按钮时在彼此之间进行更改。 它们是这样的全屏视图:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF0000"
tools:context=".FullscreenActivity" >
并且我希望它们在单击时在它们之间进行更改
<Button
android:id="@+id/green_button"
style="?buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/green" />
我是否应该更改 src/com.example.layout/fullscreenactivity.java onClick() 中的某些内容,或者我可以在哪里更改以便发生这种情况?
提前致谢
【问题讨论】: