triniwiz / nativescript-star-ratings

NativeScript star ratings UI component plugin.
Apache License 2.0
22 stars 8 forks source link

Size of the stars #7

Open teckloide opened 6 years ago

teckloide commented 6 years ago

Make sure to check the demo app(s) for sample usage

checked

Make sure to check the existing issues in this repository

checked

If the demo apps cannot help and there is no issue for your problem, tell us about it

how can i modify the size of the stars

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

labidiaymen commented 6 years ago

Especially in Android

cerireyhan commented 6 years ago

@teckloide @labidiaymen Were you able to set the size of stars?

labidiaymen commented 6 years ago

@cerireyhan Nope

asqwrd commented 6 years ago

is this still being developed? Any idea how we can extend this to be able to change the size of the stars

grizlizli commented 6 years ago

I am also interested into making stars smaller. Is this plugin still in development?

topclaudy commented 5 years ago

You may use android:scaleX=".5" android:scaleY=".5" on the element for example. You'll need to tweak the extra padding.

imperatormk commented 5 years ago

You'll need to tweak the extra padding.

@topclaudy Any ideas on how do to that?

KirilOkun commented 4 years ago

tried using android:scale as mentioned above but the whole component gets scaled and it loses the 5th start. only 4 stars are visible. i've tried all sorts of ways to increase the width of the scaled component to show the 5th start but nothing worked. has anybody figured this out?

After digging some more the size of stars on Android is set by the native component and can't be changed without losing interactivity. The only solution is to change the layout to have the stars on it's own line.

Quote:

A RatingBar is an extension of SeekBar and ProgressBar that shows a rating in stars. 
The user can touch/drag or use arrow keys to set the rating when using the default size RatingBar. 
The smaller RatingBar style ( R.attr.ratingBarStyleSmall) and the larger indicator-only style (R.attr.ratingBarStyleIndicator) do not support user interaction and should only be used as indicators.

When using a RatingBar that supports user interaction, placing widgets to the left or right of the RatingBar is discouraged.
nice2seeu commented 3 years ago

-- you can change the star size -- platforms > ios > Pods > Cosmos > Cosmos > CosmosDefaultSettings.swift /// Size of a single star. static var starSize: Double = 20

liamcharmer commented 3 years ago

-- you can change the star size -- platforms > ios > Pods > Cosmos > Cosmos > CosmosDefaultSettings.swift /// Size of a single star. static var starSize: Double = 20

Is this really a solution though??

Rashids5776 commented 3 years ago

any updates on this issue?