React Native - View disappears when position is absolute on Android

前端 未结 6 1362
温柔的废话
温柔的废话 2021-02-14 08:04

Whenever I made the position style \'absolute\' for this view, it disappears. I have no idea why it is happening.

import React, { Component } from \'react\';
imp         


        
6条回答
  •  离开以前
    2021-02-14 08:19

    I've just experienced this problem and it seems like specifying minWidth and minHeight for the parent of 'absolute' positioned elements solves the problem.

    EDIT: Actually specifying width and height also solves it.

    Here is the updated snack. See line 11.

提交回复
热议问题