[Android]View positioned as absolute was clipped by parent view
See original GitHub issueDescription
parts of child View which exceed border of parent View should be expected to be visible but not clipped. style parent View with overflow: visible
cannot make it either. IOS is ok
Reproduction Steps
run sample code below
Sample Code
const { width, height } = Dimensions.get('window');
<View style={[{ backgroundColor: '#fff'}]}>
<ScrollView
decelerationRate={0.99}
horizontal={true}
alwaysBounceHorizontal={true}
showsHorizontalScrollIndicator={false}
contentContainerStyle={{paddingLeft: 6, paddingRight: 32, justifyContent: 'center', alignItems: 'center' }}
>
{
list.map((item, index) => {
return (
<View style={[{ height: 36, backgroundColor: '#fff', paddingHorizontal: 6, justifyContent: 'center'}]} >
<Text>{item}</Text>
</View>
)
})
}
</ScrollView>
<View style={{ position: 'absolute', width: width, top: 36, height: 200, borderBottomWidth: 1, borderBottomColor: '#ccc' }}>
<Text>apple</Text>
<Text>banana</Text>
<Text>tea</Text>
<Text>tomato</Text>
<Text>chicken</Text>
</View>
</View>
Solution
Any solution is appreciated.
Additional Information
- React Native version: 0.45.1
- Platform: Android
- Development Operating System: macOS
- Build tools: Android Studio 2.3.3, Android SDK Tools 26.0.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Android View clipped despite all it's parents being set to ...
Background: It's the classic problem of adding a view and moving it outside parent when it gets clipped. My hierarchy is as follows:....
Read more >Relative Layout
RelativeLayout lets child views specify their position relative to the parent view or to each other (specified by ID). So you can align...
Read more >Making fine adjustments to a view's position
Fine-tune the position of the circle within the quadrant by using an offset modifier to shift where the parent view places the circle....
Read more >core/java/android/widget/PopupWindow.java
This will cause the popup to be positioned in absolute screen coordinates.</p> ... @param parent a parent view to get the {@link android.view....
Read more >Layout III: Layout Algorithms
... .com/platform/frameworks/base/+/master/core/java/android/view/View.java) and ... preferences (children will be clipped) - Parent *also decides* position ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Opening an issue doesn’t guarantee a fix, there’s over a 1,000 open right now that have been open for longer, I’m afraid.
You may consider adding screenshots or a link to a Snack as this may make it easier for people to reproduce the issue. Whoever embarks on fixing it has to do this anyway, so it’s respectful of their time to do this work ahead of time if you’re interested in seeing it fixed.
@hramos four days has gone, could you please give some help?