how to get RatingBar value
<p>how to read and display rating bar value</p>

<p>i[0] // should be selected value</p>

<pre><code>private OnClickListener onclickbutton1 = new OnClickListener() {
    public void onClick(View v) {


        int[] i = new int[]{ R.id.mRatingBar};

        statusMessage.setText("value is " + i[0]);
    }
};
</code></pre>

<p>// this works</p>

<p>private OnClickListener onclickbutton1 = new OnClickListener() {
    public void onClick(View v) {</p>

<pre><code>    RatingBar mBar = (RatingBar) findViewById(R.id.mRatingBar);

    float[] i = new float[]{ mBar.getRating() };

    statusMessage.setText("value is.. " + i[0]);

}
</code></pre>

<p>};</p>
