Positionning the spinning wheel in a custom progress dialog
Asked Answered
R

1

0

I'm using the custom progress dialog given here, which as the style shown below. The spinning wheel is centered, and I can't find how to set a custom position to it.

Anybody can help?

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="NewDialog">
        <item name="android:windowFrame">@null</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowTitleStyle">@null</item>
        <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
        <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
        <item name="android:background">@android:color/transparent</item>
    </style>    
</resources>
Respondence answered 12/10, 2011 at 10:16 Comment(0)
F
0

Use ProgressBar in your layout . You can place it any position you want in your screen.

<ProgressBar android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                style="?android:attr/progressBarStyle"              
                android:id="@+id/showProgress"/>
Felisafelise answered 12/10, 2011 at 10:47 Comment(2)
I need a spinning wheel of default size with a transparent (say #50000000) background filling the parent. If I set android:layout_width and android:layout_height to fill_parent in a ProgessBar, I get a huge spinning wheel. According to the link I provide in my question it can only be done with a custom dialog. The only problem is that the wheel is centered, and I'd like to set a custom position. Have you got an alternative solution?Respondence
you can see this link. I have added the code in my blog. sujitdroid.blogspot.com/2011/10/…Felisafelise

© 2022 - 2024 — McMap. All rights reserved.