本文整理匯總了Java中android.app.AlertDialog.THEME_DEVICE_DEFAULT_LIGHT屬性的典型用法代碼示例。如果您正苦於以下問題:Java AlertDialog.THEME_DEVICE_DEFAULT_LIGHT屬性的具體用法?Java AlertDialog.THEME_DEVICE_DEFAULT_LIGHT怎麽用?Java AlertDialog.THEME_DEVICE_DEFAULT_LIGHT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類android.app.AlertDialog
的用法示例。
在下文中一共展示了AlertDialog.THEME_DEVICE_DEFAULT_LIGHT屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showAbout
/**
* Show webview with about screen
* html is taken from assets
*
* @param context
*/
@SuppressLint("SetJavaScriptEnabled")
public static void showAbout(Context context) {
AlertDialog.Builder alert = new AlertDialog.Builder(context, AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
WebView wv = new WebView(context);
wv.getSettings().setJavaScriptEnabled(true);
wv.loadUrl("file:///android_asset/about.html");
wv.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
alert.setView(wv);
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
}
});
alert.show();
}
示例2: createDialog
@SuppressLint("NewApi")
private AlertDialog.Builder createDialog(CordovaInterface cordova) {
int currentapiVersion = android.os.Build.VERSION.SDK_INT;
if (currentapiVersion >= android.os.Build.VERSION_CODES.HONEYCOMB) {
return new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
} else {
return new AlertDialog.Builder(cordova.getActivity());
}
}
示例3: createProgressDialog
@SuppressLint("InlinedApi")
private ProgressDialog createProgressDialog(CordovaInterface cordova) {
int currentapiVersion = android.os.Build.VERSION.SDK_INT;
if (currentapiVersion >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
return new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
} else {
return new ProgressDialog(cordova.getActivity());
}
}
示例4: DialogBuilder
public DialogBuilder(final Context context) {
super(context, Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP ? AlertDialog.THEME_HOLO_LIGHT
: AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
this.customTitle = LayoutInflater.from(context).inflate(R.layout.dialog_title, null);
this.iconView = (ImageView) customTitle.findViewById(android.R.id.icon);
this.titleView = (TextView) customTitle.findViewById(android.R.id.title);
}