简体   繁体   中英

How can I select a FrameLayout's views in the Graphical Layout Editor?

I have a FrameLayout containing two RelativeLayouts . When I try to use the Graphical Layout tab in ADT, only the two ImageViews in the second RelativeLayout are selectable. The layout looks like this:

<FrameLayout>
    <RelativeLayout>

        <ScrollView>
            <TextView/>
        </ScrollView>

        <ImageView/>

        <ScrollView>
            <TextView/>
        </ScrollView>
    </RelativeLayout>

    <RelativeLayout>
        <ImageView/>

        <ImageView/>
    </RelativeLayout>
</FrameLayout>

Wherever else I click, it selects the entire second RelativeLayout itself, and cannot click on any individual views within the first RelativeLayout .

Is there a way to cycle through the views/layouts so I can edit what I see on screen? Or is this a bug/limitation of the editor?

One very clunky way to do this is to:

  1. Switch to the text editor tab.

  2. Move the cursor within the view XML that you would like to edit.

  3. Switch back to the graphical editor and the element is selected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM