SlideShare a Scribd company logo
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
PRACTICA I
EJERCICIO 1: LISTA DE INVITADOS
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray" >
<TextView
android:text="Lista de Invitados"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#4CAF50"
android:textSize="24sp" />
<TextView
android:text="Oswaldo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#4CAF50"
android:textSize="24sp" />
<TextView
android:text="Axel"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:background="#4CAF50"
android:textSize="24sp" />
<TextView
android:text="Elian"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#4CAF50"
android:textSize="24sp" />
</LinearLayout>
}
Conclusion: Aprendi mediante commandos sencillos un poco de la programación que ofrece
AS
EJERCICIO1:
LISTA DE
INVITADOS
EJERCICIO2:
LISTA DE
INVITADOSEN
PANTALLA
COMPLETA
EJERCICIO3:
INSERTAR
UNA IMAGEN
EJERCICIO4:
RELATIVE
LAYOUT
EJERCICIO5:
RELATIVE
LAYOUT EN
OBJETOS
EJERCICIO6:
MARGENES
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
EJERCICIO 2: LISTA DE INVITADOS EN PANTALLA COMPLETA
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray" >
<TextView
android:text="Lista de Invitados"
android:layout_width="match_parent"
android:layout_weight="1"
android:background="#4CAF50"
android:textSize="24sp" />
<TextView
android:text="Oswaldo"
android:layout_width="match_parent"
android:layout_weight="1"
android:background="#4CAF50"
android:textSize="24sp" />
<TextView
android:text="Axel“
android:layout_width="match_parent“
android:layout_weight="1"
android:background="#4CAF50"
android:textSize="24sp" />
<TextView
android:text="Elian"
android:layout_width="match_parent"
android:layout_weight="1"
android:background="#4CAF50"
android:textSize="24sp" />
</LinearLayout>
Conclusiones: Utilizamos la propiedad de peso para organizar nuestros textview, asi como
el modo de que nuestros cuadros de texto tuvieran determinado tamaño
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
EJERCICIO 3: INSERTAR UNA IMAGEN
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray">
<ImageView
android:layout_width="wrap_content"
android:layout_height="345dp"
android:layout_weight="1"
android:scaleType="centerCrop"
android:src="@drawable/pan" />
<TextView
android:text="You're invited!"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@android:color/white"
android:background="#009688"
android:textSize="54sp" />
<TextView
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_width="match_parent"
android:background="#009688"
android:text="Bonfire at the beach"
android:textColor="@android:color/white"
android:textSize="34sp" />
</LinearLayout>
Conclusiones: Aprendi a insertar imágenes en AS y de ese modo mejorar las distintas apps
que realice durante el curso en cuestión
EJERCICIO 4: RELATIVE LAYOUT
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp" >
<TextView
android:text="I'm in this corner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" />
<TextView
android:text="Wait, I'm here"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
<TextView
android:text="Wait, I'm here"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true" />
<TextView
android:text="Actually, I'm here"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true" />
</RelativeLayout>
Conclusión:
Conclusiones: Mediante el uso de relative layout pude organizar los elementos en
pantalla del modo en que estuviera alineados a alguno de los márgenes existentes.
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
EJERCICIO 5: RELATIVE LAYOUT EN OBJETOS
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<?xml version="1.0" encoding="utf-8"?>
<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:background="@android:color/holo_orange_dark"
android:backgroundTint="@android:color/holo_orange_dark">
<TextView
android:id="@+id/lyla_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alingParentLeft="true"
android:text="Lyla"
android:textSize="24sp" />
<TextView
android:id="@+id/me_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@id/lyla_text_view"
android:text="Me"
android:textSize="24sp" />
<TextView
android:id="@+id/natalie_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Natalie"
android:textSize="24sp" />
<TextView
android:id="@+id/jennie_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="Jennie"
android:textSize="24sp" />
<TextView
android:id="@+id/kunal_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="kunal"
android:textSize="24sp" />
<TextView
android:id="@+id/ben_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/kunal_text_view"
android:text="Ben"
android:textSize="24sp" />
<TextView
android:id="@+id/Amy_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@id/jennie_text_view"
android:text="Amy"
android:textSize="24sp" />
<TextView
android:id="@+id/Omoju_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/jennie_text_view"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="Omoju"
android:textSize="24sp" />
<TextView
android:id="@+id/Kagure_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="Kagure"
android:textSize="24sp" />
</RelativeLayout>
</RelativeLayout>
Conclusiones: Con el uso del relative layout pude anclar algunos
objetos y ponerlos a la izquierda, arriba o debajo de distintos
elementos en pantalla, permitiendo organizar mis objetos.
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
EJERCICIO 6: MARGENES
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_margin="10dp"
android:src="@drawable/sergio2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:scaleType="centerCrop" />
<TextView
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="You're invited"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=""
android:textColor="@android:color/white"
android:textSize="34sp"
android:background="#009688" />
<TextView
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:text="Bonfire at the beach"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:textColor="@android:color/white"
android:textSize="34sp"
android:background="#009688"/>
</Lin
Conclusión: El progrema me permitio delimitar los limites de mis textos en pantalla.
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
PRACTICA II
EJERCICIO 1: BOTONES VERTICALES
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.lap_c_pc06.pruebalayout2.MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button14"
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button17"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button18"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button19"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
</ScrollView>
</LinearLayout>
Conclusión: En conclusión esta practica sirvió para aprender a dominar el uso de botones
y el scrollview permitiéndome hacer apps con pantalla deslizante.
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
EJERCICIO 2: BOTONES VERTICALES Y HORIZONTALES
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical“
tools:context="com.example.lap_c_pc06.pruebalayout2.MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/button60"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button59"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button58"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button57"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button56"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button55"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button54"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button53"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button52"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button51"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button50"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button49"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button48"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button47"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button46"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button45"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button44"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button43"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
<Button
android:id="@+id/button41"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:text="Button" />
</LinearLayout>
</ScrollView>
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
<Button
android:id="@+id/button42"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button78"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button77"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
<Button
android:id="@+id/button76"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button75"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button74"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button73"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button72"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button71"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button70"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button69"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button68"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button67"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button66"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button65"
android:layout_width="wrap_content"
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button64"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button63"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button62"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
<Button
android:id="@+id/button61"
android:layout_width="wrap_content"
android:layout_height="223dp"
android:layout_weight="1"
android:backgroundTint="@android:color/holo_green_dark"
android:text="Button" />
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
Conclusiones: Mediante el uso de dos scrollviews aprendi a como
usar pantalla dividida para una sola app.
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
PRACTICA 3
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
tools:context="com.example.lab_c_pc_27.myapplication.MainActivity">
<ImageView
android:id="@+id/imageView"
android:layout_width="96dp"
android:layout_height="112dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.029"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/CETIS" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="68dp"
android:text="Bienvenidos"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.469"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/button"
android:layout_width="54dp"
android:layout_height="38dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Off"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView6" />
<Button
android:id="@+id/button2"
android:layout_width="73dp"
android:layout_height="40dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Salir"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.972"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.982" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="A la programación"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.22"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:layout_constraintVertical_bias="0.086" />
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
<TextView
android:id="@+id/textView3"
android:layout_width="80dp"
android:layout_height="17dp"
android:layout_marginBottom="328dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:text="Con android"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.594"
app:layout_constraintStart_toEndOf="@+id/textView2" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="272dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:text="Estudiante de bachillerato"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Un mundo fantastico te espera"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView4"
app:layout_constraintVertical_bias="0.113" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Con Android"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.581" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Estas preparado?"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView6"
app:layout_constraintVertical_bias="0.176" />
<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="No te arrepentiras"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.924" />
</android.support.constraint.ConstraintLayout>
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
Conclusiones: Mediante el uso de lo aprendido anteriormente
hicimos una interfaz de bienvenida al cetis
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
PRACTICA 4 Calculadora
Layouts:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.lap_c_pc30.myapplication.MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Escribe un numero"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.031"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.048" />
<EditText
android:id="@+id/editText_num"
android:layout_width="179dp"
android:layout_height="51dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="52dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="Numero"
android:inputType="numberDecimal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.073"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.126" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:onClick="Verificar"
android:text="Determinar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.501"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.476" />
<TextView
android:id="@+id/textView_resultado"
android:layout_width="wrap_content"
android:layout_height="31dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:hint="Resultado"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.501"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.661" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:onClick="Lim"
android:text="Borrar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.863" />
</android.support.constraint.ConstraintLayout>
Java código:
package com.example.lap_c_pc17.proyaecto2actividad4;
import android.annotation.SuppressLint;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
public class MainActivity extends AppCompatActivity {
public EditText insr, insnum1,insnum2;
@SuppressLint("WrongViewCast")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
insnum1=(EditText)findViewById(R.id.primern);
insnum2=(EditText)findViewById(R.id.segunn);
insr=(EditText)findViewById(R.id.result);
}
public void operacionesSuma(View view)
{
float suma;
float n1 = Float.parseFloat(insnum1.getText().toString());
float n2 = Float.parseFloat(insnum2.getText().toString());
suma = n1 + n2;
insr.setText(String.valueOf(suma));
}
public void operacionesresta(View view)
{
float resta;
float n1 = Float.parseFloat(insnum1.getText().toString());
float n2 = Float.parseFloat(insnum2.getText().toString());
resta = n1 - n2;
insr.setText(String.valueOf(resta));
}public void operacionesmultiplicacion(View view)
{
float multiplicacion;
float n1 = Float.parseFloat(insnum1.getText().toString());
float n2 = Float.parseFloat(insnum2.getText().toString());
multiplicacion = n1 * n2;
insr.setText(String.valueOf(multiplicacion));
}public void operacionesdivision(View view)
{
float division;
float n1 = Float.parseFloat(insnum1.getText().toString());
float n2 = Float.parseFloat(insnum2.getText().toString());
division = n1/n2;
insr.setText(String.valueOf(division));
}
}
Conclusión: Mediante el uso de botonos y edit text,consegui construir una
computadora y a añadir funciones a mis apps como suma resta
multiplicación y división
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
Practica 5
Comprador de numeros pares
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_green_light"
tools:context="com.example.lap_c_pc26.deter.MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="248dp"
android:layout_height="28dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="76dp"
android:text="Escribe un numero"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/lolete"
android:layout_width="wrap_content"
android:layout_height="51dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="72dp"
android:ems="10"
android:hint="Introduce tu numero"
android:inputType="numberDecimal"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.506"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="300dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:onClick="Verificar"
android:text="Comprobar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lolete"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/t_r"
android:layout_width="194dp"
android:layout_height="37dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:hint="Resultado"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button" />
<Button
android:id="@+id/button2"
android:layout_width="124dp"
android:layout_height="wrap_content"
android:onClick="Limpan"
android:text="Limpiar pantalla"
tools:layout_editor_absoluteX="39dp"
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
tools:layout_editor_absoluteY="402dp" />
</android.support.constraint.ConstraintLayout>
Código de operaciones:
package com.example.lap_c_pc26.deter;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
public EditText numero;
public TextView resultado;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
numero=(EditText)findViewById(R.id.lolete);
resultado=(TextView)findViewById(R.id.t_r);
}
public void Verificar(View view){
int num;
String respuesta;
num=Integer.parseInt(numero.getText().toString());
if (num%2==0)
respuesta="Numero Par";
else
respuesta="Numero impar";
resultado.setText(respuesta);
}
public void Limpan(View view){
resultado.setText("");
numero.setText("");
}
}
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
Practica 6
Calculadora con RadioButtons
Layouts:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:id="@+id/num1"
android:layout_width="380dp"
android:layout_height="55dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="Introcuce el primer numero "
android:inputType="numberDecimal"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<TextView
android:id="@+id/textView"
android:layout_width="180dp"
android:layout_height="34dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:text="Calculadora"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/num2"
android:layout_width="375dp"
android:layout_height="47dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="Introduce el segundo numero"
android:inputType="numberDecimal"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/num1" />
<RadioButton
android:id="@+id/sum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="28dp"
android:text="Suma"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.029"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/num2" />
<RadioButton
android:id="@+id/res"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:text="Resta"
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.029"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sum" />
<RadioButton
android:id="@+id/mul"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:text="Multiplicación"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.03"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/res" />
<RadioButton
android:id="@+id/div"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:text="División"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.031"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mul" />
<EditText
android:id="@+id/resul"
android:layout_width="367dp"
android:layout_height="64dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:ems="10"
android:hint="Resultado"
android:inputType="numberDecimal"
android:textSize="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/Borrar"
android:layout_width="158dp"
android:layout_height="124dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="212dp"
android:onClick="borrar"
android:text="Borrar"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/num1"
app:layout_constraintTop_toTopOf="parent" />
Codigo operaciones:
package com.example.stone.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.RadioButton;
public class MainActivity extends AppCompatActivity {
public EditText num1;
public EditText num2;
public EditText resul;
public RadioButton rs,rr,rm,rd;
@Override
Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G”
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
num1=(EditText)findViewById(R.id.num1);
num2=(EditText)findViewById(R.id.num2);
resul=(EditText)findViewById(R.id.resul);
rs=(RadioButton)findViewById(R.id.sum);
rr=(RadioButton)findViewById(R.id.res);
rm=(RadioButton)findViewById(R.id.mul);
rd=(RadioButton)findViewById(R.id.div);
}
public void operacion(View view){
float n1,n2,res;
n1=Float.parseFloat(num1.getText().toString());
n2=Float.parseFloat(num2.getText().toString());
if (rs.isChecked()==true){
res=n1+n2;
resul.setText(String.valueOf(res));
}else if(rr.isChecked()==true){
res=n1+n2;
resul.setText(String.valueOf(res));
}
else if(rm.isChecked()==true){
res=n1*n2;
resul.setText(String.valueOf(res));
}else if(rd.isChecked()==true){
res=n1/n2;
resul.setText(String.valueOf(res));
}
}
public void borrar(View view){
num1.setText("");
num2.setText("");
resul.setText("");
}
}
Conclusiones: Durante el parcial aprendi muchos conocimientos de
desarrollo de apps gracias a mi gran maestra Lourdes Ramírez
VillaSeñor y entre ellas se encuentra esta calculadora eficiente.

