使用ViewSwitcher与Eclipse IDE [英] Using ViewSwitcher with Eclipse IDE

查看:233
本文介绍了使用ViewSwitcher与Eclipse IDE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新到Android编程和我使用的Eclipse。
我使用ViewSwitcher,并能视图之间来回切换。

I am new to android programming, and I am using eclipse. I am using ViewSwitcher, and able to switch back and forth between views.

我的问题是使用Eclipse。

My question is with eclipse.

在Eclipse中,我怎么能以图形编辑不同的布局?只有第一个布局是可见的,当我选择的水库>布局 - > main.xml中。

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

我知道有一个变通(或者甚至可能是正确的做法);具有两个布局文件,并在它们之间切换。但是,这并不是我的本意,现在。

I know there is a work around (or may be even the right approach); having two layout files, and switching between them. But that is not my intention right now.

感谢您的任何建议。
KARTHIK

Thanks for any suggestions. Karthik

推荐答案

它有点晚了,但我有同样的问题,并通过把在其他文件中的2布局的内容,包括他们得到了周围只用XML的变化原始文件。不知道这是正确的,但它使人们更容易测试。

Its a bit late but I had the same problem and got around it with only xml changes by putting the contents of the 2 layouts in other files and including them in the original file. Not sure if this is proper but it made it easier to test.

<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>

这篇关于使用ViewSwitcher与Eclipse IDE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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