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


Java ProgressDialog.requestWindowFeature方法代码示例

本文整理汇总了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();
}
 
开发者ID:mukeshsolanki,项目名称:social-login-helper,代码行数:20,代码来源:InstagramDialog.java

示例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);
}
 
开发者ID:inceleb,项目名称:InstagramManager-Android,代码行数:25,代码来源:LoginActivity.java

示例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("请求网络中...");
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:DialogCallback.java

示例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("请求网络中...");
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:BitmapDialogCallback.java

示例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("请求网络中...");
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:StringDialogCallback.java

示例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);
}
 
开发者ID:dueros,项目名称:dcs-sdk-java,代码行数:13,代码来源:BaiduDialog.java

示例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();
	
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:39,代码来源:OAuthDialog.java

示例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);
}
 
开发者ID:eviltnan,项目名称:kognitivo,代码行数:46,代码来源:WebDialog.java


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