你是我在这个项目的新手我会显示纺织品的库存,我有listview它会在行视图中显示数据,我想捏缩放这个列表视图,请帮帮我。
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.bsdselect);
//lv1=(ListView)findViewById(R.id.list1);
lv=(ListView)findViewById(R.id.listbsd);
title=(TextView)findViewById(R.id.title);
Bundle b=this.getIntent().getExtras();
items=b.getString("item");
items1=b.getString("item1");
dates=b.getString("date");
String topic=items+"/"+items1;
title.setText(topic);
SimpleDateFormat dateFormat = new SimpleDateFormat(
"yyyy-MM-dd");
Date myDate = null;
try {
myDate = dateFormat.parse(dates);
} catch (ParseException e) {
e.printStackTrace();
}
SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd");
finalDate = timeFormat.format(myDate);
torun();
}
答案 0 :(得分:0)
试试这个,你可以使用webview来实现这个
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setBuiltInZoomControls(true);
String base = Environment.getExternalStorageDirectory().getAbsolutePath().toString();
String imagePath = "file:/"+ base + "/test.jpg";
String html = "<html><head></head><body><img src=\""+ imagePath + "\"></body></html>";
mWebView.loadData(html, "text/html","utf-8");