简体   繁体   English

相对布局android无法正常工作

[英]Relative layout android doesn't work correctly

有谁知道为什么相对布局无法正常工作,每当我应用它时,所有元素都会出现在布局的顶部。

You have to apply rules for your views inside like 您必须为内部视图应用规则,例如

android:layout_above

Or 要么

android:layout_below

Check out constraint layout is a new layout where you can set constraints by hand 签出约束布局是一种新布局,您可以在其中手动设置约束

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android:相对布局选择器不起作用 - Android: Relative Layout Selector Doesn't Work 底部边距或填充在android上的xml中的相对布局中不起作用 - bottom margin or padding doesn't work in relative layout in xml on android Android Studio的约束布局无法正常工作 - Constraints Layout of Android Studio doesn't work correctly OnTouchListener 不适用于相对布局 - OnTouchListener doesn't work with relative layout 布局放置不正确? (仍然无效) - Layout is not placed correctly? (Still doesn't work) 在Android API 19 Kitkat4.4.2中无法为相对布局添加边距 - Adding margin to relative layout doesn't work with Android API 19 Kitkat4.4.2 应用于相对布局时,为什么重力不起作用? - Why doesn't gravity work when applied to Relative Layout? Horizo​​ntalScrollView的RelativeLayout中的布局相对锚点无法按预期工作 - Layout relative anchor in a RelativeLayout in a HorizontalScrollView doesn't work as intended 在相对布局中对齐到底部时,填充无效 - Padding doesn't work when aligned to bottom in Relative Layout 相对布局似乎总是只适用于抽屉布局或框架布局,两个孩子都不能一起工作 - Relative layout always seems to work for only drawer layout or frame layout, both child doesn't work together
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM