Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top