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