Code Monkey home page Code Monkey logo

Comments (10)

Sundin avatar Sundin commented on May 18, 2024 3

I'm still having layout problems on Android, the child views are not centered properly using alignItems: "center". Works as it should on iOS.

from react-native-cardview.

aranda-adapptor avatar aranda-adapptor commented on May 18, 2024

Strangely, wrapping the children in a normal RN View doesn't work either:

          <CardView
            style={{ height: 100, margin: 20 }}
            cardElevation={2}
            cardMaxElevation={2}
            cornerRadius={0}
          >
            <View
              style={{
                flex: 1,
                justifyContent: "center",
                alignItems: "center"
              }}
            >
              <Text>Elevation 1</Text>
              <Text>Elevation 2</Text>
              <Text>Elevation 3</Text>
              <Text>Elevation 4</Text>
            </View>
          </CardView>

from react-native-cardview.

Kishanjvaghela avatar Kishanjvaghela commented on May 18, 2024

@aranda-adapptor Thanks for issue. I will look into this and fix by end of the day.

from react-native-cardview.

Kishanjvaghela avatar Kishanjvaghela commented on May 18, 2024

@aranda-adapptor I am closing this issue. Please latest version now.

from react-native-cardview.

aranda-adapptor avatar aranda-adapptor commented on May 18, 2024

Thanks for the quick fix!

from react-native-cardview.

est7 avatar est7 commented on May 18, 2024

@Sundin if u dont send cardElevation value nor send '0',it works?

from react-native-cardview.

est7 avatar est7 commented on May 18, 2024

@Sundin i have same issues,did u solve it?

from react-native-cardview.

Sundin avatar Sundin commented on May 18, 2024

@est7 Unfortunately I didn't find a workaround. I used a normal View component with a borderRadius instead (and thus had to sacrifice the shadow/elevation effect). I didn't try cardElevation: 0 but it should have the same effect if it works like you said.

from react-native-cardview.

githubdoramon avatar githubdoramon commented on May 18, 2024

Elevation 0 fixes the issue, but of course removes the shadow. Any updates on this issue?

from react-native-cardview.

YouCii avatar YouCii commented on May 18, 2024

Is 'height' props must required? I think it would be better like View, which 'height' is adaptive according to the height of its sub-layouts

from react-native-cardview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.