AppCompatSeekBar左右填充去除了吗? [英] AppCompatSeekBar left and right padding removal?
本文介绍了AppCompatSeekBar左右填充去除了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.SocialMob.CustomViews.CustomTextView
android:id="@+id/textViewCurrentDurationMusic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/_3sdp"
android:singleLine="true"
android:text="01:00"
android:textColor="#AEAEAE"/>
<android.support.v7.widget.AppCompatSeekBar
android:id="@+id/seekBarMusic"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:max="100"
android:paddingLeft="0px"
android:thumbOffset="-1px"
android:paddingRight="0px"
android:progress="60"
android:layout_margin="0dp"
app:theme="@style/SeekBarTheme"
app:paddingEnd="0px"
app:paddingStart="0px" />
<com.SocialMob.CustomViews.CustomTextView
android:id="@+id/textViewTotalDurationMusic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:padding="@dimen/_3sdp"
android:text="05:00"
android:textColor="#AEAEAE"/>
</LinearLayout>
我正在做一个具有SeekBar的音乐播放器应用程序,我想删除SeekBar两端的多余填充.我尝试了0填充,0边距,-ve填充和-ve边距.
Am doing an music player app which has SeekBar, I want to remove extra padding in both ends of SeekBar. I have tried 0 padding, 0 margin, -ve padding and -ve margin.
推荐答案
为什么不尝试通过Java代码对其进行修改.请尝试以下示例代码.
Why not try modify it by java code.try the following sample code.
seekBar.setPadding(0, 0, 0, 0);
这可能会对您有所帮助.
This may helps you.
这篇关于AppCompatSeekBar左右填充去除了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文