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


Java ProgressDialog.setMessage方法代码示例

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


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

示例1: onCreate

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    //初始化ProgressDialog
    final ProgressDialog dialog = new ProgressDialog(this);
    dialog.setMessage(getResources().getString(R.string.str_loading));
    dialog.setCanceledOnTouchOutside(false);
    dlg = dialog;
}
 
开发者ID:BaoBaoJianqiang,项目名称:AndroidNetwork,代码行数:11,代码来源:AppBaseActivity.java

示例2: onCreate

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    tv = (TextView) findViewById(R.id.label);
    handler = new Handler(getMainLooper());

    progressDialog = new ProgressDialog(this);
    progressDialog.setMessage("Downloading MP3...");
    progressDialog.setIndeterminate(true);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    progressDialog.setCancelable(true);

    if(!requestPermissions()){
        handleIntent();
    }
}
 
开发者ID:bornabesic,项目名称:yt-mp3-downloader-android,代码行数:19,代码来源:MainActivity.java

示例3: 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

示例4: showProgress

import android.app.ProgressDialog; //导入方法依赖的package包/类
public static ProgressDialog showProgress(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable) {
    ProgressDialog dialog = new ProgressDialog(context);
    dialog.setTitle(title);
    dialog.setMessage(message);
    dialog.setIndeterminate(indeterminate);
    dialog.setCancelable(false);
    try {
        dialog.show();
    } catch (Exception e) {
    }
    return dialog;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:13,代码来源:BaseHelper.java

示例5: deleteContact

import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
 * delete contact
 */
public void deleteContact(final EaseUser tobeDeleteUser) {
    String st1 = getResources().getString(R.string.deleting);
    final String st2 = getResources().getString(R.string.Delete_failed);
    final ProgressDialog pd = new ProgressDialog(getActivity());
    pd.setMessage(st1);
    pd.setCanceledOnTouchOutside(false);
    pd.show();
    new Thread(new Runnable() {
        public void run() {
            try {
                EMClient.getInstance().contactManager().deleteContact(tobeDeleteUser.getUsername());
                // remove user from memory and database
                UserDao dao = new UserDao(getActivity());
                dao.deleteContact(tobeDeleteUser.getUsername());
                DemoHelper.getInstance().getContactList().remove(tobeDeleteUser.getUsername());
                getActivity().runOnUiThread(new Runnable() {
                    public void run() {
                        pd.dismiss();
                        contactList.remove(tobeDeleteUser);
                        contactListLayout.refresh();

                    }
                });
            } catch (final Exception e) {
                getActivity().runOnUiThread(new Runnable() {
                    public void run() {
                        pd.dismiss();
                        Toast.makeText(getActivity(), st2 + e.getMessage(), Toast.LENGTH_LONG).show();
                    }
                });

            }

        }
    }).start();

}
 
开发者ID:mangestudio,项目名称:GCSApp,代码行数:41,代码来源:SearChContactListFragment.java

示例6: initProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
private void initProgressDialog() {
    mProgressDialog = new ProgressDialog(this);
    mProgressDialog.setIndeterminate(true);
    mProgressDialog.setTitle("提示");
    mProgressDialog.setMessage("正在加载...");
    mProgressDialog.setCanceledOnTouchOutside(false);
    mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
}
 
开发者ID:struggledhard,项目名称:USay,代码行数:9,代码来源:WebViewFenLeiActivity.java

示例7: onCreateDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
protected Dialog onCreateDialog(int id) {
    prgDialog = new ProgressDialog(context);
    prgDialog.setMessage(context.getResources().getString(R.string.updating));
    prgDialog.setMax(100);
    prgDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    prgDialog.show();
    return prgDialog;
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:9,代码来源:themAdapter.java

示例8: loginToFoursquare

import android.app.ProgressDialog; //导入方法依赖的package包/类
public void loginToFoursquare() {
    ProgressDialog prog = new ProgressDialog(activity);
    prog.setMessage(activity.getString(R.string.foursquare_please_wait));
    prog.setCancelable(false);
    prog.show();
    foursquare = new Foursquare(
            ApiObjects.foursquare.get("client_key"),
            ApiObjects.foursquare.get("client_secret"),
            redirectUrl);
    foursquare.authorize(getActivity(),
            new FoursquareAuthenDialogListener());
    prog.cancel();
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:14,代码来源:FoursquareShield.java

示例9: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
    super.onPreExecute();
    progDailog = new ProgressDialog(context);
    progDailog.setMessage(context.getResources().getString(R.string.loading));
    progDailog.setIndeterminate(false);
    progDailog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    progDailog.setCancelable(false);
    progDailog.show();
}
 
开发者ID:MiFirma,项目名称:mi-firma-android,代码行数:11,代码来源:RequestInitiativesTask.java

示例10: showProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
public static void showProgressDialog(Context context) {
	dialog = new ProgressDialog(context);
	dialog.setIcon(R.mipmap.ic_launcher);
	dialog.setTitle(R.string.app_name);

	dialog.setMessage("请等候,数据加载中……");
	dialog.show();
}
 
开发者ID:ceji-longquan,项目名称:ceji_android,代码行数:9,代码来源:PromptManager.java

示例11: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
    super.onPreExecute();
    pDialog = new ProgressDialog(Log_in.this);
    pDialog.setMessage("Loging in....");
    pDialog.setIndeterminate(false);
    pDialog.setCancelable(false);
    pDialog.show();


}
 
开发者ID:SkylineLabs,项目名称:FindX,代码行数:12,代码来源:Log_in.java

示例12: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
    super.onPreExecute();

    // hack to get theme applied (which is not automatically applied due to activity's Theme.NoDisplay
    ContextThemeWrapper theme = new ContextThemeWrapper(InstallExtensionDialogActivity.this,
            FDroidApp.getCurThemeResId());

    progressDialog = new ProgressDialog(theme);
    progressDialog.setMessage(InstallExtension.create(getApplicationContext()).getInstallingString());
    progressDialog.setIndeterminate(true);
    progressDialog.setCancelable(false);
    progressDialog.show();
}
 
