-1
A
回答
1
嘗試將此添加到您的佈局xml文件:
<ProgressBar android:id="@+id/progressBar" android:layout_width="wrap_content" android:layout_height="wrap_content" />
這是你的意思?
0
您可以嘗試this Circle Progress library
CircularProgress:
<com.github.lzyzsd.circleprogress.CircleProgress
android:id="@+id/circle_progress"
android:layout_marginLeft="50dp"
android:layout_width="100dp"
android:layout_height="100dp"
custom:circle_progress="20"/>
CircleProgress:
<com.github.lzyzsd.circleprogress.CircleProgress
android:id="@+id/circle_progress"
android:layout_marginLeft="50dp"
android:layout_width="100dp"
android:layout_height="100dp"
custom:circle_progress="20"/>
ArcProgress:
<com.github.lzyzsd.circleprogress.ArcProgress
android:id="@+id/arc_progress"
android:background="#214193"
android:layout_marginLeft="50dp"
android:layout_width="100dp"
android:layout_height="100dp"
custom:arc_progress="55"
custom:arc_bottom_text="MEMORY"/>
0
使用此代碼
public class CustomAlertDia extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//crated new alert dialog
Dialog alertDialog = new Dialog(this);
alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
alertDialog.setContentView(R.layout.progress_dia);
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); //transperent background
ImageView hero = (ImageView)alertDialog.findViewById(R.id.iv_progress);
//setup rotate background effect
RotateAnimation ro = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
ro.setDuration(1500);
ro.setRepeatCount(Animation.INFINITE);
ro.setInterpolator(new LinearInterpolator());
hero.setAnimation(ro);
alertDialog.show();
}
}
您可以this image,並檢查它
相關問題
- 1. 進度條實現
- 2. jquery循環進度條
- 3. 如何實現jQuery的PHP進度條
- 4. 如何在Ruby中實現進度條?
- 5. 如何使用TIdTCPClient實現進度條?
- 6. 如何實現自定義進度條
- 7. 任何PyQt循環進度條?
- 8. 實現分段進度條
- 9. 如何實現循環UIScrollView?
- 10. 圈進度條不斷循環
- 11. 進度條使用嵌套for循環
- 12. 估計進度條的循環時間
- 13. 實現循環
- 14. 異步jQuery數據庫循環 - 幫助實施進度條
- 15. Android循環進度條在進度上變慢
- 16. 如何從ajax循環創建進度條?
- 17. 如何在UITableViewCell中使用循環進度條?
- 18. 如何更改循環中的進度條?
- 19. 如何結合循環或如何實現許多循環到glib主循環?
- 20. 如何實現具有兩個循環的條件
- 21. 如何在Expect的while循環中實現「後備條件」?
- 22. 如何在Haskell中實現帶條件休息的循環
- 23. 如何在promela中實現重複直到(條件)循環?
- 24. 在libGDX中實現cricle進度條
- 25. 實現一個進度條類
- 26. 實現MySQL命令進度條
- 27. nodeBB上的進度條實現
- 28. PHP循環實現
- 29. WordPress的:如何實現for-each循環?
- 30. 手寫筆如何實現循環?
不,我想以同樣的方式在進度條如圖所示的形象。我也嘗試過自定義進度條,但沒用。 –