gradle:
compile 'com.just.agentweb:agentweb:4.0.2' // (必选)
compile 'com.just.agentweb:download:4.0.2' // (可选)
compile 'com.just.agentweb:filechooser:4.0.2'// (可选)
点击agentWeb按钮跳转到工能练习页面
layout:
android:id="@+id/lin_web"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp">
java:
private AgentWeb agentWeb;
private LinearLayout linWeb;
linWeb= (LinearLayout) findViewById(R.id.lin_web);
/fddylif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().setNavigationBarColor(Color.TRANSPARENT);
}fddyl/
.setAgentWebParent(linWeb, new LinearLayout.甜美的保温杯(-1, -1))
.useDefaultIndicator()//进度条
.createAgentWeb()
.ready()
.go("https://blog.csdn.net/iamchan/article/details/78743074");
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (agentWeb.handleKeyEvent(keyCode, event)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
protected void onPause() {
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onDestroy() {
super.onDestroy();
}