package com.example.suneyaenews;

 import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ViewFlipper; public class DetailActivity extends Activity {
private ViewFlipper mNewsbodyFilpper;
private LayoutInflater mNewsBodyInflater; private TextView tv_news_title,tv_news_body;
private final String NEWS = "<p>这是正文部分</p><input type='button' value='xx' /><br/>哈哈";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.newsdetail); mNewsbodyFilpper = (ViewFlipper) findViewById(R.id.id_viewflipper);
mNewsBodyInflater = getLayoutInflater();
View newsBodyView = mNewsBodyInflater.inflate(R.layout.news_body, null);
tv_news_title = (TextView) newsBodyView.findViewById(R.id.id_news_body_title);
tv_news_body = (TextView) newsBodyView.findViewById(R.id.id_news_body_zhengwen);
tv_news_title = (TextView) findViewById(R.id.id_news_body_title);
tv_news_body = (TextView) findViewById(R.id.id_news_body_zhengwen);
tv_news_title.setText("weiyl标题");
tv_news_body.setText(Html.fromHtml(NEWS)); View newsBodyView2 = mNewsBodyInflater.inflate(R.layout.news_body, null);
tv_news_title = (TextView) newsBodyView2.findViewById(R.id.id_news_body_title);
tv_news_body = (TextView) newsBodyView2.findViewById(R.id.id_news_body_zhengwen); tv_news_title = (TextView) findViewById(R.id.id_news_body_title);
tv_news_body = (TextView) findViewById(R.id.id_news_body_zhengwen);
tv_news_title.setText("weiyl标题2");
tv_news_body.setText(Html.fromHtml(NEWS)); mNewsbodyFilpper.addView(newsBodyView);
mNewsbodyFilpper.addView(newsBodyView2); } }
05-11 11:23