-3

I added nav bar in my app. But after adding nav bar It's visible in Editor view and I can't edit My Content below this nav bar.

How to hide this Nav bar?

image :

enter image description here

Dhruv Tyagi
  • 814
  • 1
  • 9
  • 28

3 Answers3

1

In the xml add on your root layout , i suppose that it's a DrawerLayout, the attribute : xmlns:tools="http://schemas.android.com/tools"

Then in your Toolbar layout add the attribute tools:visibility="invisible"

tools allow you to set value only visible on the editor.

Hope this helps.

Cochi
  • 2,199
  • 2
  • 12
  • 15
1

I solved this issue

in <android.support.v4.widget.DrawerLayout add this tools:openDrawer="end"

it will hide nav bar during editing in the android studio.

0

While Editing Use This

nav.setVisibility(View.GONE)
Vijay Chaudhary
  • 228
  • 2
  • 12