本文整理汇总了Java中android.webkit.WebViewFragment类的典型用法代码示例。如果您正苦于以下问题:Java WebViewFragment类的具体用法?Java WebViewFragment怎么用?Java WebViewFragment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WebViewFragment类属于android.webkit包,在下文中一共展示了WebViewFragment类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveInitialConstants
import android.webkit.WebViewFragment; //导入依赖的package包/类
static
void saveInitialConstants(FeedsActivity activity)
{
s_activity = activity;
s_resources = activity.getResources();
s_displayMetrics = s_resources.getDisplayMetrics();
s_fragmentManager = activity.getFragmentManager();
s_actionBar = activity.getActionBar();
s_windowManager = activity.getWindowManager();
s_eightDp = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8.0F, s_displayMetrics));
s_fragmentFeeds = (FragmentFeeds) findFragment(R.id.fragment_feeds);
s_fragmentFavourites = (ListFragmentFavourites) findFragment(R.id.fragment_favourites);
s_fragmentManage = (ListFragmentManage) findFragment(R.id.fragment_manage);
s_fragmentSettings = (FragmentSettings) findFragment(R.id.fragment_settings);
s_fragmentWeb = (WebViewFragment) findFragment(R.id.fragment_web);
s_fragmentDrawer = (FragmentNavigationDrawer) findFragment(R.id.fragment_navigation_drawer);
s_drawerLayout = (DrawerLayout) findView(R.id.drawer_layout);
}
示例2: onCreateView
import android.webkit.WebViewFragment; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) {
View result=inflater.inflate(R.layout.webfrag, container, false);
final WebViewFragment wvf=new WebViewFragment();
getChildFragmentManager().beginTransaction()
.add(R.id.nested_web, wvf).commit();
result.post(new Runnable() {
@Override
public void run() {
wvf.getWebView().loadUrl("https://commonsware.com");
}
});
return(result);
}
示例3: onCreate
import android.webkit.WebViewFragment; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mUri = getIntent().getData();
setContentView(R.layout.webview_activity);
WebViewFragment wvf = (WebViewFragment)getFragmentManager().findFragmentById(R.id.webview_fragment);
mWebView = wvf.getWebView();
}
示例4: onCreate
import android.webkit.WebViewFragment; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
aboutWebView = new WebViewFragment();
if (savedInstanceState == null) {
getFragmentManager().beginTransaction()
.add(R.id.container, aboutWebView).commit();
}
}
示例5: onCreate
import android.webkit.WebViewFragment; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
actionBar.setDisplayHomeAsUpEnabled(true);
fragWebView = new WebViewFragment();
getFragmentManager()
.beginTransaction()
.replace(android.R.id.content, fragWebView)
.commit();
}