Using ViewSwitcher with the Eclipse IDE

I am new to Android programming and I am using eclipse. I use ViewSwitcher and can switch between views.

My question is with eclipse.

In eclipse, how can I graphically edit various layouts? Only the first layout is displayed when I select res-> layout-> main.xml.

I know that there is work (or maybe even the right approach); with two layout files and switching between them. But that is not my intention right now.

Thanks for any suggestions. Kartik

+1
source share
3 answers

, , xml-, . , , .

<ViewSwitcher
    android:id="@+id/detailSwitcher"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent">

    <include  
        layout="@layout/layout_file_1" /> 

    <include  
        layout="@layout/layout_file_2" /> 
</ViewSwitcher>
+2

. XML , , , . , . , , , , , .

0

You just need to change the sequence of layouts in the view switcher. The first layout in the viewswitcher is visible in eclipse. Edit your first layout, which is in the view switch, then move the second to work on it.

0
source

All Articles