Tôi đang cố gắng tùy chỉnh thanh tìm kiếm. Tôi có điều này chủ yếu là làm việc, nhưng tôi không thể loại bỏ các cạnh tròn của thanh tìm kiếm này. Tôi biết có rất nhiều câu hỏi liên quan đến điều này, và việc áp dụng các góc 0dp sẽ giúp ích, nhưng tôi không biết phải thực hiện hình dạng này ở đâu. Khi tôi cố gắng để hiển thị hình dạng, nó nhận được các cạnh sắc nét nhưng nền của tôi không hiển thị, nó cho thấy một hình chữ nhật màu đen. Tôi muốn có các cạnh sắc nét với nền của tôi.Xóa các cạnh tròn của thanh công cụ tùy chỉnh?
seekbarprogrss.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@android:id/background">
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:tileMode="repeat"
android:antialias="true"
android:dither="false"
android:filter="false"
android:gravity="left"
android:src="@drawable/cover_back" />
</item>
<item
android:id="@android:id/progress"
android:drawable="@drawable/seek_progress_bg"/>
</layer-list>
seek_progress_bg.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<clip>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/cover_front"
android:tileMode="repeat"
android:antialias="true"
android:dither="false"
android:filter="false"
android:gravity="left"
/>
</clip>
</item>
</layer-list>
thực hiện Seekbar
<SeekBar
android:id="@+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/button2"
android:progress="0"
android:secondaryProgress="0"
android:padding="0dp"
android:thumbOffset="0dp"
android:progressDrawable="@drawable/seekbarprogrss"
android:thumb="@drawable/cover"