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


Java Dialog.setFeatureDrawableResource方法代码示例

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


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

示例1: optionLegend

import android.app.Dialog; //导入方法依赖的package包/类
private void optionLegend() {
	// Show help
	Dialog dialog = new Dialog(ActivityApp.this);
	dialog.requestWindowFeature(Window.FEATURE_LEFT_ICON);
	dialog.setTitle(R.string.menu_legend);
	dialog.setContentView(R.layout.legend);
	dialog.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, getThemed(R.attr.icon_launcher));

	((ImageView) dialog.findViewById(R.id.imgHelpHalf)).setImageBitmap(getHalfCheckBox());
	((ImageView) dialog.findViewById(R.id.imgHelpOnDemand)).setImageBitmap(getOnDemandCheckBox());

	for (View child : Util.getViewsByTag((ViewGroup) dialog.findViewById(android.R.id.content), "main"))
		child.setVisibility(View.GONE);

	((LinearLayout) dialog.findViewById(R.id.llUnsafe)).setVisibility(PrivacyManager.cVersion3 ? View.VISIBLE
			: View.GONE);

	dialog.setCancelable(true);
	dialog.show();
}
 
开发者ID:ukanth,项目名称:XPrivacy,代码行数:21,代码来源:ActivityApp.java

示例2: optionLegend

import android.app.Dialog; //导入方法依赖的package包/类
private void optionLegend() {
	// Show help
	Dialog dialog = new Dialog(ActivityMain.this);
	dialog.requestWindowFeature(Window.FEATURE_LEFT_ICON);
	dialog.setTitle(R.string.menu_legend);
	dialog.setContentView(R.layout.legend);
	dialog.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, getThemed(R.attr.icon_launcher));

	((ImageView) dialog.findViewById(R.id.imgHelpHalf)).setImageBitmap(getHalfCheckBox());
	((ImageView) dialog.findViewById(R.id.imgHelpOnDemand)).setImageBitmap(getOnDemandCheckBox());

	for (View child : Util.getViewsByTag((ViewGroup) dialog.findViewById(android.R.id.content), "details"))
		child.setVisibility(View.GONE);

	((LinearLayout) dialog.findViewById(R.id.llUnsafe)).setVisibility(PrivacyManager.cVersion3 ? View.VISIBLE
			: View.GONE);

	dialog.setCancelable(true);
	dialog.show();
}
 
开发者ID:ukanth,项目名称:XPrivacy,代码行数:21,代码来源:ActivityMain.java

示例3: optionTutorial

import android.app.Dialog; //导入方法依赖的package包/类
private void optionTutorial() {
	((ScrollView) findViewById(R.id.svTutorialHeader)).setVisibility(View.VISIBLE);
	((ScrollView) findViewById(R.id.svTutorialDetails)).setVisibility(View.VISIBLE);
	int userId = Util.getUserId(Process.myUid());
	PrivacyManager.setSetting(userId, PrivacyManager.cSettingTutorialMain, Boolean.FALSE.toString());

	Dialog dlgUsage = new Dialog(this);
	dlgUsage.requestWindowFeature(Window.FEATURE_LEFT_ICON);
	dlgUsage.setTitle(R.string.title_usage_header);
	dlgUsage.setContentView(R.layout.usage);
	dlgUsage.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, getThemed(R.attr.icon_launcher));
	dlgUsage.setCancelable(true);
	dlgUsage.show();
}
 
开发者ID:ukanth,项目名称:XPrivacy,代码行数:15,代码来源:ActivityMain.java

示例4: showHelp

import android.app.Dialog; //导入方法依赖的package包/类
@SuppressLint("InflateParams")
public static void showHelp(ActivityBase context, View parent, Hook hook) {
	// Build dialog
	Dialog dlgHelp = new Dialog(context);
	dlgHelp.requestWindowFeature(Window.FEATURE_LEFT_ICON);
	dlgHelp.setTitle(R.string.app_name);
	dlgHelp.setContentView(R.layout.helpfunc);
	dlgHelp.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, context.getThemed(R.attr.icon_launcher));
	dlgHelp.setCancelable(true);

	// Set title
	TextView tvTitle = (TextView) dlgHelp.findViewById(R.id.tvTitle);
	tvTitle.setText(hook.getName());

	// Set info
	TextView tvInfo = (TextView) dlgHelp.findViewById(R.id.tvInfo);
	tvInfo.setText(Html.fromHtml(hook.getAnnotation()));
	tvInfo.setMovementMethod(LinkMovementMethod.getInstance());

	// Set permissions
	String[] permissions = hook.getPermissions();
	if (permissions != null && permissions.length > 0)
		if (!permissions[0].equals("")) {
			TextView tvPermissions = (TextView) dlgHelp.findViewById(R.id.tvPermissions);
			tvPermissions.setText(Html.fromHtml(TextUtils.join("<br />", permissions)));
		}

	dlgHelp.show();
}
 
开发者ID:ukanth,项目名称:XPrivacy,代码行数:30,代码来源:ActivityApp.java


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