本文整理汇总了Java中im.delight.android.webview.AdvancedWebView类的典型用法代码示例。如果您正苦于以下问题:Java AdvancedWebView类的具体用法?Java AdvancedWebView怎么用?Java AdvancedWebView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AdvancedWebView类属于im.delight.android.webview包,在下文中一共展示了AdvancedWebView类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: MakiListener
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
public MakiListener(MainActivity activity, WebView view) {
fActivity = activity;
mCoordinatorLayoutView = activity.mCoordinatorLayoutView;
webView = (AdvancedWebView) view;
FAB = (FloatingActionMenu) activity.findViewById(R.id.fab);
bottomNavigation = (AHBottomNavigation) activity.findViewById(R.id.bottom_navigation);
preferences = PreferenceManager.getDefaultSharedPreferences(activity);
mScrollThreshold = activity.getResources().getDimensionPixelOffset(R.dimen.fab_scroll_threshold);
mDownloadManager = (DownloadManager) fActivity.getSystemService(Context.DOWNLOAD_SERVICE);
context = MakiApplication.getContextOfApplication();
}
开发者ID:sfilmak,项目名称:MakiLite,代码行数:12,代码来源:MakiListener.java
示例2: download
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
private void download(String url, String name) {
if (!sharedPreferences.getBoolean("external_download", false)) {
if (AdvancedWebView.handleDownload(this, url, name)) {
Toast.makeText(MainActivity.this, getString(R.string.download_started), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(MainActivity.this, getString(R.string.cant_download), Toast.LENGTH_SHORT).show();
}
} else {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
}
}
开发者ID:vojta-horanek,项目名称:APKMirror,代码行数:15,代码来源:MainActivity.java
示例3: OAuthTokenTask
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
public OAuthTokenTask(
OAuthManagerFragmentController ctrl,
AdvancedWebView webView
) {
this.mCtrl = ctrl;
this.mWebView = webView;
}
开发者ID:fullstackreact,项目名称:react-native-oauth,代码行数:8,代码来源:OAuthManagerFragmentController.java
示例4: Load1AccessTokenTask
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
public Load1AccessTokenTask(
OAuthManagerFragmentController ctrl,
AdvancedWebView view,
OAuth1RequestToken requestToken,
String oauthVerifier
) {
super(ctrl, view);
this.oauthVerifier = oauthVerifier;
}
开发者ID:fullstackreact,项目名称:react-native-oauth,代码行数:10,代码来源:OAuthManagerFragmentController.java
示例5: Load2AccessTokenTask
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
public Load2AccessTokenTask(
OAuthManagerFragmentController ctrl,
AdvancedWebView view,
String authorizationCode
) {
super(ctrl, view);
this.authorizationCode = authorizationCode;
}
开发者ID:fullstackreact,项目名称:react-native-oauth,代码行数:9,代码来源:OAuthManagerFragmentController.java
示例6: onCreateView
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_web, container, false);
ButterKnife.bind(this, rootView);
mWebview.setListener(WebFragment.this, this);
mWebview.loadUrl(Constants.URL_INIT, true);
mWebview.addHttpHeader("X-Requested-With", Constants.HEADER_APP);
mWebview.getSettings().setSupportZoom(true);
mWebview.getSettings().setBuiltInZoomControls(true);
mWebview.getSettings().setDisplayZoomControls(false);
mWebview.setWebChromeClient(new WebChromeClient() {
@Override
public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) {
AdvancedWebView newWebView = new AdvancedWebView(getActivity());
// myParentLayout.addView(newWebView, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
transport.setWebView(newWebView);
resultMsg.sendToTarget();
return true;
}
});
return rootView;
}
开发者ID:utopiatransformacionsocial,项目名称:madriddespierto,代码行数:29,代码来源:WebFragment.java
示例7: WebViewListener
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
WebViewListener(MainActivity activity, WebView view) {
mActivity = activity;
mCoordinatorLayoutView = activity.mCoordinatorLayoutView;
mWebView = (AdvancedWebView) view;
mPreferences = PreferenceManager.getDefaultSharedPreferences(activity);
mScrollThreshold = activity.getResources().getDimensionPixelOffset(R.dimen.fab_scroll_threshold);
mMenuFAB = (FloatingActionMenu) activity.findViewById(R.id.menuFAB);
mDownloadManager = (DownloadManager) mActivity.getSystemService(Context.DOWNLOAD_SERVICE);
}
开发者ID:JakeLane,项目名称:Toffeed,代码行数:10,代码来源:WebViewListener.java
示例8: getRequestTokenUrlAndLoad
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
public void getRequestTokenUrlAndLoad(AdvancedWebView webView) {
mWebView = webView;
LoadRequestTokenTask task = new LoadRequestTokenTask(this, webView);
task.execute();
}
开发者ID:fullstackreact,项目名称:react-native-oauth,代码行数:6,代码来源:OAuthManagerFragmentController.java
示例9: LoadRequestTokenTask
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
public LoadRequestTokenTask(
OAuthManagerFragmentController ctrl,
AdvancedWebView view
) {
super(ctrl, view);
}
开发者ID:fullstackreact,项目名称:react-native-oauth,代码行数:7,代码来源:OAuthManagerFragmentController.java
示例10: onCreateView
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final Context context = mReactContext;
LayoutParams rootViewLayoutParams = this.getFullscreenLayoutParams(context);
RelativeLayout rootView = new RelativeLayout(context);
mProgressBar = new ProgressBar(context);
RelativeLayout.LayoutParams progressParams = new RelativeLayout.LayoutParams(convertDpToPixel(50f,context),convertDpToPixel(50f,context));
progressParams.addRule(RelativeLayout.CENTER_IN_PARENT);
mProgressBar.setLayoutParams(progressParams);
mProgressBar.setIndeterminate(true);
getDialog().setCanceledOnTouchOutside(true);
rootView.setLayoutParams(rootViewLayoutParams);
// mWebView = (AdvancedWebView) rootView.findViewById(R.id.webview);
Log.d(TAG, "Creating webview");
mWebView = new AdvancedWebView(context);
// mWebView.setId(WEBVIEW_TAG);
mWebView.setListener(this, this);
mWebView.setVisibility(View.VISIBLE);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setDomStorageEnabled(true);
mWebView.getSettings().setUserAgentString("Mozilla/5.0 Google");
LayoutParams layoutParams = this.getFullscreenLayoutParams(context);
//new LayoutParams(
// LayoutParams.FILL_PARENT,
// DIALOG_HEIGHT
// );
// mWebView.setLayoutParams(layoutParams);
rootView.addView(mWebView, layoutParams);
rootView.addView(mProgressBar,progressParams);
// LinearLayout pframe = new LinearLayout(context);
// pframe.setId(WIDGET_TAG);
// pframe.setOrientation(LinearLayout.VERTICAL);
// pframe.setVisibility(View.GONE);
// pframe.setGravity(Gravity.CENTER);
// pframe.setLayoutParams(layoutParams);
// rootView.addView(pframe, layoutParams);
this.setupWebView(mWebView);
mController.getRequestTokenUrlAndLoad(mWebView);
Log.d(TAG, "Loading view...");
return rootView;
}
开发者ID:fullstackreact,项目名称:react-native-oauth,代码行数:53,代码来源:OAuthManagerDialogFragment.java
示例11: onCreate
import im.delight.android.webview.AdvancedWebView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// setup the webView
webViewTwitter = (AdvancedWebView) findViewById(R.id.webView);
webViewTwitter.setListener(this, this);
webViewTwitter.addPermittedHostname("mobile.twitter.com");
webViewTwitter.addPermittedHostname("twitter.com");
//full screen video
myWebChromeClient = new WebChromeClient(){
//this custom WebChromeClient allow to show video on full screen
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
mCustomViewCallback = callback;
mTargetView.addView(view);
mCustomView = view;
mContentView.setVisibility(View.GONE);
mTargetView.setVisibility(View.VISIBLE);
mTargetView.bringToFront();
}
@Override
public void onHideCustomView() {
if (mCustomView == null)
return;
mCustomView.setVisibility(View.GONE);
mTargetView.removeView(mCustomView);
mCustomView = null;
mTargetView.setVisibility(View.GONE);
mCustomViewCallback.onCustomViewHidden();
mContentView.setVisibility(View.VISIBLE);
}
};
webViewTwitter.setWebChromeClient(myWebChromeClient);
mContentView = (FrameLayout) findViewById(R.id.main_content);
mTargetView = (FrameLayout) findViewById(R.id.target_view);
String urlSharer = ExternalLinkListener();//get the external shared link (if it exists)
if (urlSharer != null) {//if is a share request
webViewTwitter.loadUrl(urlSharer);//load the sharer url
} else {
webViewTwitter.loadUrl(getString(R.string.urlTwitterMobile));//load homepage
}
}
开发者ID:rignaneseleo,项目名称:SlimSocial-for-Twitter,代码行数:55,代码来源:MainActivity.java
注:本文中的im.delight.android.webview.AdvancedWebView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论