多 MarkdownView 文件

Multi MarkdownView File

我有一个主题列表视图所有内容都来自 MarkDown 我在更改 每次点击列表视图中的项目都会降价

 if (position == 0) {
        Intent intent = getIntent();
        Bundle bundle = this.getIntent().getExtras();
         aTitle = intent.getStringExtra("title");
        actionBar.setTitle(aTitle);
        markdownView.loadMarkdownFile(BASE, "file:///android_asset/Objects.md", STYLES, SCRIPT);
    }else if (position == 1){
        Intent intent = getIntent();
        Bundle bundle = this.getIntent().getExtras();
        aTitle = intent.getStringExtra("title");
        actionBar.setTitle(aTitle);
        markdownView.loadMarkdownFile(BASE, "file:///android_asset/les2.md", STYLES, SCRIPT);
    }

我把 link 放在第一个 activity 的 putExtra 中,它起作用了

 if (position == 0) {
        Intent intent = getIntent();
        Bundle bundle = this.getIntent().getExtras();
         aTitle = intent.getStringExtra("title");
         lessons = intent.getStringExtra("lessons");
        actionBar.setTitle(aTitle);

        if (markdownView != null)
        {
            markdownView.loadMarkdownFile(BASE, lessons, STYLES, SCRIPT);
            WebSettings settings = markdownView.getSettings();
            settings.setBuiltInZoomControls(true);
            settings.setDisplayZoomControls(false);
        }

    }else if (position == 1){
        Intent intent = getIntent();
        Bundle bundle = this.getIntent().getExtras();
        aTitle = intent.getStringExtra("title");
        lessons = intent.getStringExtra("lessons");
        actionBar.setTitle(aTitle);
        if (markdownView != null)
        {
            markdownView.loadMarkdownFile(BASE, lessons, STYLES, SCRIPT);
            WebSettings settings = markdownView.getSettings();
            settings.setBuiltInZoomControls(true);
            settings.setDisplayZoomControls(false);
        }
    }