本文介绍了如何在API 17以上的Andr​​oid搜索栏全宽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要让搜索栏全宽,没有填充。

I want to make seekbar full width with no padding.

我已经看到了这个答案
How使搜索栏占用父的全宽度

I've seen this answerHow to make SeekBar take up full width of parent

但在API 17岁以上这是行不通的。有左的填充和搜索栏右侧。我如何删除这个填充?

but in api 17 and above it doesn't work. there is a padding in left and right of seekbar. how do i remove this padding?

推荐答案

在运行时只设置填充!它现在是确定

just set padding at run time! and it's OK now

musicSeekbar.setPadding(0,0,0,0);

这篇关于如何在API 17以上的Andr​​oid搜索栏全宽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 18:34