More Related Content

DOCX
Portafolio de evidencias
Jimena Rendon
 
PPTX
Portafolio2
Miroslava Montalvo
 
PPTX
Portafolio
marioorozco2g
 
DOCX
Portafolio de evidencias
Sahory Ramirez
 
DOCX
Portafolio segundo parcial
Amado Alejandro Ibarra Cervantes
 
PPTX
Portafolio2
Miroslava Montalvo
 
PPTX
Portafolio mar
marioorozco2g
 
PPTX
Reportes de actividades
Erick Soltero
 
Portafolio de evidencias
Jimena Rendon
 
Portafolio2
Miroslava Montalvo
 
Portafolio
marioorozco2g
 
Portafolio de evidencias
Sahory Ramirez
 
Portafolio segundo parcial
Amado Alejandro Ibarra Cervantes
 
Portafolio2
Miroslava Montalvo
 
Portafolio mar
marioorozco2g
 
Reportes de actividades
Erick Soltero
 

What's hot (9)

RTF
Documento
Bio Business Group
 
PDF
メンテナブルでありつづけるためのCSS設計
拓樹 谷
 
DOCX
Portafolio 2do parcial
Kevin Pérez
 
PDF
Why Sass?
拓樹 谷
 
PDF
Thinking about CSS Architecture
拓樹 谷
 
