Skip to content

How to create a Simple Screen in native android, Flutter and React-native -ReactNative- lecturer #30

Description

@AsimAyman
  1. paste the image you will use to Drawable folder so you can find it by path
  2. res>layout>Activity-main.xml this it the flie we design our app in
  3. RelativeLayout means that all design items is related to the frame
  4. make the layout fill all screen width and hight
android:layout_width="match_parent"
android:layout_height="match_parent"
  1. give the image path
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    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"
    android:background="#3b5998"
    >

    <ImageView
        android:layout_width="200dp"
        android:layout_height="100dp"
        android:src="@drawable/facebook"
        android:layout_centerInParent="true"

        >


    </ImageView>

</RelativeLayout >

Create facebook splash by native android code
Screenshot from 2022-03-02 10-24-28

[React Native - Environment Setup]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions