• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Builder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onPrepareDialogBuilder

import org.holoeverywhere.app.AlertDialog.Builder; //导入依赖的package包/类
@Override
protected void onPrepareDialogBuilder(Builder builder) {
    super.onPrepareDialogBuilder(builder);
    if (mEntries == null || mEntryValues == null) {
        throw new IllegalStateException(
                "ListPreference requires an entries array and an entryValues array.");
    }
    mClickedDialogEntryIndex = getValueIndex();
    builder.setSingleChoiceItems(mEntries, mClickedDialogEntryIndex,
            new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    mClickedDialogEntryIndex = which;
                    ListPreference.this.onClick(dialog,
                            DialogInterface.BUTTON_POSITIVE);
                    dialog.dismiss();
                }
            });
    builder.setPositiveButton(null, null);
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:21,代码来源:ListPreference.java


示例2: alerter

import org.holoeverywhere.app.AlertDialog.Builder; //导入依赖的package包/类
public void alerter(String titre, String message) {

		AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
				MapActivity.this);

		// set title
		alertDialogBuilder.setTitle(titre);
		alertDialogBuilder.setIcon(R.drawable.ic_action_error);

		// set dialog message
		alertDialogBuilder.setMessage(message).setCancelable(true);

		// create alert dialog
		AlertDialog alertDialog = alertDialogBuilder.create();

		// show it
		alertDialog.show();
	}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:19,代码来源:MapActivity.java


示例3: create

import org.holoeverywhere.app.AlertDialog.Builder; //导入依赖的package包/类
public static Builder create (Context context, String title, String text) {
	TextView message = new TextView(context);
	message.setTextAppearance(context, android.R.style.TextAppearance_Medium);

	float scale = context.getResources().getDisplayMetrics().density;
	int dpAsPixels = (int) (8*scale + 0.5f);
	message.setPadding(dpAsPixels, dpAsPixels, dpAsPixels, dpAsPixels);
	Spanned s = Html.fromHtml(text);
	if(Build.VERSION.SDK_INT != 16) { //Bug in 4.1 that causes Dialog to crash
		message.setText(s);
		message.setMovementMethod(LinkMovementMethod.getInstance());
	} else {
		message.setText(s.toString());
	}
	
	ScrollView scroll = new ScrollView(context);
	scroll.addView(message);

	return new AlertDialog.Builder(context)
	.setTitle(title)
	.setCancelable(true)
	.setView(scroll);
}
 
开发者ID:johan12345,项目名称:ls-vertretungsplan,代码行数:24,代码来源:LinkAlertDialog.java


示例4: onPrepareDialogBuilder

import org.holoeverywhere.app.AlertDialog.Builder; //导入依赖的package包/类
@Override
protected void onPrepareDialogBuilder(Builder builder) {
    super.onPrepareDialogBuilder(builder);

    if (mEntries == null || mEntryValues == null) {
        throw new IllegalStateException(
                "MultiSelectListPreference requires an entries array and "
                        + "an entryValues array.");
    }

    boolean[] checkedItems = getSelectedItems();
    builder.setMultiChoiceItems(mEntries, checkedItems,
            new DialogInterface.OnMultiChoiceClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which,
                                    boolean isChecked) {
                    if (isChecked) {
                        mPreferenceChanged |= mNewValues
                                .add(mEntryValues[which].toString());
                    } else {
                        mPreferenceChanged |= mNewValues
                                .remove(mEntryValues[which].toString());
                    }
                }
            });
    mNewValues.clear();
    mNewValues.addAll(mValues);
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:29,代码来源:MultiSelectListPreference.java


示例5: create

import org.holoeverywhere.app.AlertDialog.Builder; //导入依赖的package包/类
public _RingtonePickerDialog create() {
    if (dialog != null) {
        return this;
    }
    handler = new Handler();
    hasDefaultItem = intent.getBooleanExtra(
            RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
    uriForDefaultItem = intent
            .getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI);
    if (uriForDefaultItem == null) {
        uriForDefaultItem = Settings.System.DEFAULT_RINGTONE_URI;
    }
    hasSilentItem = intent.getBooleanExtra(
            RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
    ringtoneManager = new RingtoneManager(context);
    final boolean includeDrm = intent.getBooleanExtra(
            RingtoneManager.EXTRA_RINGTONE_INCLUDE_DRM, true);
    ringtoneManager.setIncludeDrm(includeDrm);
    int types = intent.getIntExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, -1);
    if (types != -1) {
        ringtoneManager.setType(types);
    }
    cursor = ringtoneManager.getCursor();
    if (context instanceof Activity) {
        ((Activity) context).setVolumeControlStream(ringtoneManager
                .inferStreamType());
    }
    existingUri = intent
            .getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI);
    builder = new AlertDialog.Builder(context);
    dialog = onCreateDialog(builder);
    return this;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:34,代码来源:_RingtonePickerDialog.java


示例6: onPrepareDialogBuilder

import org.holoeverywhere.app.AlertDialog.Builder; //导入依赖的package包/类
@Override
protected void onPrepareDialogBuilder(Builder builder) {
    super.onPrepareDialogBuilder(builder);

    if (mEntries == null || mEntryValues == null) {
        throw new IllegalStateException(
                "MultiSelectListPreference requires an entries array and "
                        + "an entryValues array.");
    }

    boolean[] checkedItems = getSelectedItems();
    builder.setMultiChoiceItems(mEntries, checkedItems,
            new DialogInterface.OnMultiChoiceClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which,
                        boolean isChecked) {
                    if (isChecked) {
                        mPreferenceChanged |= mNewValues
                                .add(mEntryValues[which].toString());
                    } else {
                        mPreferenceChanged |= mNewValues
                                .remove(mEntryValues[which].toString());
                    }
                }
            });
    mNewValues.clear();
    mNewValues.addAll(mValues);
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:29,代码来源:MultiSelectListPreference.java


示例7: onCreate

import org.holoeverywhere.app.AlertDialog.Builder; //导入依赖的package包/类
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.foursquare_setup_activity);
	MenuActivity.hideLoader();

	wv = (WebView) findViewById(R.id.webview);

	ProgressDialog progressDialog = new ProgressDialog(this);
	progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
	progressDialog
			.setTitle(getString(R.string.foursquare_setup_prepare_title));
	progressDialog
			.setMessage(getString(R.string.foursquare_setup_prepare_msg));
	progressDialog.setCancelable(true);
	progressDialog.setMax(5);

	AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
	alertDialog
			.setTitle(getString(R.string.foursquare_setup_failure_title))
			.setMessage(getString(R.string.foursquare_setup_failure_msg))
			.setNeutralButton(getString(R.string.ok),
					new DialogInterface.OnClickListener() {
						public void onClick(DialogInterface dialog, int id) {
							SetupActivity.this.finish();
						}
					});

	new DownloadFoursquareSecretsTask(progressDialog, alertDialog)
			.execute();

}
 
开发者ID:seawolf,项目名称:KeepingTracks,代码行数:34,代码来源:SetupActivity.java


示例8: DownloadFoursquareSecretsTask

import org.holoeverywhere.app.AlertDialog.Builder; //导入依赖的package包/类
public DownloadFoursquareSecretsTask(ProgressDialog dialogFromActivity,
		Builder alertDialogFromActivity) {
	progressDialog = dialogFromActivity;
	alertDialog = alertDialogFromActivity;
}
 
开发者ID:seawolf,项目名称:KeepingTracks,代码行数:6,代码来源:SetupActivity.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HighlightComponent类代码示例发布时间:2022-05-22
下一篇:
Java Instance类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap