Skip to content

Instantly share code, notes, and snippets.

@pedromaironi
Created March 6, 2021 03:34
Show Gist options
  • Save pedromaironi/eb6c3ae17ae612e837fa9e8704cfffbc to your computer and use it in GitHub Desktop.
Save pedromaironi/eb6c3ae17ae612e837fa9e8704cfffbc to your computer and use it in GitHub Desktop.
MainActivity.md

Main activity

In this activity in the design we will only use two buttons, the colors can be found in the values ​​folder and also in material palett. Material palette The icons in Flaticon - icons

<?xml version="1.0" encoding="utf-8"?>  
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:fitsSystemWindows="true"  
  android:background="@color/colorPrimary"  
  tools:context=".MainActivity">  
  
  <LinearLayout  
  android:layout_width="match_parent"  
  android:layout_height="match_parent"  
  android:orientation="vertical"  
  >  
  
      <ImageView  
  android:layout_width="150dp"  
  android:layout_height="150dp"  
  android:src="@drawable/ic_car_red"  
  android:layout_gravity="center"  
  android:layout_marginTop="50dp"  
  
  />  
  
  
      <TextView  
  android:layout_width="match_parent"  
  android:layout_height="wrap_content"  
  android:textColor="@color/colorWhite"  
  android:text="Uber clone es un aplicativo similar a Uber"  
  android:textAlignment="center"  
  android:layout_margin="40dp"  
  android:textSize="20sp"  
  android:textStyle="bold"  
  />  
  
      <LinearLayout  
  android:layout_width="match_parent"  
  android:layout_height="match_parent"  
  android:orientation="horizontal"  
  android:gravity="bottom"  
  android:layout_margin="20dp"  
  >  
  
          <Button  
  android:layout_width="0dp"  
  android:layout_weight="1"  
  android:layout_height="wrap_content"  
  android:text="SOY CONDUCTOR"  
  android:background="@drawable/rounded_button"  
  android:backgroundTint="@color/colorAccent"  
  android:textColor="@color/colorWhite"  
  android:layout_marginRight="4dp"  
  />  
  
          <Button  
  android:layout_width="0dp"  
  android:layout_weight="1"  
  android:layout_height="wrap_content"  
  android:background="@drawable/rounded_button"  
  android:backgroundTint="@color/colorWhite"  
  android:text="SOY CLIENTE"  
  android:textColor="@color/colorBlack"  
  />  
  
  
      </LinearLayout>  
 </LinearLayout></androidx.coordinatorlayout.widget.CoordinatorLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment