Created
November 3, 2017 08:01
-
-
Save rosuH/4badf99e07f7b0a093d8cd26dfd3e5cd to your computer and use it in GitHub Desktop.
Preview the layout during editing XML files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<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="match_parent" | |
android:orientation="vertical" | |
tools:context="com.example.PreviewLayoutActivity"> | |
<TextView | |
android:id="@+id/answer_text_view" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:padding="24dp" | |
tools:text="Answer"/> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tools:context="your.activity"
to super layouttools:text="Strings you want to preview"
in the compotent which you want to previewThe string
Answer
will only display in the Android Studio preview window and wont show in running app.