How can I select a FrameLayout's views in the Graphical Layout Editor?
-
26-06-2021 - |
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?
Soluzione
One very clunky way to do this is to:
Switch to the text editor tab.
Move the cursor within the view XML that you would like to edit.
Switch back to the graphical editor and the element is selected.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow