我想在我的 android 布局中插入一个像图像 (YouTube) 中那样的栏。 是否有任何现成的小部件来实现这一目标?你会用什么? 两个长方形?进度条样式正确吗?你能举个例子吗? 显然,条形图是动态的,红色/绿色平衡将被恢复 通过网络。 我的目标是 7+ API。 非常感谢。
最佳答案
喜欢和不喜欢可以通过设置它们的可绘制属性来使用 TextView: android:drawableLeft="@drawable/my_icon"
或在代码中:
myTextView.setCompoundDrawablesWithIntrinsicBounds(int left,int top,int right,int bottom)
整数是可绘制资源。如果您什么都不想要,请使用 0。
关于Android 布局 Youtube Like Bar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18980191/