Android开发中布局全部堆在左上角

在Android开发中,写完界面发现控件全部堆在左上角

图片[1]-Android开发中布局全部堆在左上角-吾爱博客

解决方法

使用此方法自定义控件位置,在xml控件位置写入

            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintHorizontal_bias="0.526" // 位置
            app:layout_constraintVertical_bias="0.619"  // 位置
图片[2]-Android开发中布局全部堆在左上角-吾爱博客
位置可以自定义了
温馨提示: 本文最后更新于2023-01-30,至今已有544天,某些文章具有时效性,若有错误或已失效,请在下方留言
© 版权声明
THE END
喜欢就支持一下吧❀
点赞0投币 分享
评论 抢沙发

    请登录后查看评论内容