Issue in Image scrolling vertically
I have to load the view in webview by executing its url,and the two relative layouts there in Linearlayout i hide one at the time showing url in webview,it have scroll on both vertical and horizontal,the problem i'm facing here is it only scrolls horizontally only but i need to view it also in vertical also,
here the xml code for layout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_marginTop="5dip" android:layout_marginBottom="5dip"
android:scrollbars="none">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:id="@+id/jr_lb_view_preview">
<ProgressBar android:id="@开发者_开发技巧+id/jr_lb_content_iv_progress"
android:layout_centerInParent="true" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminateDrawable="@drawable/pb" />
<ImageView android:id="@+id/jr_lb_content_iv"
android:layout_centerInParent="true" android:layout_width="150dip"
android:layout_height="225dip" android:background="@drawable/border"/>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/jr_lb_wb_view" android:background="@drawable/border"
android:scrollX="1dip">
<WebView android:id="@+id/jr_lb_view_preview_switcher2"
android:layout_width="308dip" android:layout_height="305dip"
android:background="@drawable/border" android:scrollbars="vertical"
android:scrollbarAlwaysDrawVerticalTrack="true"/>
</RelativeLayout>
</LinearLayout>
the activity code
public void onClick(View v) {
preview.setVisibility(View.GONE);
g.setSelection(gPosition);
webview = (WebView) findViewById(R.id.jr_lb_view_preview_switcher2);
webview.getSettings().setBuiltInZoomControls(true);
new Task_Item_Selected().execute();
webview.loadUrl(product_img_large[gPosition]);
webview.setVisibility(WebView.VISIBLE);
preview2.setVisibility(View.VISIBLE);
// applyRotation(0, 0, 90);
}
anybody help me fix it, thanks in advance
change your layout height as "FILL_PARENT" or "MATCH_PRAENT"
精彩评论