Skip to content

Commit

Permalink
Merge pull request #485 from cundong/dev
Browse files Browse the repository at this point in the history
Add WebView Plugin
  • Loading branch information
cundong authored Jan 19, 2018
2 parents 44ff8f3 + 40c9545 commit a21eed6
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 5 deletions.
Binary file modified replugin-sample/host/app/src/main/assets/plugins/demo1.jar
Binary file not shown.
Binary file modified replugin-sample/host/app/src/main/assets/plugins/webview.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public void onClick(View v) {
findViewById(R.id.btn_start_demo4).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// 示例:直接通过宿主打开WebView插件中的Activity
// FIXME: 后续可以将webview MainActivity URL 改为动态传入
// 若没有安装,则直接提示“错误”
if (RePlugin.isPluginInstalled("webview")) {
RePlugin.startActivity(MainActivity.this, RePlugin.createIntent("webview", "com.qihoo360.replugin.sample.webview.MainActivity"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* @author RePlugin Team
*
* WebView 示例
* WebView 示例,具体业务逻辑由webView插件来实现
*/
public class WebViewActivity extends Activity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qihoo360.replugin.sample.webview">

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.INTERNET" />

<application
android:name="com.qihoo360.replugin.sample.webview.MainApp"
android:allowBackup="false"
android:icon="@drawable/app_icon"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name">

<meta-data
Expand All @@ -44,4 +44,4 @@
</activity>
</application>

</manifest>
</manifest>
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
-->

<resources>
<string name="app_name">Webview</string>
<string name="app_name">WebView</string>
</resources>

0 comments on commit a21eed6

Please sign in to comment.