question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Layout issues in Android ?

See original GitHub issue

Checkout the issues in Android. zIndex doesn’t work properly. One layout renders over the other in Android. IOS looks fine.

Android

android

IOS

ios

IOS layout is proper. The android layout is cut. Also, applying zIndex didn’t work. The source code is provided here

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
marcesengelcommented, Oct 10, 2017

Something like that

class Root extends React.Component {
  state = {
    top: 0
  }

  onLayout = ({ nativeEvent: { layout: { y } } }) => this.setState({ top: y })

  render() {
    return (
      <View>
        <Controls onLayout={this.onLayout} />
        <ControlsFirstLineOverlay style={{
          position: 'absolute',
          top: this.state.top
        }} />
      </View>
    )
  }
}

In your Controls component, you’ll also have to pass on the onLayout to your wrapping View. Also you’ll have to give it a paddingTop in order to not make the ControlsFirstLineOverly overlap your other buttons.

1reaction
marcesengelcommented, Oct 10, 2017

It does, but it always position relative to it’s first parent container, as he’ll always be position: relative - that’s the point 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improve layout performance - Android Developers
Optimize layout hierarchies: In the same way that a complex web page can slow down load time, a complex layout hierarchy can also...
Read more >
Layout Inspector. Debugging UI issues can be tricky… - Medium
Layout Inspector in Action · Open Android Studio 4.0 and select New Project from File menu. · Select Bottom Navigation Activity, click Next...
Read more >
How to solve layout issues in android studio - Stack Overflow
1 Answer 1 ... Your layout has no constraints. Please review the documentation on the valid ConstraintLayout XML attributes you can use to...
Read more >
Debugging UI issues with Layout Inspector - YouTube
Android Studio 4.0 comes with an updated Layout Inspector that lets you debug your Android app UI in a way that's similar to...
Read more >
Android Studio - GridLayout larger than Device ... - Issue Tracker
The issue that I've run into is that the layout is always wider than the device screen. Basically, if I use a 2...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found