当前位置: 首页>>代码示例>>Java>>正文


Java ProgressDialog类代码示例

本文整理汇总了Java中android.app.ProgressDialog的典型用法代码示例。如果您正苦于以下问题:Java ProgressDialog类的具体用法?Java ProgressDialog怎么用?Java ProgressDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ProgressDialog类属于android.app包,在下文中一共展示了ProgressDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: encryptDataAndSave

import android.app.ProgressDialog; //导入依赖的package包/类
private void encryptDataAndSave(byte[] password)
{
	try
	{
		binText = strText.getBytes(Charset.forName("UTF-8"));
		binText = MyUtil.encryptChiData(binText, MyUtil.md5Key(password));

		progressDlg = ProgressDialog.show(
				TextEdit.this, null, getString(R.string.notify_saving), true, false);
		new FileWriteThread().start();

	}
	catch(Exception e)
	{
		e.printStackTrace();
		//PasswordBox.resetPassword();
		showMessage(getString(R.string.alert_general_error) + "\n" + e.toString());
	}

}
 
开发者ID:monolifed,项目名称:mininoteview,代码行数:21,代码来源:TextEdit.java

示例2: onStart

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
public void onStart() {
    super.onStart();

    mProgress = new ProgressDialog(getContext());
    mProgress.setCanceledOnTouchOutside(false);
    mProgress.setMessage("Calling Drive API ...");

    String accountName = PreferencesUtils.getAccountName(getContext());

    if (!ConnectivityUtils.isGooglePlayServicesAvailable(getContext())) {
        acquireGooglePlayServices();

    } else {
        mCredential.setSelectedAccountName(accountName);
        showRemoveButton = true;
        mAccountName.setText(accountName);
        mSyncStatus.setText(R.string.googleDrive_cannot_connect);
        checkPermissions();
    }
}
 
开发者ID:piskula,项目名称:FuelUp,代码行数:22,代码来源:BackupFragment.java

示例3: setReminder

import android.app.ProgressDialog; //导入依赖的package包/类
private void setReminder() {

        progressDialog = new ProgressDialog(this);
        progressDialog.setTitle(getString(R.string.app_name));
        progressDialog.setMessage(getString(R.string.wait));
        progressDialog.setIndeterminate(true);
        progressDialog.setCancelable(false);

        String name = nameET.getText().toString();
        String address = addressET.getText().toString();
        String full_date = onDateEt.getText().toString();

        if (name.trim().length() > 0 && address.trim().length() > 0 && full_date.trim().length() > 0) {

            progressDialog.show();
            setReminderNow(name, address, full_date);

        } else
            Toast.makeText(this, getString(R.string.please_input), Toast.LENGTH_LONG).show();

    }
 
开发者ID:webianks,项目名称:Crimson,代码行数:22,代码来源:CheckupReminders.java

示例4: loadChart

import android.app.ProgressDialog; //导入依赖的package包/类
public static void loadChart(final Context context, final String strChartFilePath)	{
final ProgressDialog dlgLoadingChartProgress = ProgressDialog.show(context, context.getString(R.string.please_wait),
		context.getString(R.string.loading_chart), true);
final Handler handler = new Handler();

Thread threadLoadChart = new Thread(new Runnable()	{

	@Override
	public void run() {
		final Intent intent = new Intent(context, ActivityChartDemon.class);
		intent.putExtra(ChartOperator.VMFPChartPath, strChartFilePath);
		handler.post(new Runnable()	{
			@Override
			public void run() {
				context.startActivity(intent);
				dlgLoadingChartProgress.dismiss();
			}
		});
	}
});
threadLoadChart.start();
  }
 
开发者ID:woshiwpa,项目名称:SmartMath,代码行数:23,代码来源:MFPFileManagerActivity.java

示例5: onCreateDialog

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Bundle args = getArguments();
    int size = args.getInt(ARG_SIZE);
    String message = args.getString(ARG_MESSAGE);

    messagingListener = new SimpleMessagingListener() {
        @Override
        public void updateProgress(int progress) {
            dialog.setProgress(progress);
        }
    };

    messagingController = MessagingController.getInstance(getActivity());
    messagingController.addListener(messagingListener);

    dialog = new ProgressDialog(getActivity());
    dialog.setMessage(message);
    dialog.setMax(size);
    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    dialog.setProgress(0);
    dialog.show();

    return dialog;
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:26,代码来源:AttachmentDownloadDialogFragment.java

