Mikhail Krutov
Mikhail Krutov

Reputation: 702

How to show invisible Views in designer?

So, I have a Layout that is

android:visibility="invisible"

is there a way to force ui designer in intellij idea to display such elements at all times?

Upvotes: 0

Views: 149

Answers (2)

Quintin B
Quintin B

Reputation: 5881

According to the documentation you can use the tools xmlns:

tools:visibility="visible"

Android Studio supports a variety of XML attributes in the tools namespace that enable design-time features (such as which layout to show in a fragment) or compile-time behaviors (such as which shrinking mode to apply to your XML resources). When you build your app, the build tools remove these attributes so there is no effect on your APK size or runtime behavior.

To use these attributes, add the tools namespace to the root element of each XML file where you'd like to use them, as shown here:

<RootTag xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" >

Upvotes: 3

Alexander Perfilyev
Alexander Perfilyev

Reputation: 6839

Use this tools:visibility="visible"

Upvotes: 0

Related Questions