1

Youtube Likes Bar

I'd like to insert a bar like that in the image (YouTube) in my android layout. Is there any ready-to use widget to achieve that? What would you use? Two rectangles? A progress bar correctly styled? Can you please provide an example? Obviously the bar will be dynamic and the red/green balance will be retrieved over the net. I'm targeting 7+ API. Many thanks.

Jumpa
  • 4,319
  • 11
  • 52
  • 100

2 Answers2

1

The likes and dislikes can use a TextView by settings their drawable properties: android:drawableLeft="@drawable/my_icon"

or in code :

    myTextView.setCompoundDrawablesWithIntrinsicBounds(int left,int  top,int  right,int     bottom)

the ints are drawable resources. Use 0 if you want nothing there.

KennyC
  • 593
  • 4
  • 12
0

There is no such control in android. You have to use the custom progress bar.for this u look for this below link

http://eagle.phys.utk.edu/guidry/android/progressBarExample.html

also to custom the progress u can refer this link

How to Customize a Progress Bar In Android

To show the like and dislike You have to use the imageview. There is no other way to do this

Community
  • 1
  • 1
Nithinlal
  • 4,845
  • 1
  • 29
  • 40