Hello, I am making a custom progress bar, and I can't seem to get it
to fill out to the full width of the control. The view is set to fill.
I have extended the ProgressBar view. I am drawing it through xml like
so:

<MyPackage.MyProgressBar android:id="@+id/progress_bar"
                                android:layout_centerInParent="true"
                                android:layout_height="wrap_content" 
style="@style/
MyProgressBarStyle" android:layout_width="fill_parent"/>


My styling is:

<style name="CloudProgressBar">
        <item name="android:indeterminateOnly">false</item>
        <item name="android:progressDrawable">@drawable/
my_progress_bar</item>
        <item name="android:indeterminateDrawable">@drawable/
my_progress_bar</item>
        <item name="android:minHeight">50dip</item>
        <item name="android:maxHeight">50dip</item>
    </style>

But when it renders, the actual progress bar only consumes about 3/4
of the actual view, no matter what I set the min/max width to. I know
that the whole view itself is filling the window because I am drawing
a box around the control to view its canvas area:

canvas.drawRect(0, 0, getWidth()-1, getHeight()-1, mPaint);

Do I have to do something special to get the progress bar to fill out
the window?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to