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开发中布局全部堆在左上角-吾爱博客
位置可以自定义了
© 版权声明
THE END
喜欢就支持以下吧
点赞0 分享
评论 抢沙发

请登录后发表评论