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


Java Builder.setTitle方法代码示例

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


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

示例1: createDialog

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static Dialog createDialog(Context context, Bundle arguments, OnClickListener onClickListener) {
    Builder builder = new Builder(context);
    builder.setTitle(arguments.getString(ErrorDialogManager.KEY_TITLE));
    builder.setMessage(arguments.getString(ErrorDialogManager.KEY_MESSAGE));
    if (ERROR_DIALOG_ICON != 0) {
        builder.setIcon(ERROR_DIALOG_ICON);
    }
    builder.setPositiveButton(17039370, onClickListener);
    return builder.create();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:ErrorDialogFragments.java

示例2: showAlert

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static AlertDialog showAlert(final Context context, final String msg, final String title) {
	if (context instanceof Activity && ((Activity) context).isFinishing()) {
		return null;
	}

	final Builder builder = new AlertDialog.Builder(context);
	builder.setIcon(R.drawable.ic_dialog_alert);
	builder.setTitle(title);
	builder.setMessage(msg);
	builder.setPositiveButton(R.string.app_ok, new DialogInterface.OnClickListener() {

		@Override
		public void onClick(final DialogInterface dialog, final int which) {
			dialog.cancel();
		}
	});
	final AlertDialog alert = builder.create();
	alert.show();
	return alert;
}
 
开发者ID:linsir6,项目名称:TripBuyer,代码行数:21,代码来源:MMAlert.java

示例3: show

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public void show(String searchName,ArrayList<String> filePathList){
    // タイトル
    String strTitle = searchName+"駅を検索";
    // リストビュー
    ListView listview = new ListView( m_parent );
    listview.setScrollingCacheEnabled( false );
    listview.setOnItemClickListener( this );
    // ファイルリスト
    List<FileInfo> listFileInfo = new ArrayList<>();
    for( String filePath : filePathList ){
        File file=new File(filePath);
        if(!file.exists()){
            continue;
        }
        System.out.println(filePath);
        if(file.getName().endsWith(".oud")||file.getName().endsWith(".oud2")) {
            String[] stationName=loadStartEndStation(file);
            listFileInfo.add(new FileInfo(stationName[0]+"~"+stationName[1]+"\n"+file.getName(),file));
        }
    }
    Collections.sort( listFileInfo );

    m_fileinfoarrayadapter = new FileInfoArrayAdapter( m_parent, listFileInfo );
    listview.setAdapter( m_fileinfoarrayadapter );

    Builder builder = new AlertDialog.Builder( m_parent );
    builder.setTitle( strTitle );
    builder.setNeutralButton("キャンセル", null );
    builder.setView( listview );
    m_dlg = builder.show();
}
 
开发者ID:KameLong,项目名称:AOdia,代码行数:32,代码来源:SearchFileDialog.java

示例4: a

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static Dialog a(Context context, String str, String str2, String str3, OnClickListener onClickListener, String str4, OnClickListener onClickListener2) {
    Builder builder = new Builder(context);
    if (a) {
        if (!(TextUtils.isEmpty(str4) || onClickListener2 == null)) {
            builder.setPositiveButton(str4, onClickListener2);
        }
        if (!(TextUtils.isEmpty(str3) || onClickListener == null)) {
            builder.setNegativeButton(str3, onClickListener);
        }
    } else {
        if (!(TextUtils.isEmpty(str3) || onClickListener == null)) {
            builder.setPositiveButton(str3, onClickListener);
        }
        if (!(TextUtils.isEmpty(str4) || onClickListener2 == null)) {
            builder.setNegativeButton(str4, onClickListener2);
        }
    }
    builder.setTitle(str);
    builder.setMessage(str2);
    Dialog create = builder.create();
    create.setCanceledOnTouchOutside(false);
    create.setOnKeyListener(new e());
    try {
        create.show();
    } catch (Throwable th) {
    }
    return create;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:29,代码来源:d.java

示例5: uploadHeadPhoto

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
private void uploadHeadPhoto() {
	Builder builder = new Builder(this);
	builder.setTitle(R.string.dl_title_upload_photo);
	builder.setItems(new String[] { getString(R.string.dl_msg_take_photo), getString(R.string.dl_msg_local_upload) },
			new DialogInterface.OnClickListener() {

				public void onClick(DialogInterface dialog, int which) {
					dialog.dismiss();
					switch (which) {
					case 0:
						Toast.makeText(UserProfileActivity.this, getString(R.string.toast_no_support),
								Toast.LENGTH_SHORT).show();
						break;
					case 1:
						Intent pickIntent = new Intent(Intent.ACTION_PICK,null);
						pickIntent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
						startActivityForResult(pickIntent, REQUESTCODE_PICK);
						break;
					default:
						break;
					}
				}
			});
	builder.create().show();
}
 
开发者ID:mangestudio,项目名称:GCSApp,代码行数:26,代码来源:UserProfileActivity.java

示例6: noNetworkDialog

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
private void noNetworkDialog(){
    Builder dialogNoNetwork;

    dialogNoNetwork = new AlertDialog.Builder(this);
    dialogNoNetwork.setCancelable(true);
    dialogNoNetwork.setOnCancelListener(new DialogInterface.OnCancelListener() {
        public void onCancel(DialogInterface dialog) {
            finish();
        }
    });
    dialogNoNetwork.setTitle(R.string.nonetwork_title);
    dialogNoNetwork.setMessage(getString(R.string.nonetwork_message));
    dialogNoNetwork.show();
}
 
开发者ID:archos-sa,项目名称:aos-FileCoreLibrary,代码行数:15,代码来源:WiFiDirectReceiverActivity.java

示例7: run

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
@Override
public void run() {
    Builder builder = new Builder(InCallActivity.this);
    Resources r = getResources();
    builder.setTitle("ZRTP supported by remote party");
    builder.setMessage("Do you confirm the SAS : " + sasString);
    builder.setPositiveButton(r.getString(R.string.yes), this);
    builder.setNegativeButton(r.getString(R.string.no), this);

    AlertDialog backupDialog = builder.create();
    backupDialog.show();
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:13,代码来源:InCallActivity.java

示例8: showDialog

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static void showDialog(Activity context, String strTitle, String strText, int icon) {
    if (context != null && !context.isFinishing() && !context.isRestricted()) {
        Builder tDialog = new Builder(context);
        tDialog.setIcon(icon);
        tDialog.setTitle(strTitle);
        tDialog.setMessage(strText);
        tDialog.setPositiveButton(R.string.Ensure, null);
        try {
            tDialog.show();
        } catch (Exception e) {
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:14,代码来源:BaseHelper.java

示例9: showError

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
/**
 * Show a visual error message to the user.
 * 
 * @param message
 *          the message to show
 */
private void showError(String message) {
  final Builder builder = new AlertDialog.Builder(AlbumListActivity.this);
  builder.setTitle(message);
  builder.setIcon(android.R.drawable.ic_dialog_alert);
  builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
      dialog.dismiss();
    }
  });
  builder.setMessage(message);
  builder.show();

}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:21,代码来源:AlbumListActivity.java

示例10: showAlert

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static void showAlert(Context context, String str, String str2) {
    Builder builder = new Builder(context);
    builder.setTitle(str);
    builder.setMessage(str2);
    builder.create().show();
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:7,代码来源:Util.java

示例11: onPrepareDialogBuilder

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
@Override
protected void onPrepareDialogBuilder(Builder builder) {
    super.onPrepareDialogBuilder(builder);
    builder.setTitle(null); // remove dialog title to get more space for color picker
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:6,代码来源:ColorPickerPreference.java

示例12: showAlert

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static void showAlert(Context context, String title, String text) {
    Builder alertBuilder = new Builder(context);
    alertBuilder.setTitle(title);
    alertBuilder.setMessage(text);
    alertBuilder.create().show();
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:7,代码来源:FoursquareUtils.java

示例13: showAlert

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
/**
 * Display a simple alert dialog with the given text and title.
 *
 * @param context
 *          Android context in which the dialog should be displayed
 * @param title
 *          Alert dialog title
 * @param text
 *          Alert dialog message
 */
@Deprecated
public static void showAlert(Context context, String title, String text) {
    Builder alertBuilder = new Builder(context);
    alertBuilder.setTitle(title);
    alertBuilder.setMessage(text);
    alertBuilder.create().show();
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:18,代码来源:Util.java


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