本文整理汇总了Java中android.app.ProgressDialog.requestWindowFeature方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressDialog.requestWindowFeature方法的具体用法?Java ProgressDialog.requestWindowFeature怎么用?Java ProgressDialog.requestWindowFeature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.app.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.requestWindowFeature方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mSpinner = new ProgressDialog(getContext());
mSpinner.requestWindowFeature(Window.FEATURE_NO_TITLE);
mSpinner.setMessage("Loading...");
mContent = new LinearLayout(getContext());
mContent.setOrientation(LinearLayout.VERTICAL);
setUpTitle();
setUpWebView();
Display display = getWindow().getWindowManager().getDefaultDisplay();
final float scale = getContext().getResources().getDisplayMetrics().density;
float[] dimensions =
(display.getWidth() < display.getHeight()) ? DIMENSIONS_PORTRAIT : DIMENSIONS_LANDSCAPE;
addContentView(mContent, new FrameLayout.LayoutParams((int) (dimensions[0] * scale + 0.5f),
(int) (dimensions[1] * scale + 0.5f)));
CookieSyncManager.createInstance(getContext());
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
}
示例2: setUpWebView
import android.app.ProgressDialog; //导入方法依赖的package包/类
private void setUpWebView() {
mSpinner = new ProgressDialog(this);
mSpinner.requestWindowFeature(Window.FEATURE_NO_TITLE);
mSpinner.setMessage("Loading...");
mWebView = new WebView(this);
mWebView.setVerticalScrollBarEnabled(false);
mWebView.setHorizontalScrollBarEnabled(false);
mWebView.setWebViewClient(new InstagramWebViewClient());
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl(mAuthUrl);
mWebView.setLayoutParams(FILL);
WebSettings webSettings = mWebView.getSettings();
webSettings.setSavePassword(false);
webSettings.setSaveFormData(false);
clearCache();
addContentView(mWebView,FILL);
}
示例3: initDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
private void initDialog(Activity activity) {
dialog = new ProgressDialog(activity);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCanceledOnTouchOutside(false);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage("请求网络中...");
}
示例4: BitmapDialogCallback
import android.app.ProgressDialog; //导入方法依赖的package包/类
public BitmapDialogCallback(Activity activity) {
super(1000, 1000);
dialog = new ProgressDialog(activity);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCanceledOnTouchOutside(false);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage("请求网络中...");
}
示例5: StringDialogCallback
import android.app.ProgressDialog; //导入方法依赖的package包/类
public StringDialogCallback(Activity activity) {
dialog = new ProgressDialog(activity);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCanceledOnTouchOutside(false);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage("请求网络中...");
}
示例6: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 设置ProgressDialog的样式
mSpinner = new ProgressDialog(getContext());
mSpinner.requestWindowFeature(Window.FEATURE_NO_TITLE);
mSpinner.setMessage("登录中...");
requestWindowFeature(Window.FEATURE_NO_TITLE);
mContent = new FrameLayout(getContext());
setUpWebView();
addContentView(mContent, MATCH);
}
示例7: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@SuppressLint("SetJavaScriptEnabled")
@Override
/**
* When the dialog is created, we add the webview and load the authorize url.
*/
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
mProgress = new ProgressDialog(getContext());
mProgress.requestWindowFeature(Window.FEATURE_NO_TITLE);
mProgress.setMessage("Loading...");
mLayout = new LinearLayout(getContext());
mLayout.setOrientation(LinearLayout.VERTICAL);
mWebView = new WebView(getContext());
mWebView.setVerticalScrollBarEnabled(false);
mWebView.setHorizontalScrollBarEnabled(false);
//mWebView.getSettings().setSupportZoom(false);
mWebView.setLayoutParams(MATCH);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setWebViewClient(new OAuthWebViewClient());
mWebView.setWebChromeClient(new WebChromeClient());
mWebView.loadUrl(mReq.getLocationUri());
mLayout.addView(mWebView);
Display display = getWindow().getWindowManager().getDefaultDisplay();
addContentView(mLayout, new FrameLayout.LayoutParams(display.getWidth() - 20, display.getHeight() - 20));
CookieSyncManager.createInstance(getContext());
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
}
示例8: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
spinner = new ProgressDialog(getContext());
spinner.requestWindowFeature(Window.FEATURE_NO_TITLE);
spinner.setMessage(getContext().getString(R.string.com_facebook_loading));
spinner.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dialogInterface) {
cancel();
}
});
requestWindowFeature(Window.FEATURE_NO_TITLE);
contentFrameLayout = new FrameLayout(getContext());
// First calculate how big the frame layout should be
resize();
getWindow().setGravity(Gravity.CENTER);
// resize the dialog if the soft keyboard comes up
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
/* Create the 'x' image, but don't add to the contentFrameLayout layout yet
* at this point, we only need to know its drawable width and height
* to place the webview
*/
createCrossImage();
/* Now we know 'x' drawable width and height,
* layout the webview and add it the contentFrameLayout layout
*/
int crossWidth = crossImageView.getDrawable().getIntrinsicWidth();
setUpWebView(crossWidth / 2 + 1);
/* Finally add the 'x' image to the contentFrameLayout layout and
* add contentFrameLayout to the Dialog view
*/
contentFrameLayout.addView(crossImageView, new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
setContentView(contentFrameLayout);
}