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


Java ProgressDialog.setTitle方法代码示例

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


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

示例1: connectToBridge

import android.app.ProgressDialog; //导入方法依赖的package包/类
private void connectToBridge() {
    SharedPreferences prefs = getSharedPreferences("HueNotifier", MODE_PRIVATE);
    if (!prefs.contains("bridge_ip") || !prefs.contains("username")) {
        // setup
        connectDialog = new ProgressDialog(this);
        connectDialog.setTitle(R.string.searching_bridge);
        connectDialog.show();
        PHBridgeSearchManager sm = (PHBridgeSearchManager) phHueSDK
                .getSDKService(PHHueSDK.SEARCH_BRIDGE);
        sm.search(true, true);
        if (BuildConfig.DEBUG)
            Logger.log("searching for bridges");
    } else {
        PHAccessPoint accessPoint = new PHAccessPoint();
        accessPoint.setIpAddress(prefs.getString("bridge_ip", null));
        accessPoint.setUsername(prefs.getString("username", null));
        if (!phHueSDK.isAccessPointConnected(accessPoint) || !isConnected) {
            phHueSDK.connect(accessPoint);
        }
    }
}
 
开发者ID:j4velin,项目名称:HueNotifier,代码行数:22,代码来源:MainActivity.java

示例2: showProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
private void showProgressDialog(final Context context) {
    final ProgressDialog progressDialog = new ProgressDialog(context);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    progressDialog.setCancelable(false);
    progressDialog.setTitle("软件更新");
    progressDialog.setIndeterminate(false);
    new ModelUpdateApk().downloadFile("http://zhstatic.zhihu.com/pkg/store/daily/zhihu-daily-zhihu-2.6.0(744)-release.apk", new ProgressResponseListener() {
        @Override
        public void onResponseProgress(long bytesRead, long contentLength, boolean done) {
            progressDialog.setProgress((int) (bytesRead * 100 / contentLength));
            if (done) {
                progressDialog.dismiss();
            }
        }
    }, new ModelUpdateApk.SuccessListner() {
        @Override
        public void onSuccess() {
            File file = new File(App.getApplication().getExternalFilesDir(null) + File.separator + "ZHRB.apk");
            ApkUtils.installAPK(App.getApplication(), file);
        }

        @Override
        public void onFail() {
            Toast.makeText(context, "下载失败", Toast.LENGTH_SHORT).show();
        }
    });
    progressDialog.show();
}
 
开发者ID:Mrqinlei,项目名称:ImitateZHRB,代码行数:29,代码来源:UpdateManager.java

示例3: getProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
public static ProgressDialog getProgressDialog(Activity activity, String title, String message) {
    ProgressDialog dialog = new ProgressDialog(activity);
    if (!TextUtils.isEmpty(title)) {
        dialog.setTitle(title);
    }
    if (!TextUtils.isEmpty(message)) {
        dialog.setMessage(message);
    }
    return dialog;
}
 
开发者ID:zhonglikui,项目名称:cardinalsSample,代码行数:11,代码来源:DialogUtil.java

示例4: init

import android.app.ProgressDialog; //导入方法依赖的package包/类
private void init() {
    mProgressDialog = new ProgressDialog(getActivity());
    mProgressDialog.setTitle(getString(R.string.loading));
    mProgressDialog.setMessage(getString(R.string.please_wait));
    mProgressDialog.setIndeterminate(true);

    mIBSend.setOnClickListener(this);


    //   mETxtMessage.setOnEditorActionListener(this);

    mChatPresenter = new ChatPresenter(this);
    mChatPresenter.getMessage(FirebaseAuth.getInstance().getCurrentUser().getUid(),
            getArguments().getString(Constants.ARG_RECEIVER_UID));
}
 
开发者ID:mustafaozhan,项目名称:Howl,代码行数:16,代码来源:ChatFragment.java

示例5: onCreate

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

    progressDialog = new ProgressDialog(this);
    progressDialog.setCancelable(false);
    progressDialog.setTitle("Loading...");
}
 
开发者ID:shuza,项目名称:RxAndroid-Examples,代码行数:11,代码来源:MainActivity.java

示例6: createProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
private static ProgressDialog createProgressDialog(Activity activity){
    ProgressDialog dialog = new ProgressDialog(activity);
    dialog.setTitle(R.string.please_wait);
    dialog.setMessage(activity.getString(R.string.message_obtaining_owner_information));
    dialog.setCancelable(true);
    dialog.show();
    return dialog;
}
 
开发者ID:PhoenixDevTeam,项目名称:Phoenix-for-VK,代码行数:9,代码来源:PlaceUtil.java

示例7: onCreate

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

    recyclerView = ((RecyclerView) findViewById(R.id.mRecyclerView));
    FrameLayout mToolbar = (FrameLayout) findViewById(R.id.mToolbar);
    TextView mToolbarTitle = (TextView) findViewById(R.id.mToolbarTitle);
    TextView mToolbarCancel = (TextView) findViewById(R.id.mToolbarCancel);
    findViewById(R.id.mBottomLine).setVisibility(View.GONE);
    findViewById(R.id.mBottom).setVisibility(View.GONE);


    mToolbar.setVisibility(View.VISIBLE);

    mToolbarTitle.setText(ResourceLoadUtil.getResourceString(this,R.string.selectPhoto));
    mToolbarCancel.setText(ResourceLoadUtil.getResourceString(this,R.string.cancel));
    mToolbarCancel.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            ImageSelectUtil.getInstance().clearSelect();
            finish();
        }
    });
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayout.VERTICAL));
    dialog = new ProgressDialog(this);
    dialog.setTitle(ResourceLoadUtil.getResourceString(this,R.string.loading));

    //初始化选中的图片
    ImageSelectUtil.getInstance().clearSelect();

    new MyTask().execute();
}
 
开发者ID:BigSea001,项目名称:PhotoPickApp,代码行数:35,代码来源:ImagePickActivity.java

示例8: buildProgress

import android.app.ProgressDialog; //导入方法依赖的package包/类
private void buildProgress(ConfigBean bean) {
    ProgressDialog dialog = new ProgressDialog(bean.context);
    dialog.setTitle("");
    dialog.setMessage(bean.msg);
    dialog.setProgressStyle(bean.isProgressHorzontal ? ProgressDialog.STYLE_HORIZONTAL:ProgressDialog.STYLE_SPINNER);
    dialog.setIndeterminate(false);
    bean.dialog = dialog;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:MyDialogBuilder.java

示例9: onClick

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void onClick(View view) {
    switch (view.getId()){
        case R.id.button:
            ProgressDialog progressDialog=new ProgressDialog(MainActivity.this);
            progressDialog.setTitle("This is ProgressDialog");
            progressDialog.setMessage("Loading...");
            progressDialog.setCancelable(true);
            progressDialog.show();
            break;
        default:
            break;
    }
}
 
开发者ID:Qinlong275,项目名称:AndroidBookTest,代码行数:15,代码来源:MainActivity.java

示例10: prepareProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
private ProgressDialog prepareProgressDialog(Context context) {
		ProgressDialog progressDialog = new ProgressDialog(context);
		progressDialog.setTitle(R.string.stl_load_progress_title);
		progressDialog.setMax(0);
		progressDialog.setMessage(context.getString(R.string.stl_load_progress_message));
		progressDialog.setIndeterminate(false);
		progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
		progressDialog.setCancelable(false);
		
//		progressDialog.show();
		
		return progressDialog;
	}
 
开发者ID:xhd-Git,项目名称:3DPrint-Controller,代码行数:14,代码来源:STLObject.java

示例11: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
  progressDialog = new ProgressDialog(context);
  progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
  progressDialog.setCancelable(false);
  progressDialog.setIndeterminate(false);
  progressDialog.setTitle(R.string.trimmer__deleting);
  progressDialog.setMessage(context.getString(R.string.trimmer__deleting_old_messages));
  progressDialog.setMax(100);
  progressDialog.show();
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:12,代码来源:Trimmer.java

示例12: assignViews

import android.app.ProgressDialog; //导入方法依赖的package包/类
private void assignViews() {
    act = (AutoCompleteTextView) findViewById(R.id.edit_text_hwd);
    btnSearch = (Button) findViewById(R.id.btn_search);
    btnPronounce = ((Button) findViewById(R.id.btn_pronounce));
    //recyclerViewDefinitionList = (RecyclerView) findViewById(R.id.recycler_view_definition_list);
    viewDefinitionList = (LinearLayout) findViewById(R.id.view_definition_list);
    progressBar = (ProgressBar) findViewById(R.id.progress_bar);
    bigBangLayout = (BigBangLayout) findViewById(R.id.bigbang);
    bigBangLayoutWrapper = (BigBangLayoutWrapper) findViewById(R.id.bigbang_wrapper);
    progressDialog = new ProgressDialog(PopupActivity.this);
    // 设置进度条风格,风格为长形
    progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    // 设置ProgressDialog 标题
    progressDialog.setTitle(getString(R.string.str_wait));
}
 
开发者ID:mmjang,项目名称:quiz_helper,代码行数:16,代码来源:PopupActivity.java

示例13: onActivityCreated

import android.app.ProgressDialog; //导入方法依赖的package包/类
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    mDialog=new ProgressDialog(getActivity());
    mDialog.setTitle("获取数据中");
    bt_ipinfo.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            mPresenter.getIpInfo("39.155.184.147");
        }
    });
}
 
开发者ID:henrymorgen,项目名称:android-advanced-light,代码行数:12,代码来源:IpInfoFragment.java

示例14: record

import android.app.ProgressDialog; //导入方法依赖的package包/类
@ProtoMethod(description = "Starts recording", example = "")
@ProtoMethodParam(params = {"showProgressBoolean"})
public PAudioRecorder record(String fileName) {
    init();

    recorder.setOutputFile(getAppRunner().getProject().getFullPathForFile(fileName));
    try {
        recorder.prepare();
    } catch (Exception e) {
        e.printStackTrace();
    }

    if (showProgress && getActivity() != null) {
        mProgressDialog = new ProgressDialog(getActivity());
        mProgressDialog.setTitle("Record!");
        mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        mProgressDialog.setButton(DialogInterface.BUTTON_POSITIVE, "Stop recording",
                new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(final DialogInterface dialog, final int whichButton) {
                        mProgressDialog.dismiss();
                        stop();
                    }
                });

        mProgressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
            @Override
            public void onCancel(DialogInterface p1) {
                stop();
            }
        });
        mProgressDialog.show();
    }

    recorder.start();

    return this;
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:39,代码来源:PAudioRecorder.java

示例15: showProgressBar

import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
 * this function is used to show default progress dialog.
 *
 * @param title - progress dialog title
 * @param message - progress dialog message
 * @param progressDialog - progress dialog object (not be null)
 */
public static void showProgressBar(String title, String message, ProgressDialog progressDialog) {
    if(progressDialog != null) {
        progressDialog.setTitle(title);
        progressDialog.setMessage(message);
        progressDialog.show();
        progressDialog.setCancelable(true);
    }
}
 
开发者ID:pawanchauhan05,项目名称:AndroidUtility,代码行数:16,代码来源:Utils.java


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