Android Studio - 如何获得 CSS 中的 Overflow
Android Studio - How can I get Overflow as in CSS
我有一个项目,我在父 LinearLayout 上有一个 16dp 的内边距。
在此 LinearLayout 中,我有一个具有高程的卡片视图。
问题在于海拔不会出现在父 div 之外。
在 CSS 中你有 overflow:visible 这个问题,我如何在 Android Studio 中解决这个问题?
帮助将不胜感激:)
我不太确定您要做什么,但我认为您正在寻找 FrameLayout 可以将视图中的元素相互放置的地方。
Child views are drawn in a stack, with the most recently added child on top. The size of the FrameLayout is the size of its largest child (plus padding), visible or not (if the FrameLayout's parent permits). Views that are GONE are used for sizing only if setConsiderGoneChildrenWhenMeasuring() is set to true.
我找到了解决办法!
使用:
app:cardUseCompatPadding="true"
它在 cardview 周围创建了一个小的边缘,所以阴影总是出现!
在这里找到它:xamarin
还有其他卡片视图的好东西! :)
我有一个项目,我在父 LinearLayout 上有一个 16dp 的内边距。
在此 LinearLayout 中,我有一个具有高程的卡片视图。
问题在于海拔不会出现在父 div 之外。
在 CSS 中你有 overflow:visible 这个问题,我如何在 Android Studio 中解决这个问题?
帮助将不胜感激:)
我不太确定您要做什么,但我认为您正在寻找 FrameLayout 可以将视图中的元素相互放置的地方。
Child views are drawn in a stack, with the most recently added child on top. The size of the FrameLayout is the size of its largest child (plus padding), visible or not (if the FrameLayout's parent permits). Views that are GONE are used for sizing only if setConsiderGoneChildrenWhenMeasuring() is set to true.
我找到了解决办法!
使用:
app:cardUseCompatPadding="true"
它在 cardview 周围创建了一个小的边缘,所以阴影总是出现!
在这里找到它:xamarin
还有其他卡片视图的好东西! :)