Inicio » Blog » Android

27 junio, 2020

¿Como hacer una app Android para Restaurante? III

TERCERA PARTE Desarrollo de un aplicativo móvil en Android cuya finalidad es mostrar información de un restaurante a los usuarios

¿Como hacer una app Android para Restaurante? III

Suscríbete a nuestro canal en Youtube

Suscríbirse

7. SECCIÓN OFERTAS:

Muestra una única oferta que consta de un diseño promocional contenido en un ImageView.

<?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:layout_margin="10dp"
 android:padding="10dp"
 android:background="@color/colorAccent"
 android:gravity="center_horizontal"
 android:orientation="vertical"
 tools:context=".OfertasActivity">
 <ImageView
 android:src="@drawable/cinta"
 android:adjustViewBounds="true"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <ImageView
 android:src="@drawable/oferta"
 android:id="@+id/oferta"
 android:adjustViewBounds="true"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <TextView
 android:text="GRAN OFERTA POR NAVIDAD"
 android:layout_width="match_parent"
 android:gravity="center_horizontal"
 android:layout_height="wrap_content"/>
<TextView
 android:text="30% DE DESCUENTO si te apellidas Vizcarra"
 android:textSize="30dp"
 android:textColor="@color/colorWhite"
 android:gravity="center_horizontal"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <TextView
 android:text="Oferta dispponible todo el mes de DICIEMBRE
2019"
 android:gravity="center_horizontal"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
</LinearLayout>

JAVA:

package apptiva.arequipa.huaca;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class OfertasActivity extends AppCompatActivity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_ofertas);
 }
}

8. SECCIÓN EMPRESA

Muestra información de la empresa, reseña.

<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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:gravity="center"
 android:background="@color/colorPrimaryDark"
 android:layout_height="match_parent"
 tools:context=".EmpresaActivity">
 <LinearLayout
 android:orientation="vertical"
 android:layout_margin="10dp"
 android:padding="10dp"
 android:background="@color/colorWhite"
 android:layout_width="match_parent"
 android:layout_height="wrap_content">
 <ImageView
 android:src="@drawable/header"
 android:adjustViewBounds="true"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <ImageView
 android:src="@drawable/cinta"
 android:adjustViewBounds="true"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <TextView
 android:text="EL RESTAURANT"
 android:paddingTop="30dp"
 android:paddingBottom="20dp"
 android:textSize="30dp"
 android:gravity="center"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <View
 android:background="@color/colorPrimary"
android:layout_width="match_parent"
 android:layout_height="5dp"/>
 <TextView
 android:layout_marginTop="10dp"
 android:text="La Huaca Pucllana mantiene con justificado
orgullo una filosofía culinaria cuyo concepto fundamental radica en
utilizar como base los sabores del Perú, interpretando de acuerdo a
las técnicas clásicas de cocina, así como a los estilos contemporáneos
y a las exigencias de los paladares más exquisitos. Con el calificado
aporte de Arturo Rubio, promotor del restaurant, y de nuestras chefs
Marilú Madueño y Andrea Massaro, el restaurant ofrece una comida
renovada cuyo cimiento es la cocina peruana, con su riquísima variedad
de productos, llámense pescados de mar, mariscos, o lo que forma el
inmenso abanico de vegetales, con todos los colores, texturas y
sabores. "
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <TextView
 android:text="En el siglo V de nuestra era, los habitantes
del Valle de Lima iniciaron la construcción de la Huaca Pucllana.
Pucllana fue, pues, un importante centro ceremonial y administrativo.
Su grandeza está reflejada en la configuración de una arquitectura
monumental, hecha en adobe pequeño y forjada sobre la base de
continuos adosamientos y remodelaciones, realizados durante los tres
siglos que tuvo vigencia."
 android:layout_width="match_parent"
 android:layout_marginTop="10dp"
 android:layout_height="wrap_content"/>
 <TextView
 android:text="Arequipa, 18/11/2019."
 android:layout_width="match_parent"
 android:gravity="right"
 android:layout_marginTop="10dp"
 android:layout_height="wrap_content"/>
 </LinearLayout>
</ScrollView>

JAVA

package apptiva.arequipa.huaca;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class EmpresaActivity extends AppCompatActivity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_empresa);
 }
}

9. SECCIÓN CONTACTO:

Muestra los datos de contacto del restaurante.

<?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:gravity="center"
 android:orientation="vertical"
 android:background="@color/colorPrimaryDark"
 android:layout_height="match_parent"
 tools:context=".ContactoActivity">
 <ImageView
 android:src="@drawable/cinta"
 android:adjustViewBounds="true"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <LinearLayout
 android:orientation="vertical"
 android:layout_margin="10dp"
 android:padding="10dp"
 android:background="@color/colorWhite"
 android:layout_width="match_parent"
 android:layout_height="wrap_content">
 <TextView
 android:text="RESERVAS"
 android:paddingTop="30dp"
 android:paddingBottom="20dp"
 android:textSize="30dp"
 android:gravity="center"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
<TextView
 android:text="FIJO: 054 000000"
 android:gravity="center"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <TextView
 android:text="CEL: 999 999 999"
 android:gravity="center"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 <TextView
 android:text="atencionalcliente@gmail.com"
 android:gravity="center"
 android:layout_marginBottom="20dp"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>
 </LinearLayout>
</LinearLayout>

JAVA:

package apptiva.arequipa.huaca;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class ContactoActivity extends AppCompatActivity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_contacto);
 }
}

 


Leido 4264 veces

Compartir link del tutorial con tus amigos


Aprende más sobre Android

Cursos de programación

Codea Codea App

México, Colombia, España, Venezuela, Argentina, Bolivia, Perú

© Todos los derechos reservados Codea App | ...de frente al código!!! | 2020 - 2023