Skip to content

Instantly share code, notes, and snippets.

@stefanhoth
Last active August 29, 2015 14:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanhoth/0bf2d687004037655c4b to your computer and use it in GitHub Desktop.
Save stefanhoth/0bf2d687004037655c4b to your computer and use it in GitHub Desktop.
Override a views visibility at design time using the tools namespace. See line 13 how and don't forget to add line 2. See http://tools.android.com/tips/layout-designtime-attributes for details.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/group_image"
android:src="@drawable/ic_folder"
android:visibility="gone"
tools:visibility="visible"
android:contentDescription="@null" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment