1
我想减少微调器的下拉视图的宽度。 我的下拉查看是CheckedTextView
。 我将宽度设置为CheckedTextView
300dp但它没有帮助。无论如何,它完成了整个显示。如何设置旋钮下拉视图宽度?
P.S。我也想张贴图片,但我没有足够的声望
我想减少微调器的下拉视图的宽度。 我的下拉查看是CheckedTextView
。 我将宽度设置为CheckedTextView
300dp但它没有帮助。无论如何,它完成了整个显示。如何设置旋钮下拉视图宽度?
P.S。我也想张贴图片,但我没有足够的声望
确保您设置的是layout_width
属性而不是width
。
<CheckedTextView
android:id="@+id/myCheckedTextView"
android:layout_width="width_you_want_in_dp"
android:layout_height="wrap_content"/>
你也可以做到这一点编程方式是这样的:
myCheckedTextView.getLayoutParams().width = width_you_want_in_pixels;
希望这有助于!