1

Hi am new to android in this project i will display stock of textile, i had listview it will display the data in row view , i want to pinch zoom in this list view, please help me.

@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();

}
ibu
  • 579
  • 4
  • 9
  • 24
  • yes this is possible. please refer to my answer here http://stackoverflow.com/questions/8196503/pinch-zoom-on-a-listview/25845655#25845655 – Deepika Lalra Sep 15 '14 at 10:15

1 Answers1

0

Try this,U can use webview for this

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");
shiju B
  • 1,690
  • 10
  • 23