handle text html in j2me

江枫思渺然 提交于 2019-12-11 02:56:37

问题


I tried to make application RSS news, and it can give detail news to user.

When I go to detail, the body text is show the html tag.

This is picture of my application:

I don't want to show html tags.

This is my code to show detail page:

private void detailScreen(News news){
    Form form = new Form(news.getTitle());

    StringItem detail = new StringItem("", news.getBody().toString());
    mBackCommand = new Command("Back", Command.BACK, 0);

    form.append(detail);
    form.addCommand(mBackCommand);
    form.setCommandListener(this);

    //Canvas c = new MyCanvas(this, news);

    mDisplay.setCurrent(form);
}

Please can someone tell me what's I'm doing wrong here?

来源:https://stackoverflow.com/questions/9715597/handle-text-html-in-j2me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!