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.

Fab not visible or in wrong position when put inside Content

See original GitHub issue

react-native, react and native-base version

{
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "scripts": {
    "test": "node ./node_modules/jest/bin/jest.js --watch"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/samples": "2.1.1",
    "@expo/vector-icons": "^6.2.1",
    "expo": "^23.0.0",
    "firebase": "^4.6.2",
    "moment": "^2.19.3",
    "native-base": "^2.3.3",
    "react": "16.0.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-23.0.0.tar.gz",
    "react-native-datepicker": "^1.6.0",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-navigation": "^1.0.0-beta.19",
    "react-redux": "^5.0.6",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.2.0",
    "validate.js": "^0.12.0"
  },
  "devDependencies": {
    "jest-expo": "^23.0.0"
  }
}

Expected behaviour

Fab is shown like the example.

Actual behaviour

if Content contains only Fab: Fab is invisible

if Content contains other components: Fab is shown in the wrong position (e.g. right top when is should be bottomRight)

Steps to reproduce (code snippet or screenshot)

<Content style={{flex: 1}}>
  <Fab position="bottomRight">
    <Icon name="add"/>
  </Fab>
</View>

(note: adding or removing flex=1 has no effect)

I think I’m using this wrong…

Please add a Fab demo to KitchenSink that uses Fab with Content and List (which is a typical use case, rather than an empty View like current examples)

Screenshot of emulator/device

screenshot_20171208-104150

Is the bug present in both ios and android or in any one of them?

Tested in Android 7.0 only.

Any other additional info which would help us debug the issue quicker.

Please add a Fab demo to KitchenSink that uses Fab with Content and List (which is a typical use case, rather than an empty View like current examples)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SupriyaKalghatgicommented, Jan 2, 2018

@oferRounds Container, FAB, Content, List Try wrapping in this order

0reactions
SupriyaKalghatgicommented, Jan 31, 2018

I have opened this issue on the docs repo here: #69 Since we split the docs and the source into separate repos.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Floating Action Button in wrong position - Stack Overflow
I was able to fix this issue by either removing the app:layout_anchor property from the fab or by reverting to an older version...
Read more >
Objects Are Not Visible - Revit - Autodesk Knowledge Network
Use this checklist to troubleshoot why objects are not visible in a view.
Read more >
Handling Scrolls with CoordinatorLayout - CodePath Cliffnotes
When a Snackbar is rendered, it normally appears at the bottom of the visible screen. To make room, the floating action button must...
Read more >
Flutter FloatingActionButton: A complete tutorial with examples
Learn all about Flutter's FloatingActionButton widget, including how to customize the FloatingAppButton and how to add hero animations.
Read more >
FloatingActionButton class - material library - Dart API
A floating action button is a circular icon button that hovers over content to promote a primary action in the application. Floating action...
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