【发布时间】:2018-02-15 12:19:48
【问题描述】:
我曾尝试使用圆形布局、相对布局、约束布局来设计。我已经正确设计了它,但对齐方式在设备之间发生了变化。如何解决这个问题。
<io.github.francoiscampbell.circlelayout.CircleLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cl="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
cl:cl_angleOffset="0"
cl:cl_angle="60"
cl:cl_direction="clockwise"
cl:cl_centerView="@+id/centerView">
<Switch
android:id="@+id/centerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="hii all"
android:textColor="@color/error_color"
android:textSize="18sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<SeekBar
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</io.github.francoiscampbell.circlelayout.CircleLayout>
【问题讨论】:
-
我的关系图如何参考视图平衡布局,以便它可以在任何设备上运行
-
对齐方式我不想从设备更改为设备
-
感谢您的建议,我找到了解决方案,我将删除它