I have a activity that shows a howizontalscrollview with a horizontally long imageview.

I need that when the activity starts, the horizontalscrollview must be scrolled to the center of itselft, and not to the start.

I'm searching on google and here and i can't find the way..

this is my horizontal scroll view:

    HorizontalScrollView wvScroll = new HorizontalScrollView(this);
    wvScroll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); 
    iv.setImageBitmap(Util.getRemoteImage("http://mywebsite.com/90.gif"));
    iv.setScaleType(ScaleType.CENTER_CROP);
    wvScroll.addView(iv);
    mainLayout.addView(wvScroll);

Thanks

Edit
Report