Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] How to set responsive logo in android splash screen in react-native-splash-screen?

Posted on November 14, 2022

Solution 1 :

you are doing it natively

while i have done it with the react native way

import React, { PureComponent } from "react";
import { Image, View } from "react-native";
import { Images, Metrics } from "@common";
import { Navigator } from "@services";
import styles from "./styles";
import SplashScreenComponent from "react-native-splash-screen";

const minDisplayTime = 1000;

class SplashScreen extends PureComponent {
  componentDidMount() {
    SplashScreenComponent.hide();

    setTimeout(() => Navigator.navigate("AuthLoading"), 5000);
  }

  render() {
    return (
      <View style={styles.container}>
        <Image
          source={Images.splashGif}
          style={{ width: '90%', borderWidth: 1, borderColor: '#fff' }}
          resizeMode={"contain"}
        />
      </View>
    );
  }
}

export default SplashScreen;

Problem :

I’m trying to make the logo in android splash screen scale correctly on different android devices.

I followed the instruction of npm react-native-splash-screen.

The splash screen logo scales well on iOS, but on Android it stretches out of screen like the following screenshot.

enter image description here

launch_screen.xml in layout folder:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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_width="match_parent"
        android_layout_height="match_parent"
        android_src="@drawable/launch_screen"
        android_scaleType="centerCrop" />
</RelativeLayout>

Android filter:

enter image description here

Project filter:

enter image description here

Comments

Comment posted by kaizen

Hi, is it possible to remove the default native splash screen?

Comment posted by medium.com/@appstud/…

@TamashiKaizen go through it maybe it might help you

READ  [ANSWERED] android - My phone doesn't show xml of the app as it should
Powered by Inline Related Posts

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress