Hello,
I have a strange problem. I want to use the standard ratingBar in my
app.
I want to put in in an alertdialog, like it is done in the android
market app.
In the emulator it looks quite good. Same as I run the API demo
ratingBar1.
But if I run it on my Desire froyo it looks strange. Between the stars
is a lot of space.
So I can see only 3 stars on the screen.
And also the stars are slightly cut off at the bottom. Especially if
I
rotate the screen.
The same problem occurs with the API demo rantingBar1 on my htc
desire.
But the google market rating dialog with the 5 stars looks great. The
stars a lot of smaller.
Can someone plz give me a hint!
Here is the code:
AlertDialog.Builder builder5 = new AlertDialog.Builder(this);
builder5.setTitle("test");
builder5.setCancelable(false);
builder5.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
function code
}
}).setNegativeButton("Abbrechen",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
LinearLayout layout1 = new LinearLayout(this);
// layout1.setOrientation(LinearLayout.VERTICAL);
ratingBar = new RatingBar(this);
ratingBar.setPadding(0, 0, 0, 50);
// ratingBar.setRating(5.0f);
ratingBar.setOnRatingBarChangeListener(this);
ratingBar.setNumStars(5);
ratingBar.setStepSize(1);
layout1.addView(ratingBar);
builder5.setView(layout1);
dialog = builder5.show();
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en