S swabygw Active Member Licensed User Longtime User Feb 25, 2017 #1 I tried adding this stars RatingBar via code (not Designer): https://www.b4x.com/android/forum/threads/ratingbar.65266/#content but I get a rectangular object without any stars in it. B4X: Dim rbStars2 As RatingBar rbStars2.Initialize(5, True, "rbStars2") rbStars2.Color = Colors.Yellow rbStars2.Rating = 2 Activity.AddView(rbStars2, 5%x, 50%y, 90%x, 100dip) Can this be used via code or only via the Designer?
I tried adding this stars RatingBar via code (not Designer): https://www.b4x.com/android/forum/threads/ratingbar.65266/#content but I get a rectangular object without any stars in it. B4X: Dim rbStars2 As RatingBar rbStars2.Initialize(5, True, "rbStars2") rbStars2.Color = Colors.Yellow rbStars2.Rating = 2 Activity.AddView(rbStars2, 5%x, 50%y, 90%x, 100dip) Can this be used via code or only via the Designer?
Erel B4X founder Staff member Licensed User Longtime User Feb 26, 2017 #2 You must add it with the designer. You can create a layout file with only the rating bar and load it multiple times. Upvote 0
You must add it with the designer. You can create a layout file with only the rating bar and load it multiple times.