Difference between revisions of "Android App"

From Sinfronteras
Jump to: navigation, search
Line 65: Line 65:
  
 
[[File:10.png|950px|thumb|center|]]
 
[[File:10.png|950px|thumb|center|]]
 +
 +
* LinearLayout
 +
* RelativeLayout
  
 
[[File:11.png|950px|thumb|center|]]
 
[[File:11.png|950px|thumb|center|]]
 +
 +
<syntaxhighlight lang="java">
 +
<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"  />
 +
</syntaxhighlight>
 +
 +
</LinearLayout>
 +
 +
[[File:12.png|950px|thumb|center|]]
 +
 +
https://developer.android.com/guide/topics/ui/layout/linear.html?utm_source=udacity&utm_medium=course&utm_campaign=android_basics
 +
[[File:13.png|950px|thumb|center|]]
 +
 +
 +
[[File:14.png|950px|thumb|center|]]
 +
 +
[[File:15.png|950px|thumb|center|]]
 +
 +
[[File:16.png|950px|thumb|center|]]
 +
[[File:17.png|950px|thumb|center|]]
 +
 +
[[File:18.png|950px|thumb|center|]]
 +
 +
[[File:19.png|950px|thumb|center|]]
 +
[[File:20.png|950px|thumb|center|]]
 +
[[File:21.png|950px|thumb|center|]]
 +
[[File:22.png|950px|thumb|center|]]
 +
[[File:23.png|950px|thumb|center|]]
 +
https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html?utm_source=udacity&utm_medium=course&utm_campaign=android_basics
 +
 +
[[File:24.png|950px|thumb|center|]]
 +
[[File:25.png|950px|thumb|center|]]
 +
[[File:26.png|950px|thumb|center|]]
 +
[[File:27.png|950px|thumb|center|]]
 +
[[File:28.png|950px|thumb|center|]]
 +
[[File:29.png|950px|thumb|center|]]
 +
[[File:30.png|950px|thumb|center|]]
 +
[[File:31.png|950px|thumb|center|]]
 +
[[File:32.png|950px|thumb|center|]]
 +
[[File:34.png|950px|thumb|center|]]
 +
[[File:35.png|950px|thumb|center|]]
 +
[[File:36.png|950px|thumb|center|]]
 +
[[File:37.png|950px|thumb|center|]]
 +
[[File:38.png|950px|thumb|center|]]

Revision as of 12:34, 6 August 2019

Adroid

XML syntax

< TextView                                          //open tag
android:text=Happy Valentines Day                // attributes
android:background=@android:color/darker_gray     // attributes
Android:layout_width=150dp                        // attributes
Android:layout_height=75dp/>                      // attributes and close tag


1.png

For the width / height to be precisely with the size of the content the value will be = “wrap_content”


2.png
3.png
4.png

or

5.png

https://plus.google.com/+AndroidDevelopers/posts/gQuBtnuk6iG

Hex Color

6.png
7.png
<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

8.png
9.png
<TextView
    <ImageView
    android:src="@drawable/cake"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:scaleType="centerCrop"/>

ViewGroups

10.png
  • LinearLayout
  • RelativeLayout
11.png
<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>

12.png

https://developer.android.com/guide/topics/ui/layout/linear.html?utm_source=udacity&utm_medium=course&utm_campaign=android_basics

13.png


14.png
15.png
16.png
17.png
18.png
19.png
20.png
21.png
22.png
23.png

https://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html?utm_source=udacity&utm_medium=course&utm_campaign=android_basics

24.png
25.png
26.png
27.png
28.png
29.png
30.png
31.png
32.png
34.png
35.png
36.png
37.png
38.png