Parámetros básicos

De Manuais Informática - IES San Clemente.
Ir a la navegación Ir a la búsqueda


1

<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".U2_02_ParBasicos" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

</RelativeLayout>


<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".U2_02_ParBasicos" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/textView1"
        android:layout_marginTop="99dp"
        android:layout_toRightOf="@+id/textView1"
        android:text="Button" />

</RelativeLayout>
<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">


    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

</LinearLayout>


<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">


    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="O meu primeiro texto"/>

</LinearLayout>


<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">

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />
    
    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#F00"
        android:layout_marginLeft="20sp"
        android:textStyle="bold"
        android:textSize="22sp"
        android:text="O meu primeiro texto"/> 

    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#000"
        android:textColor="#FFF"
        android:textStyle="bold|italic"
        android:typeface="serif"
        android:text="Negriña, cursiva e serif"/> 
    
    <TextView 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#00F"
        android:textColor="#FFF"
        android:text="Ocupando o ancho do pai"/> 
        
</LinearLayout>


<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">

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />    
       
    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#F00"
        android:layout_marginLeft="20sp"
        android:textStyle="bold"
        android:textSize="22sp"
        android:text="O meu primeiro texto"/> 

    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#000"
        android:textColor="#FFF"
        android:textStyle="bold|italic"
        android:typeface="serif"
        android:text="Negriña, cursiva e serif"/> 
    
    <TextView 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#00F"
        android:textColor="#FFF"
        android:textStyle="bold"
        android:text="Ocupando o ancho do pai"/> 
        
    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="#F00"
        android:textColor="#FFF"
        android:textStyle="bold"
        android:text="Ocupando o resto do alto do pai  "/> 
    
</LinearLayout>
<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">

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />
    
    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#F00"
        android:layout_marginLeft="20sp"
        android:textStyle="bold"
        android:textSize="22sp"
        android:text="O meu primeiro texto"/> 

    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#000"
        android:textColor="#FFF"
        android:textStyle="bold|italic"
        android:typeface="serif"
        android:text="Negriña, cursiva e serif"/> 
    
    <TextView 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="right"
        android:background="#00F"
        android:textColor="#FFF"
        android:textStyle="bold"
        android:text="Ocupando o ancho do pai"/> 
        
    <TextView 
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="right"
        android:background="#F00"
        android:textColor="#FFF"
        android:textStyle="bold"
        android:text="Ocupando o resto do alto do pai  "/>    
        
</LinearLayout>

Imaxes