示例6: onCreate

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.course_detail);
    Intent i = getIntent();
    courseNo = i.getStringExtra("CourseNo");
    if (courseNo == null) {
        finish();
        return;
    }
    mToolbar = (Toolbar) findViewById(R.id.main_toolbar);
    setSupportActionBar(mToolbar);
    setActionBar();
    mProgressDialog = ProgressDialog.show(this, null, getString(R.string.course_loading), true);
    Thread t = new Thread(new CourseDetailRunnable(courseDetailHandler,
            courseNo));
    t.start();
}
 
开发者ID:kamisakihideyoshi,项目名称:TaipeiTechRefined,代码行数:19,代码来源:CourseDetailActivity.java

示例7: onCreate

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    mRecordView = (RecordView) findViewById(R.id.recordView);
    mDurationTv = (TextView) findViewById(R.id.tv_duration);
    mCompressInfoTv = (TextView) findViewById(R.id.tv_info);
    mVideoSizeTv = (TextView) findViewById(R.id.tv_size);
    mDialog = new ProgressDialog(this);
    mDialog.setTitle("正在压缩");
    mDialog.setCanceledOnTouchOutside(false);
    mRecordView.setOnRecordCallback(new RecordView.OnRecordCallback() {
        @Override
        public void onFinish() {
            mVideoSizeTv.setText("大小:" + mRecordView.getRecordFileSize() + "Mb");
        }

        @Override
        public void onProgress(int total, int curr) {
            mDurationTv.setText(curr + "/" + total);
            mVideoSizeTv.setText("大小:" + mRecordView.getRecordFileSize() + "Mb");
            Log.d(TAG, "onProgress:" + mRecordView.getRecordFileSize());
        }
    });
}
 
开发者ID:mChenys,项目名称:AndroidFFmpegCompress,代码行数:26,代码来源:MainActivity.java

示例8: login

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
public void login(@NonNull SmartLoginConfig config) {
    GoogleApiClient apiClient = config.getGoogleApiClient();
    Activity activity = config.getActivity();

    if (apiClient == null) {
        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestEmail()
                .requestProfile()
                .build();

        apiClient = new GoogleApiClient.Builder(activity)
                .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
                .build();
    }

    ProgressDialog progress = ProgressDialog.show(activity, "", activity.getString(R.string.logging_holder), true);
    Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(apiClient);
    activity.startActivityForResult(signInIntent, Constants.GOOGLE_LOGIN_REQUEST);
    progress.dismiss();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:22,代码来源:GoogleLogin.java

示例9: onCreate

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_portal);
    mToolbar = (Toolbar) findViewById(R.id.main_toolbar);
    setSupportActionBar(mToolbar);
    setActionBar();
    WebView webview = (WebView) findViewById(R.id.webview);
    webview.setWebViewClient(new WebViewClient());
    webview.clearCache(true);
    webview.clearHistory();
    webview.getSettings().setJavaScriptEnabled(true);
    webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    String account = Model.getInstance().getAccount();
    String password = Model.getInstance().getPassword();
    if (!TextUtils.isEmpty(account) && !TextUtils.isEmpty(password)) {
        mProgressDialog = ProgressDialog.show(this, null,
                getString(R.string.nportal_loggingin));
        Thread loginThread = new Thread(new LoginNportalRunnable(account, password,
                new LoginHandler(this)));
        loginThread.start();
    }
}
 
开发者ID:kamisakihideyoshi,项目名称:TaipeiTechRefined,代码行数:24,代码来源:PortalActivity.java

示例10: onCreateDialog

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
protected Dialog onCreateDialog(int id) {
    switch (id) {
        case progress_bar_type:
            progrssDialog = new ProgressDialog(this);
            progrssDialog.setMessage("Downloading model. Please wait...");
            progrssDialog.setIndeterminate(false);
            progrssDialog.setMax(100);
            progrssDialog.setCancelable(false);
            progrssDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
            progrssDialog.show();
            return progrssDialog;
        default:
            return null;
    }
}
 
