2013-08-22 31 views
1

您好新來android在這個項目中我會顯示股票的紡織品,我有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

是的,這是可能的。請參閱我的答案在這裏 http://stackoverflow.com/questions/8196503/pinch-zoom-on-a-listview/25845655#25845655 –

回答

0

試試這個,U可以使用的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"); 
+0

它不是網絡查看應用程序,PLZ解釋詳細.. – ibu