I made a custom seekbar using 2 png images for my android app. One image is the background, and other is the bar which shows progress. Both are of the same length and width. On small screens( ~5"), it displays perfectly. But on larger screens( ~8"), a small gap is present on the upper bar, and a small part of the lower bar is visible from that gap, as shown in picture:
I checked the 2 .png files, and there is no problem in them. Also, this gap only shows up on big screened devices. What could be causing this?
Edit: Added the XML for the seekbar area:
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.1333333333333333"
android:scaleType="fitXY">android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="false"
android:scaleType="fitXY"
android:contentDescription="@string/p"
android:src="@drawable/volbar" />android:id="@+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_margin="10dp"
android:scaleType="fitXY"
android:minHeight="5dip"
android:maxHeight="5dip"
android:progressDrawable="@drawable/styled_progress"
android:thumb="@drawable/thumb"
android:thumbOffset="13.5dp"
android:paddingRight="13.5dp"
android:paddingLeft="13.5dp"
android:indeterminate="false" />
.
stackoverflow.comm
No comments:
Post a Comment