Implemented WebView to show description of item

This commit is contained in:
daniel oeh 2012-06-15 18:50:34 +02:00
parent d7e3bfc930
commit 8078e34912
3 changed files with 9 additions and 2 deletions

View File

@ -49,4 +49,8 @@
android:layout_width="0px"
android:layout_height="wrap_content"/>
</LinearLayout>
<WebView
android:id="@+id/webvDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>

View File

@ -7,6 +7,7 @@ import android.os.Bundle;
import android.text.format.DateUtils;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
@ -38,6 +39,7 @@ public class ItemviewActivity extends SherlockActivity {
private Button butPlay;
private Button butDownload;
private Button butRemove;
private WebView webvDescription;
@Override
public void onCreate(Bundle savedInstanceState) {
@ -117,7 +119,7 @@ public class ItemviewActivity extends SherlockActivity {
butPlay = (Button) findViewById(R.id.butPlay);
butDownload = (Button) findViewById(R.id.butDownload);
butRemove = (Button) findViewById(R.id.butRemove);
webvDescription = (WebView) findViewById(R.id.webvDescription);
setTitle(item.getFeed().getTitle());
txtvPublished.setText(DateUtils.formatSameDayTime(item.getPubDate()
@ -128,6 +130,7 @@ public class ItemviewActivity extends SherlockActivity {
imgvImage
.setImageBitmap(item.getFeed().getImage().getImageBitmap());
}
webvDescription.loadData(item.getDescription(), "text/html", null);
}
private void getDownloadStatus() {

View File

@ -81,7 +81,7 @@ public class NSRSS20 extends Namespace {
if (second.equals(CHANNEL)) {
state.getFeed().setDescription(content);
} else if (second.equals(ITEM)) {
state.getFeed().setDescription(content);
state.getCurrentItem().setDescription(content);
}
} else if (top.equals(LINK)) {
if (second.equals(CHANNEL)) {