Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the position of the image and title? I want title above the Image. #99

Open
shima93 opened this issue Dec 10, 2020 · 3 comments

Comments

@shima93
Copy link

shima93 commented Dec 10, 2020

No description provided.

@kkmehta03
Copy link

Hey @shima93 did you get around on how to achieve this? I want to do something similar.
Thanks!

@shima93
Copy link
Author

shima93 commented May 26, 2021

Hey @KhyatiMehta3,
I actually did a trick to get what I wanted. My way is not 100% the right one. But you can try.
As you can see for the title and subtitle I put an empty string and made a block of jsx in the image property.
hope it helps you. If you found a better way let me know.

 pages={[
          {
            title: "",
            subtitle: "",
            backgroundColor: Colors.Background,
            image: (
              <SafeAreaView>
                <View>
                  <Text style={styles.headerTop}>WELCOME!</Text>
                </View>
                <View style={styles.imageContainer}>
                  <Image
                    style={{
                      height: "190%",
                      width: isIphoneX() ? "115%" : "100%",
                      resizeMode: "contain",
                    }}
                    source={require("../../assets/onboarding-1.png")}
                  />
                  <TouchableOpacity
                    style={styles.buttonBackground}
                    onPress={() => {  }}
                  >
                    <Text style={styles.button}> GET STARTED</Text>
                  </TouchableOpacity>
                </View>
              </SafeAreaView>
            ),
          },
           ]}

@jotilohana
Copy link

jotilohana commented Oct 30, 2021

I just put the same code and add absolute property with some left ,right positions.
if there is any better way please let me know.

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

No branches or pull requests

4 participants