TXT
Johny see book update
Ahmad Syaifudin
 
TXT
thiết kế website bằng blogspot
Làm seo blogspot miễn phí
 
PDF
CSS設計の理想と現実
拓樹 谷
 
メンテナブルでありつづけるためのCSS設計
拓樹 谷
 
Portafolio 2do parcial
Kevin Pérez
 
Why Sass?
拓樹 谷
 
Thinking about CSS Architecture
拓樹 谷
 
Johny see book update
Ahmad Syaifudin
 
thiết kế website bằng blogspot
Làm seo blogspot miễn phí
 
CSS設計の理想と現実
拓樹 谷
 
Ad

More from Sergio Muñiz (20)

DOCX
Actividad 10 diagrama de instalacion
Sergio Muñiz
 
DOCX
Actividad 7 "Crucigrama Android"
Sergio Muñiz
 
PPTX
Actividad 9 "Cuadro comparativo SO"
Sergio Muñiz
 
PPTX
Actividad 6 linea del tiempo
Sergio Muñiz
 
PPTX
Actividad 5 organigrama
Sergio Muñiz
 
PPTX
Actividad 3 cuadro comparativo de lenguajes
Sergio Muñiz
 
PPTX
Actividad 2 Comparacion Software
Sergio Muñiz
 
PPTX
Actividad 2 cuadro comparativo
Sergio Muñiz
 
PPTX
Actividad 1 Mapa conceptual
Sergio Muñiz
 
DOCX
Portafolio poo segundo parcial sergio muñiz
Sergio Muñiz
 
PPTX
Portafolio segundo Parcial Programación
Sergio Muñiz
 
PPTX
Ejercicio 20
Sergio Muñiz
 
PPTX
Ejercicio 19
Sergio Muñiz
 
PPTX
Ejercicio 18
Sergio Muñiz
 
PPTX
Ejercicio 17
Sergio Muñiz
 
PPTX
Ejercicio 16
Sergio Muñiz
 
PPTX
Ejercicio 15
Sergio Muñiz
 
PPTX
Ejercicio 14
Sergio Muñiz
 
PPTX
Ejercicio 13
Sergio Muñiz
 
PPTX
Ejercicio 9
Sergio Muñiz
 
Actividad 10 diagrama de instalacion
Sergio Muñiz
 
Actividad 7 "Crucigrama Android"
Sergio Muñiz
 
Actividad 9 "Cuadro comparativo SO"
Sergio Muñiz
 
Actividad 6 linea del tiempo
Sergio Muñiz
 
Actividad 5 organigrama
Sergio Muñiz
 
Actividad 3 cuadro comparativo de lenguajes
Sergio Muñiz
 
Actividad 2 Comparacion Software
Sergio Muñiz
 
Actividad 2 cuadro comparativo
Sergio Muñiz
 
Actividad 1 Mapa conceptual
Sergio Muñiz
 
Portafolio poo segundo parcial sergio muñiz
Sergio Muñiz
 
Portafolio segundo Parcial Programación
Sergio Muñiz
 
Ejercicio 20
Sergio Muñiz
 
Ejercicio 19
Sergio Muñiz
 
Ejercicio 18
Sergio Muñiz
 
Ejercicio 17
Sergio Muñiz
 
Ejercicio 16
Sergio Muñiz
 
Ejercicio 15
Sergio Muñiz
 
Ejercicio 14
Sergio Muñiz
 
Ejercicio 13
Sergio Muñiz
 
Ejercicio 9
Sergio Muñiz
 
Ad

Portafolio 2do Parcial

  • 1. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” PRACTICA I EJERCICIO 1: LISTA DE INVITADOS <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/darker_gray" > <TextView android:text="Lista de Invitados" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#4CAF50" android:textSize="24sp" /> <TextView android:text="Oswaldo" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#4CAF50" android:textSize="24sp" /> <TextView android:text="Axel" android:layout_width="wrap_content" android:layout_height="50dp" android:background="#4CAF50" android:textSize="24sp" /> <TextView android:text="Elian" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#4CAF50" android:textSize="24sp" /> </LinearLayout> } Conclusion: Aprendi mediante commandos sencillos un poco de la programación que ofrece AS EJERCICIO1: LISTA DE INVITADOS EJERCICIO2: LISTA DE INVITADOSEN PANTALLA COMPLETA EJERCICIO3: INSERTAR UNA IMAGEN EJERCICIO4: RELATIVE LAYOUT EJERCICIO5: RELATIVE LAYOUT EN OBJETOS EJERCICIO6: MARGENES
  • 3. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” EJERCICIO 2: LISTA DE INVITADOS EN PANTALLA COMPLETA <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/darker_gray" > <TextView android:text="Lista de Invitados" android:layout_width="match_parent" android:layout_weight="1" android:background="#4CAF50" android:textSize="24sp" /> <TextView android:text="Oswaldo" android:layout_width="match_parent" android:layout_weight="1" android:background="#4CAF50" android:textSize="24sp" /> <TextView android:text="Axel“ android:layout_width="match_parent“ android:layout_weight="1" android:background="#4CAF50" android:textSize="24sp" /> <TextView android:text="Elian" android:layout_width="match_parent" android:layout_weight="1" android:background="#4CAF50" android:textSize="24sp" /> </LinearLayout> Conclusiones: Utilizamos la propiedad de peso para organizar nuestros textview, asi como el modo de que nuestros cuadros de texto tuvieran determinado tamaño
  • 4. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” EJERCICIO 3: INSERTAR UNA IMAGEN <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/darker_gray"> <ImageView android:layout_width="wrap_content" android:layout_height="345dp" android:layout_weight="1" android:scaleType="centerCrop" android:src="@drawable/pan" /> <TextView android:text="You're invited!" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:textColor="@android:color/white" android:background="#009688" android:textSize="54sp" /> <TextView android:layout_height="wrap_content" android:layout_weight="1" android:layout_width="match_parent" android:background="#009688" android:text="Bonfire at the beach" android:textColor="@android:color/white" android:textSize="34sp" /> </LinearLayout> Conclusiones: Aprendi a insertar imágenes en AS y de ese modo mejorar las distintas apps que realice durante el curso en cuestión EJERCICIO 4: RELATIVE LAYOUT
  • 5. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="16dp" > <TextView android:text="I'm in this corner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" /> <TextView android:text="Wait, I'm here" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" /> <TextView android:text="Wait, I'm here" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" /> <TextView android:text="Actually, I'm here" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentRight="true" /> </RelativeLayout> Conclusión: Conclusiones: Mediante el uso de relative layout pude organizar los elementos en pantalla del modo en que estuviera alineados a alguno de los márgenes existentes.
  • 6. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” EJERCICIO 5: RELATIVE LAYOUT EN OBJETOS <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <?xml version="1.0" encoding="utf-8"?> <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:background="@android:color/holo_orange_dark" android:backgroundTint="@android:color/holo_orange_dark"> <TextView android:id="@+id/lyla_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alingParentLeft="true" android:text="Lyla" android:textSize="24sp" /> <TextView android:id="@+id/me_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_toRightOf="@id/lyla_text_view" android:text="Me" android:textSize="24sp" /> <TextView android:id="@+id/natalie_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Natalie" android:textSize="24sp" /> <TextView android:id="@+id/jennie_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:text="Jennie" android:textSize="24sp" /> <TextView android:id="@+id/kunal_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:text="kunal" android:textSize="24sp" /> <TextView android:id="@+id/ben_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_toRightOf="@id/kunal_text_view" android:text="Ben" android:textSize="24sp" /> <TextView android:id="@+id/Amy_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_toLeftOf="@id/jennie_text_view" android:text="Amy" android:textSize="24sp" /> <TextView android:id="@+id/Omoju_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/jennie_text_view" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:text="Omoju" android:textSize="24sp" /> <TextView android:id="@+id/Kagure_text_view" android:layout_width="wrap_content" android:layout_height="wrap_content"
  • 7. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:text="Kagure" android:textSize="24sp" /> </RelativeLayout> </RelativeLayout> Conclusiones: Con el uso del relative layout pude anclar algunos objetos y ponerlos a la izquierda, arriba o debajo de distintos elementos en pantalla, permitiendo organizar mis objetos.
  • 8. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” EJERCICIO 6: MARGENES <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_margin="10dp" android:src="@drawable/sergio2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:scaleType="centerCrop" /> <TextView android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="You're invited" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="" android:textColor="@android:color/white" android:textSize="34sp" android:background="#009688" /> <TextView android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginBottom="10dp" android:text="Bonfire at the beach" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="0" android:textColor="@android:color/white" android:textSize="34sp" android:background="#009688"/> </Lin Conclusión: El progrema me permitio delimitar los limites de mis textos en pantalla.
  • 9. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” PRACTICA II EJERCICIO 1: BOTONES VERTICALES <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.lap_c_pc06.pruebalayout2.MainActivity"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <Button android:id="@+id/button2" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button3" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button4" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button5" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button6" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button8" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button7" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button9" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button10" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button11" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button12" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button13" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button14"
  • 10. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button15" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button16" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button17" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button18" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button19" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> <Button android:id="@+id/button20" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> </LinearLayout> </ScrollView> </LinearLayout> Conclusión: En conclusión esta practica sirvió para aprender a dominar el uso de botones y el scrollview permitiéndome hacer apps con pantalla deslizante.
  • 11. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” EJERCICIO 2: BOTONES VERTICALES Y HORIZONTALES <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical“ tools:context="com.example.lap_c_pc06.pruebalayout2.MainActivity"> <ScrollView android:layout_width="match_parent" android:layout_weight="1"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <Button android:id="@+id/button60" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button59" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button58" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button57" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button56" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button55" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button54" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button53" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button52" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button51" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button50" android:layout_width="match_parent" android:layout_height="wrap_content"
  • 12. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button49" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button48" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button47" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button46" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button45" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button44" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button43" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> <Button android:id="@+id/button41" android:layout_width="match_parent" android:layout_height="wrap_content" android:backgroundTint="@color/colorPrimary" android:text="Button" /> </LinearLayout> </ScrollView> <HorizontalScrollView android:layout_width="match_parent" android:layout_weight="1"> <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:orientation="horizontal" <Button android:id="@+id/button42" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button78" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button77" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" />
  • 13. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” <Button android:id="@+id/button76" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button75" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button74" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button73" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button72" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button71" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button70" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button69" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button68" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button67" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button66" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button65" android:layout_width="wrap_content"
  • 14. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button64" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button63" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button62" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> <Button android:id="@+id/button61" android:layout_width="wrap_content" android:layout_height="223dp" android:layout_weight="1" android:backgroundTint="@android:color/holo_green_dark" android:text="Button" /> </LinearLayout> </HorizontalScrollView> </LinearLayout> Conclusiones: Mediante el uso de dos scrollviews aprendi a como usar pantalla dividida para una sola app.
  • 15. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” PRACTICA 3 <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/colorPrimary" tools:context="com.example.lab_c_pc_27.myapplication.MainActivity"> <ImageView android:id="@+id/imageView" android:layout_width="96dp" android:layout_height="112dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.029" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/CETIS" /> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="68dp" android:text="Bienvenidos" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.469" app:layout_constraintStart_toEndOf="@+id/imageView" app:layout_constraintTop_toTopOf="parent" /> <Button android:id="@+id/button" android:layout_width="54dp" android:layout_height="38dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:text="Off" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView6" /> <Button android:id="@+id/button2" android:layout_width="73dp" android:layout_height="40dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:text="Salir" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.972" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.982" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:text="A la programación" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.22" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/imageView" app:layout_constraintVertical_bias="0.086" />
  • 16. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” <TextView android:id="@+id/textView3" android:layout_width="80dp" android:layout_height="17dp" android:layout_marginBottom="328dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:text="Con android" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.594" app:layout_constraintStart_toEndOf="@+id/textView2" /> <TextView android:id="@+id/textView4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="272dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:text="Estudiante de bachillerato" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> <TextView android:id="@+id/textView5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:text="Un mundo fantastico te espera" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="@+id/textView4" app:layout_constraintVertical_bias="0.113" /> <TextView android:id="@+id/textView6" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:text="Con Android" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.581" /> <TextView android:id="@+id/textView7" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:text="Estas preparado?" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView6" app:layout_constraintVertical_bias="0.176" /> <TextView android:id="@+id/textView8" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:text="No te arrepentiras" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.924" /> </android.support.constraint.ConstraintLayout>
  • 17. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” Conclusiones: Mediante el uso de lo aprendido anteriormente hicimos una interfaz de bienvenida al cetis
  • 18. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” PRACTICA 4 Calculadora Layouts: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.lap_c_pc30.myapplication.MainActivity"> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:text="Escribe un numero" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.031" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.048" /> <EditText android:id="@+id/editText_num" android:layout_width="179dp" android:layout_height="51dp" android:layout_marginBottom="8dp" android:layout_marginEnd="52dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:ems="10" android:hint="Numero" android:inputType="numberDecimal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.073" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.126" /> <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:onClick="Verificar" android:text="Determinar" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.501" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.476" /> <TextView android:id="@+id/textView_resultado" android:layout_width="wrap_content" android:layout_height="31dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:hint="Resultado" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.501" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.661" /> <Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp"
  • 19. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:onClick="Lim" android:text="Borrar" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.863" /> </android.support.constraint.ConstraintLayout> Java código: package com.example.lap_c_pc17.proyaecto2actividad4; import android.annotation.SuppressLint; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; public class MainActivity extends AppCompatActivity { public EditText insr, insnum1,insnum2; @SuppressLint("WrongViewCast") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); insnum1=(EditText)findViewById(R.id.primern); insnum2=(EditText)findViewById(R.id.segunn); insr=(EditText)findViewById(R.id.result); } public void operacionesSuma(View view) { float suma; float n1 = Float.parseFloat(insnum1.getText().toString()); float n2 = Float.parseFloat(insnum2.getText().toString()); suma = n1 + n2; insr.setText(String.valueOf(suma)); } public void operacionesresta(View view) { float resta; float n1 = Float.parseFloat(insnum1.getText().toString()); float n2 = Float.parseFloat(insnum2.getText().toString()); resta = n1 - n2; insr.setText(String.valueOf(resta)); }public void operacionesmultiplicacion(View view) { float multiplicacion; float n1 = Float.parseFloat(insnum1.getText().toString()); float n2 = Float.parseFloat(insnum2.getText().toString()); multiplicacion = n1 * n2; insr.setText(String.valueOf(multiplicacion)); }public void operacionesdivision(View view) { float division; float n1 = Float.parseFloat(insnum1.getText().toString()); float n2 = Float.parseFloat(insnum2.getText().toString()); division = n1/n2; insr.setText(String.valueOf(division)); } } Conclusión: Mediante el uso de botonos y edit text,consegui construir una computadora y a añadir funciones a mis apps como suma resta multiplicación y división
  • 21. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” Practica 5 Comprador de numeros pares <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/holo_green_light" tools:context="com.example.lap_c_pc26.deter.MainActivity"> <TextView android:id="@+id/textView" android:layout_width="248dp" android:layout_height="28dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="76dp" android:text="Escribe un numero" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <EditText android:id="@+id/lolete" android:layout_width="wrap_content" android:layout_height="51dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="72dp" android:ems="10" android:hint="Introduce tu numero" android:inputType="numberDecimal" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.506" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView" /> <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="300dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:onClick="Verificar" android:text="Comprobar" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/lolete" app:layout_constraintVertical_bias="0.0" /> <TextView android:id="@+id/t_r" android:layout_width="194dp" android:layout_height="37dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="24dp" android:hint="Resultado" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/button" /> <Button android:id="@+id/button2" android:layout_width="124dp" android:layout_height="wrap_content" android:onClick="Limpan" android:text="Limpiar pantalla" tools:layout_editor_absoluteX="39dp"
  • 22. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” tools:layout_editor_absoluteY="402dp" /> </android.support.constraint.ConstraintLayout> Código de operaciones: package com.example.lap_c_pc26.deter; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity { public EditText numero; public TextView resultado; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); numero=(EditText)findViewById(R.id.lolete); resultado=(TextView)findViewById(R.id.t_r); } public void Verificar(View view){ int num; String respuesta; num=Integer.parseInt(numero.getText().toString()); if (num%2==0) respuesta="Numero Par"; else respuesta="Numero impar"; resultado.setText(respuesta); } public void Limpan(View view){ resultado.setText(""); numero.setText(""); } }
  • 23. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” Practica 6 Calculadora con RadioButtons Layouts: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <EditText android:id="@+id/num1" android:layout_width="380dp" android:layout_height="55dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:ems="10" android:hint="Introcuce el primer numero " android:inputType="numberDecimal" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView" /> <TextView android:id="@+id/textView" android:layout_width="180dp" android:layout_height="34dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:text="Calculadora" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <EditText android:id="@+id/num2" android:layout_width="375dp" android:layout_height="47dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:ems="10" android:hint="Introduce el segundo numero" android:inputType="numberDecimal" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/num1" /> <RadioButton android:id="@+id/sum" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="28dp" android:text="Suma" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.029" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/num2" /> <RadioButton android:id="@+id/res" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="16dp" android:text="Resta"
  • 24. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.029" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/sum" /> <RadioButton android:id="@+id/mul" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="16dp" android:text="Multiplicación" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.03" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/res" /> <RadioButton android:id="@+id/div" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="24dp" android:text="División" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.031" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/mul" /> <EditText android:id="@+id/resul" android:layout_width="367dp" android:layout_height="64dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:ems="10" android:hint="Resultado" android:inputType="numberDecimal" android:textSize="24dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> <Button android:id="@+id/Borrar" android:layout_width="158dp" android:layout_height="124dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="212dp" android:onClick="borrar" android:text="Borrar" android:textSize="24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="1.0" app:layout_constraintStart_toStartOf="@+id/num1" app:layout_constraintTop_toTopOf="parent" /> Codigo operaciones: package com.example.stone.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.RadioButton; public class MainActivity extends AppCompatActivity { public EditText num1; public EditText num2; public EditText resul; public RadioButton rs,rr,rm,rd; @Override
  • 25. Portafolio:SergioEduardoMuñizGonzález Grado y Grupo:4”G” protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); num1=(EditText)findViewById(R.id.num1); num2=(EditText)findViewById(R.id.num2); resul=(EditText)findViewById(R.id.resul); rs=(RadioButton)findViewById(R.id.sum); rr=(RadioButton)findViewById(R.id.res); rm=(RadioButton)findViewById(R.id.mul); rd=(RadioButton)findViewById(R.id.div); } public void operacion(View view){ float n1,n2,res; n1=Float.parseFloat(num1.getText().toString()); n2=Float.parseFloat(num2.getText().toString()); if (rs.isChecked()==true){ res=n1+n2; resul.setText(String.valueOf(res)); }else if(rr.isChecked()==true){ res=n1+n2; resul.setText(String.valueOf(res)); } else if(rm.isChecked()==true){ res=n1*n2; resul.setText(String.valueOf(res)); }else if(rd.isChecked()==true){ res=n1/n2; resul.setText(String.valueOf(res)); } } public void borrar(View view){ num1.setText(""); num2.setText(""); resul.setText(""); } } Conclusiones: Durante el parcial aprendi muchos conocimientos de desarrollo de apps gracias a mi gran maestra Lourdes Ramírez VillaSeñor y entre ellas se encuentra esta calculadora eficiente.