相关疑难解决方法(0)

在Android中实现类似于iOS的旋转活动指示器

我正在尝试实现类似于我在Android下面放置的旋转活动.我相信我应该使用ProgressDialog.我的问题源于如何实际操作ProgressDialog看起来像活动指示器.

欢迎任何想法.一个例子的链接甚至会更好.

谢谢. 在此输入图像描述

重新编辑:

myProgress.java

public class myProgress extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    ProgressDialog d = (ProgressDialog)findViewById(R.id.progres);
Run Code Online (Sandbox Code Playgroud)

main.xml中

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/progres"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
>
<ProgressBar  
    android:id="@+id/progressBar"
    android:indeterminate="true" 
    style="?android:attr/progressBarStyleLarge"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true" 
/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

animation android rotation android-progressbar progress-bar

9
推荐指数
2
解决办法
2万
查看次数