Android - Make dotter line - Drawable

Create drawable file: dotter_line.xml

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:width="1dp"
android:color="#BDBDBD"
android:dashGap="8dp"
android:dashWidth="7dp" />
</shape>

Want rotate? create another drawable file:

<rotate
android:fromDegrees="90"
android:toDegrees="90"
android:drawable="@drawable/dotter_line"/>

Use in View: maybe need this :

android:layerType="software"

Nhận xét

Bài đăng phổ biến từ blog này

Android - Date Time - Lấy giá trị ngày, giờ theo định dạng tùy biến trong Android Studio

Android - Custom SearchView - Tạo khung tìm kiếm đơn giản trong Android Studio

Android - Image - Take Photo, Choose Photo from Gallery - Xử lý chụp ảnh, lấy ảnh trong Android Studio