ProgressBar / SeekBar Height

by bestpriv...@googlemail.com » Sat, 28 Mar 2009 17:06:36 GMT


Sponsored Links
 I would like do decrease the height of my seekbar. I tried for hours
but I just  do not get it. I use a custom drawable so I guess that
this is the place to specify the size:


<shape xmlns:android=" http://schemas.android.com/apk/res/android" ;
type="rectangle">
   <gradient android:startColor="@color/player_seek_bar_2"
   android:centerColor="@color/player_seek_bar_1"
   android:endColor="@color/player_seek_bar_2"
   android:angle="270"/>
   <size android:width="50dp" android:height="50dp"/>
   <stroke android:width="2dp" android:color="#FFFFFFFF"/>
   <corners android:radius="3dp" />
</shape>


However, modifying the size attributes has no effect. Adjusting the
size attributes in the layout file  changes the size only by clipping
the seekbar. This is may layout:


<SeekBar android:id="@+id/progressSeekBar"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="5sp"
                android:max="100"
                android:progress="0"
                        android:layout_weight="20"
                        
android:progressDrawable="@drawable/player_progress_seek_bar"/>

--~--~---------~--~----~------------~-------~--~----~



ProgressBar / SeekBar Height

by birds fly » Sat, 28 Mar 2009 19:43:20 GMT


 hi ,

      I have modify the seekbar size of height, you can read of it that
source code res/style.xml,
where located in ANDROID_HOME/tools/lib/res/default/values/style.xml
What I means,you need to  modify the seekbar style and override old style.
default style:
    <style name="Widget.SeekBar">
        <item name="android:indeterminateOnly">false</item>
        <item
name="android:progressDrawable">@android:drawable/progress_horizontal</item>
        <item
name="android:indeterminateDrawable">@android:drawable/progress_horizontal</item>
        <item name="android:minHeight">20dip</item>
        <item name="android:maxHeight">20dip</item>
        <item name="android:thumb">@android:drawable/seek_thumb</item>
        <item name="android:thumbOffset">8px</item>
    </style>

You try it. Thanks.

On Sat, Mar 28, 2009 at 5:05 PM, bestpriv...@googlemail.com <




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


ProgressBar / SeekBar Height

by bestpriv...@googlemail.com » Sat, 28 Mar 2009 23:12:53 GMT


 Many thanks. Works fine now :-)




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. TextView - line break

Is it possible to make TextView to break words in the middle and then
move to another line, instead moving whole word that doesn't fit to
the new line  ?
I have a  width and number of lines of the TextView and a long string
and want to calculate which portion of the String will fit exactly.
the code is
                TextView vTextShort = (TextView) findViewById
(R.id.story_text_partial);
                int lineHeight = vTextShort.getLineHeight();
                int nmbLines = mesuredHeight / lineHeight;
                Paint mPaint = vTextShort.getPaint();
                String shortTextStr = mStoryText;
                mStoryBreakIdx = 0;
                vTextShort.setLines(nmbLines );
                int breakText = mPaint.breakText(mStoryText.toCharArray(), 0,
mStoryText.length(), mesuredWidth, null);
                mStoryBreakIdx = breakText * nmbLines;
It seems to calculate number of chars accurately but not accounting
for the space that left after word is moved to a new line if it
doesn't fit fully.
And i'm looking on how to either break words in the middle or how
calculate a width of the text that will fit correctly.

--~--~---------~--~----~------------~-------~--~----~

2. Import java.microedition.*... A solution please...

I am trying to convert my midlet to android...

Is there someone who know how to
import javax.microedition.lcdui.*
import javax.microedition.m3g.*

in android? I think that this should be possible, but how can I import
this class?
Please don't tell to use google class instead, I need and I want to
use microedition class...

Is this possible?
THANKS!!!!

--~--~---------~--~----~------------~-------~--~----~

3. market upload issues

4. Google Docs, again

5. How get multiple phone number which are associated with a single contact.

6. Perf and usability : How to lazy load an image from the web ?

7. Rendering the G1 screen on a computer screen via VNC software?