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