如何在视图上绘制自定义线条

问题描述 投票:0回答:2

有人帮我们, 我使用相对和线性布局进行了此设计,在我需要此自定义行以指示总成员之后,请给我任何资源来完成此任务。

zoom and see this grey lines on image

android android-layout layout
2个回答
1
投票
 <View
    android:layout_width="match_parent"
    android:layout_height="2dp"
    android:layout_marginTop="20dp"
    android:background="#00000f"
    android:rotation="109"
    />

您可以使用View绘制线条,旋转它使用,rotation:视图的旋转,以度为单位。


0
投票

我尝试了很多资源,在我使用约束布局完成这个问题后,我认为这是我处理得很好的新概念,我想建议继续,因为他们有许多修改UI的功能。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.