开发者ID:interactionlab,项目名称:imui-tutorial,代码行数:17,代码来源:MainActivity.java

示例11: RunToGetDeterminant

import android.app.ProgressDialog; //导入依赖的package包/类
public void RunToGetDeterminant(final int pos, final ProgressDialog px) {
    Runnable runnable = new Runnable() {
        @Override
        public void run() {
            double var = SquareList.get(pos).GetDeterminant(px);
            Message message = new Message();
            Bundle bundle = new Bundle();
            bundle.putDouble("RESULTANT", var);
            message.setData(bundle);
            px.dismiss();
            myhandler.sendMessage(message);

        }
    };
    Thread thread = new Thread(runnable);
    thread.start();
}
 
开发者ID:coder3101,项目名称:Matrix-Calculator-for-Android,代码行数:18,代码来源:DeterminantFragment.java

示例12: onCreateDialog

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    String title ="";
    int icon=-1 ;
    icon= R.drawable.filetype_video;
    ProgressDialog pd = new ProgressDialog(getActivity());
    pd.setTitle(title);
    if(icon >=0)
        pd.setIcon(icon);
    pd.setMessage(getText(R.string.deleting));
    pd.setIndeterminate(true);
    pd.setCancelable(true);

    return pd;

}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:17,代码来源:DeleteDialog.java

示例13: startBindingService

import android.app.ProgressDialog; //导入依赖的package包/类
/**
 * Binding service after the fine location permission is granted
 */
private void startBindingService() {
    // Start GPSService which offers user location across activities
    positionDialog = new ProgressDialog(this);
    positionDialog.setTitle(getResources().getString(R.string.access_location_title));
    positionDialog.setMessage(getResources().getString(R.string.access_location_message));
    positionDialog.setIndeterminate(true);
    positionDialog.setCancelable(false);
    positionDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "取消", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            dialog.dismiss();
            positionDialog = null;
        }
    });
    positionDialog.show();
    if (isMyServiceRunning(GPSService.class))
        bindService(serviceIntent, mConnection, Context.BIND_AUTO_CREATE);
    else
        super.startService(serviceIntent);
}
 
开发者ID:w86763777,项目名称:BikeLine,代码行数:24,代码来源:MainActivity.java

示例14: parseEntryStart

import android.app.ProgressDialog; //导入依赖的package包/类
@Override
public void parseEntryStart(int entry) {

    if ( ! isAdded() || getActivity() == null ) {
        return;
    }


    this.viewSwitcher.clearAnimation();
    this.viewSwitcher.setBackgroundDrawable(null);
    restoreColorProfile();
    displayPageNumber(-1); //Clear page number

    ProgressDialog progressDialog = getWaitDialog();
    progressDialog.setMessage(getString( R.string.loading_wait));

    progressDialog.show();
}
 
开发者ID:ceji-longquan,项目名称:ceji_android,代码行数:19,代码来源:ReadingFragment.java

示例15: showMapWithLocationClient

import android.app.ProgressDialog; //导入依赖的package包/类
private void showMapWithLocationClient() {
	String str1 = getResources().getString(R.string.Making_sure_your_location);
	progressDialog = new ProgressDialog(this);
	progressDialog.setCanceledOnTouchOutside(false);
	progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
	progressDialog.setMessage(str1);

	progressDialog.setOnCancelListener(new OnCancelListener() {

		public void onCancel(DialogInterface arg0) {
			if (progressDialog.isShowing()) {
				progressDialog.dismiss();
			}
			Log.d("map", "cancel retrieve location");
			finish();
		}
	});

	progressDialog.show();

	mLocClient = new LocationClient(this);
	mLocClient.registerLocationListener(myListener);

	LocationClientOption option = new LocationClientOption();
	option.setOpenGps(true);// open gps
	// option.setCoorType("bd09ll"); 
	// Johnson change to use gcj02 coordination. chinese national standard
	// so need to conver to bd09 everytime when draw on baidu map
	option.setCoorType("gcj02");
	option.setScanSpan(30000);
	option.setAddrType("all");
	mLocClient.setLocOption(option);
}
 
开发者ID:mangestudio,项目名称:GCSApp,代码行数:34,代码来源:EaseBaiduMapActivity.java


注:本文中的android.app.ProgressDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。