Java Code Examples for android.widget.RelativeLayout#requestLayout()
The following examples show how to use
android.widget.RelativeLayout#requestLayout() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SamlWebViewDialog.java From Cirrus_depricated with GNU General Public License v2.0 | 4 votes |
@SuppressWarnings("deprecation") @SuppressLint("SetJavaScriptEnabled") @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Log_OC.v(TAG, "onCreateView, savedInsanceState is " + savedInstanceState); // Inflate layout of the dialog RelativeLayout ssoRootView = (RelativeLayout) inflater.inflate(R.layout.sso_dialog, container, false); // null parent view because it will go in the dialog layout if (mSsoWebView == null) { // initialize the WebView mSsoWebView = new SsoWebView(getActivity().getApplicationContext()); mSsoWebView.setFocusable(true); mSsoWebView.setFocusableInTouchMode(true); mSsoWebView.setClickable(true); WebSettings webSettings = mSsoWebView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setBuiltInZoomControls(false); webSettings.setLoadWithOverviewMode(false); webSettings.setSavePassword(false); webSettings.setUserAgentString(MainApp.getUserAgent()); webSettings.setSaveFormData(false); CookieManager cookieManager = CookieManager.getInstance(); cookieManager.setAcceptCookie(true); cookieManager.removeAllCookie(); mSsoWebView.loadUrl(mInitialUrl); } mWebViewClient.setTargetUrl(mTargetUrl); mSsoWebView.setWebViewClient(mWebViewClient); // add the webview into the layout RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT ); ssoRootView.addView(mSsoWebView, layoutParams); ssoRootView.requestLayout(); return ssoRootView; }