KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am parsing xml and then loading it to web view. After parsing, I am creating four strings so that I could append all strings to one view. I am able to get two views on the web view, but not the first two strings. Please suggest in my code, where I am going wrong and the correct way to get the formatted html strings on the web view. @Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub String chapterTitle = ""; String SubChapterTitle=""; String chapterIntro =""; String chapterContent=""; View view = convertView; if (convertView == null) { // view = inflater.inflate(resourceid, null); view = getLayoutInflater().inflate(R.layout.webviewitem, null); } synchronized (view) { WebView wv = (WebView) view.findViewById(R.id.contentWebView); WebSettings settings = wv.getSettings(); settings.setUseWideViewPort(true); settings.setLoadWithOverviewMode(true); settings.setJavaScriptEnabled(true); settings.setDefaultZoom(ZoomDensity.FAR); // wv.setBackgroundColor(0); wv.setVerticalScrollBarEnabled(false); wv.setHorizontalScrollBarEnabled(false); /*String txtChapTitle = Intro.book.getsecretList().get(position) .getChtitle().toString();*/ if (!(Intro.book.getsecretList().get(position).getChtitle() .toString().equals(""))){ chapterTitle = "<b><fontSize=4>"+Intro.book.getsecretList().get(position) .getChtitle().toString()+"</font></b>"; } if (!(Intro.book.getsecretList().get(position) .getSubtitle() == null)) { SubChapterTitle = "<b>
Tags (comma-separated)
Save Edits
Cancel