本文整理汇总了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);
}