开发者ID:uhuru-mobile,项目名称:mobile-store,代码行数:15,代码来源:InstallExtensionDialogActivity.java

示例13: onCreateDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog pd = new ProgressDialog(getActivity());
    pd.setMessage(getString(R.string.dialog_subloader_copying));
    pd.setIndeterminate(true);
    pd.setCancelable(true);
    return pd;
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:9,代码来源:VideoDetailsFragment.java

示例14: initView

import android.app.ProgressDialog; //导入方法依赖的package包/类
private void initView() {
    mRegister = (Button) findViewById(R.id.btn_register);
    mRegister.setOnClickListener(this);
    mUserName = (EditText) findViewById(R.id.user_name);
    mPassword = (EditText) findViewById(R.id.pass);
    mLogin = (Button) findViewById(R.id.btn_login);
    mLogin.setOnClickListener(this);
    mKeepPass = (CheckBox) findViewById(R.id.keep_pass);
    mForgetPassword = (TextView) findViewById(R.id.forget_pass_word);
    mForgetPassword.setOnClickListener(this);

    appLabel = (TextView) findViewById(R.id.label);
    UtilTools.setFont(this, appLabel);
    setAppLabel(appLabel);

    //设置选中状态
    boolean isChecked = ShareUtil.getBoolean(this, StaticClass.KEEP_PASS, false);
    mKeepPass.setChecked(isChecked);
    if (isChecked) {
        //显示用户名和密码
        mUserName.setText(ShareUtil.getString(this, "name", ""));
        mPassword.setText(ShareUtil.getString(this, "password", ""));
        mUserName.setSelection(mUserName.length());
    }

    //        mCustomDialog = new CustomDialog(this, 400, 400, R.layout.dialog_loading, R.style
    //                .Theme_dialog, Gravity.CENTER);

    mProgressDialog = new ProgressDialog(this);
    //屏幕外点击无效
    //mCustomDialog.setCancelable(false);
    mProgressDialog.setCancelable(false);
    mProgressDialog.setMessage("正在登陆......");

    //mProgressBar = (ProgressBar) findViewById(R.id.before_login);


}
 
开发者ID:Hultron,项目名称:LifeHelper,代码行数:39,代码来源:LoginActivity.java

示例15: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
    super.onPreExecute();

    mProgressDialog = new ProgressDialog(mContext);
    mProgressDialog.setTitle(mContext.getString(R.string.a_005));
    mProgressDialog.setMessage(mContext.getString(R.string.f_011));
    mProgressDialog.setCancelable(false);
    mProgressDialog.show();
}
 
开发者ID:marcelohanel,项目名称:Cash,代码行数:11,代码来源:TaskBackup.java


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