Android App
Adroid
XML syntax
< TextView //open tag
android:text=“Happy Valentine’s Day” // attributes
android:background=“@android:color/darker_gray” // attributes
Android:layout_width=“150dp” // attributes
Android:layout_height=“75dp”/> // attributes and close tag
For the width / height to be precisely with the size of the content the value will be = “wrap_content”
or
https://plus.google.com/+AndroidDevelopers/posts/gQuBtnuk6iG
Hex Color
<TextView
android:text="Happy Valentine's Day Ale eu amo vc de montao :) !"
android:textColor="@android:color/black"
android:background="#FF0266"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="45sp"
android:textStyle="bold"
/>
Image
<TextView
<ImageView
android:src="@drawable/cake"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"/>
ViewGroups
- LinearLayout
- RelativeLayout
<TextView
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Guest List"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp" />
<TextView
android:text="Kunal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp" />
</LinearLayout>