-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange size values #23
Comments
I don't know why it shows only 3 starts on Galaxy S4. But the values you have are to be expected. |
@FlyingPumba so it explain how the display is not correct I think. Let's start by the nexus 7. Here is the screen part in full width: The screen is 1080 pixels wide. If the value of 84 pixels for 42 dp is correct then, 5 stars and 4 spaces occupies 84 * 9 = 756 pixels, which seems to be quite logical regarding the screenshot. Now let's consider the Galaxy S4 case: The screen is also 1080 pixels wide.If the value of 126 pixels for 42 dp is correct then, 5 stars and 4 spaces occupies 126* 9 = 1134 pixels, which explains why the 7 stars cannot be displayed. So I think there is something wrong somewhere. I think that for 2 devices with the same screen resolution, the size in pixels should be the same no? Or there is something I didn't undestand. And why getStarSize() returns 0? I think it would be very intersting to have a |
@2ndGAB
Perhaps the problem is related to the fact that you are using the rating bar on a dialog, have you tried a normal layout to see what happens ? |
! ? ! There is a big problem here because it's not the default behavior I see. here is the sample test project. |
@2ndGAB I'll look into the example project. and let you know if I find anything. |
Hello,
I encounter a strange behavior with
app:srb_starSize
andapp:srb_starsSeparation
.I've created a layout with value
42dp
for both of these values, displaying 5 stars.That perfectly render on Nexus7 (1920x1080, 7 inches):
But it only displays 3 stars on a Galaxy S4 (1920x1080, 5.4 inches).
So I wanted to have a look at the star and separation size to see if I have to adapt the values and they are quite surprizing:
On Nexus 7:
ratingBar.getStarSize() = 0.0
ratingBar.getStarsSeparation() = 84.0
On Galaxy S4:
ratingBar.getStarSize() = 0.0
ratingBar.getStarsSeparation() = 126.0
How do you explain these values?
The text was updated successfully, but these errors were encountered: