當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。