Home > other >  Is there any way to hide components in the layout editor in android studio?
Is there any way to hide components in the layout editor in android studio?

Time:10-19

I'm building an app using Android Studio and Java. When I'm trying to make the layout in the Layout Editor is there any way to hide components so I can see better? I don't mean using Java when starting the app, I mean in the editor.

CodePudding user response:

you can set

tools:visibility="gone|invisible|visible"

in xml file

tools namespace that enable design-time features so When you build your app, the build tools remove these attributes so there is no effect on your APK size or runtime behavior.

CodePudding user response:

Sure, in XML tools:visibility="gone" on the component.

or in the design view to the right of the component name in the component tree you can click and select tools:visibility there.

CodePudding user response:

Do you ask about the visibility

android:visibility="visible|invisibile|gone"

CodePudding user response:

You can use an XML attribute

android:visibility="gone"

or

android:visibility="invisible"

There is no other way to hide components in editor

  • Related