skip to Main Content

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.

3

Answers


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

    Login or Signup to reply.
  2. Do you ask about the visibility

    android:visibility="visible|invisibile|gone"
    
    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search