本文整理汇总了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);
}
}
}
示例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();
}
示例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;
}
示例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));
}
示例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...");
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
}
示例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;
}
示例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();
}
示例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));
}
示例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");
}
});
}
示例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;
}
示例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);
}
}