Android RatingBar weirdness: Whenever I add a RatingBar to my layout, a bunch of the generated tags,
- by Rben
Whenever I use a RatingBar view in my layout, I suddenly get all kinds of compile errors. I'm using Android 2.0, but I've also tried 2.0.1, and 2.1, without joy. I also get a message: Shader 'android.graphics.BitmapShader' is not supported in Layout Editor, and an odd warning which may or maynot be related: warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute.
I've tried using the RatingBar both within a tablelayout and outside it, but it behaves the same way. This is very puzzling and frustrating. Please help if you can.
Sincerely,
Ray
Here's the XML:
<!-- Created By -->
<TableRow
android:layout_height="wrap_content"
android:layout_width="fill_parent" >
<TextView
android:text="Created by: "
android:id="@+id/gi_created_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right" />
<TextView
android:text="Slartibartfast"
android:id="@+id/gi_created"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</TableRow>
<!-- Verification -->
<TableRow
android:layout_height="wrap_content"
android:layout_width="fill_parent"
>
<TextView
android:id="@+id/gi_verification_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="@string/GameInfoVerificationLabelText" />
<TextView
android:id="@+id/gi_verification"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="HonorSystem" />
</TableRow>
<!-- Player Rating Label -->
<TableRow
android:layout_height="wrap_content"
android:layout_width="fill_parent" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:text="@string/GameInfoPlayerRatingLabel" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=" "
/>
</TableRow>
--
<!-- Times played -->
<TableRow
android:layout_height="wrap_content"
android:layout_width="fill_parent"
>
<TextView
android:id="@+id/gi_times_played_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="@string/GameInfoTimesPlayedLabel" />
<TextView
android:id="@+id/gi_times_played"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="999" />
</TableRow>
<!-- Total Players -->
<TableRow
android:layout_height="wrap_content"
android:layout_width="fill_parent"
>
<TextView
android:id="@+id/gi_total_players_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="@string/GameInfoTotalPlayerCountLabel" />
<TextView
android:id="@+id/gi_total_players"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="999" />
</TableRow>
<!-- Total Cancelations -->
<TableRow
android:layout_height="wrap_content"
android:layout_width="fill_parent"
>
<TextView
android:id="@+id/gi_total_cancelations_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="@string/GameInfoTotalCancelsLabel" />
<TextView
android:id="@+id/gi_total_cancels"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="999" />
</TableRow>
<RatingBar
android:id="@+/gi_player_rating"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_span="2"
android:isIndicator="true"
android:numStars="5"
android:rating="3"
android:stepSize="1"
android:layout_gravity="center_vertical"
/>
</TableRow>