android scroll and see details like whatsup -
place icon down arrow user can know there details shown below in android.
after scrolled page end, scroll arrow gone.
scrollview1.getviewtreeobserver().addonscrollchangedlistener(new onscrollchangedlistener() { public void onscrollchanged() { int scrollviewheight = scrollview1.getchildat(0).getheight(); log.e("scrollview_height", "scroll" + scrollviewheight); double size = 0; displaymetrics dm = mcontext.getresources().getdisplaymetrics(); float screenwidth = dm.widthpixels / dm.xdpi; float screenheight = dm.heightpixels / dm.ydpi; float = dm.heightpixels; log.e("height in i", "" + i); double heightininch = math.sqrt(math.pow(screenheight, 2)); log.e("height in inch", "" + heightininch); size = math.sqrt(math.pow(screenwidth, 2) + math.pow(screenheight, 2)); log.e("screen", "" + size); if (size >= 6) { if (scrollviewheight >= (int)i) { downindicator.setvisibility(view.visible); // topindicator.setvisibility(view.visible); } } } });
Comments
Post a Comment