如何减少Android中评分栏周围的空间 [英] How to reduce the space around rating bar in android

查看:80
本文介绍了如何减少Android中评分栏周围的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在android中包括了一个等级栏,现在如果等级栏我需要在文本视图的右端放置.但是我没有做同样的事情,因为有很多多余的空间(矩形蓝色框)等级栏周围,这使我无法将textview放置在其紧邻的右侧.有什么办法可以减少评分栏周围的空间,以便使textview和评分栏位于同一行,并且将textview放在评分栏旁边,不要留有缝隙.请为我提供良好的支持!提前致谢!这是我的xml代码.

I have included a rating bar in android, and now I need to place a text view to immediate right if the rating bar.But I failed to do the same since, there is a lot of unwanted space (rectangular blue box) around the rating bar, which prevents me from placing the textview to its immediate right side. Is there any way to reduce this space around the rating bar , so that both the textview and the rating bar comes in same line and textview is placed next to the rating bar without a gap.Please help me with a good support! Thanks in advance! Here is my xml code for it.

<RatingBar
     android:id="@+id/overall"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_marginBottom="70dp"
     android:numStars="5"
     android:rating="0.0"
     android:scaleX="0.4"
     android:scaleY="0.4"
     android:stepSize="0.01" />

推荐答案

您可以使用android默认样式,例如:

You can use android default styles, Like:

style="@android:style/Widget.Holo.Light.RatingBar.Small"

在您的xml布局中.我在上面使用,周围没有空间. 您可以在此处

in you xml layout. I am using above and have no space around it. You can check variants here

这篇关于如何减少Android中评分栏周围的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