The Android custom progress bar mainly modifies the style of the ProgressBar, And the pop-up window displays the ProgressBar in the Dialog.
Directly add the code.
Add the following code to style. xml:
<Style name = "ProgressBar_Mini" parent = "@ android: style/Widget. ProgressBar. Horizontal">
<Item name = "android: maxHeight"> 50dip </item>
<Item name = "android: minHeight"> 8dip </item>
<Item name = "android: indeterminateOnly"> false </item>
<Item name = "android: indeterminateDrawable"> @ android: drawable/progress_indeterminate_horizontal </item>
<Item name = "android: progressDrawable"> @ drawable/progressbar_mini </item>
</Style>
<Style name = "dialog" parent = "@ android: style/Theme. Dialog">
<Item name = "android: windowFrame"> @ null </item>
<Item name = "android: incluwisfloating"> true </item>
<Item name = "android: javaswistranslucent"> true </item>
<Item name = "android: windowNoTitle"> true </item>
<Item name = "android: backgroundDimEnabled"> true </item>
<Item name = "android: windowBackground"> @ color/transparent </item>
</Style>
The content of the new drawable/progressbar_mini.xml file is as follows:
<Layer-list xmlns: android = "http://schemas.android.com/apk/res/android">
<Item android: id = "@ android: id/background">
<Shape>
<Corners android: radius = "0dip"/>
<Gradient
Android: Angular = "270"
Android: centery= "0.75"
Android: endColor = "# F5F5F5"
Android: startColor = "# BEBEBE"/>
</Shape>
</Item>
<Item android: id = "@ android: id/secondaryProgress">
<Clip>
<Shape>
<Corners android: radius = "0dip"/>
<Gradient
Android: Angular = "270"
Android: centery= "0.75"
Android: endColor = "# 165CBC"
Android: startColor = "#85B0E9"/>
</Shape>
</Clip>
</Item>
<Item android: id = "@ android: id/progress">
<Clip>
<Shape>
<Corners android: radius = "0dip"/>
<Gradient
Android: Angular = "270"
Android: centery= "0.75"
Android: endColor = "#00FF66"
Android: startColor = "#00FF66"/>
</Shape>
</Clip>
</Item>
</Layer-list>