开发者

Positionning the spinning wheel in a custom progress dialog

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>
        <it开发者_开发百科em name="android:background">@android:color/transparent</item>
    </style>    
</resources>


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"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