android - Making WebView scrollable within FrameLayout -
<framelayout android:layout_width="match_parent" android:layout_height="match_parent"> <webview android:id="@+id/webview1" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:focusable="true" android:focusableintouchmode="true" /> <view android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/darkview" android:background="#99000000" android:visibility="gone" /> </framelayout> i want webview scrollable in current scenario. it's not scrolling right now. should do?
the complete .xml file of above code part of is:
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <framelayout android:layout_width="match_parent" android:layout_height="match_parent"> <webview android:id="@+id/webview1" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:focusable="true" android:focusableintouchmode="true" /> <view android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="false" android:focusableintouchmode="false" android:clickable="false" android:id="@+id/darkview" android:background="#99000000" android:visibility="gone" /> </framelayout> <slidingdrawer android:id="@+id/bottom" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerhorizontal="true" android:orientation="vertical" android:layout_margintop="120dp" android:content="@+id/content" android:handle="@+id/handle" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:clickable="true" > <imageview android:id="@+id/handle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/iris" /> <linearlayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center_horizontal"> <textview android:id="@+id/tvabc" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="share this:" android:textcolor="#a3a3a3" android:padding="10dp" android:fontfamily="sans-serif" android:background="#eeeeee" android:gravity="center_horizontal"/> <view android:layout_width="fill_parent" android:layout_height="0.1dp" android:background="@android:color/darker_gray"/> <listview android:id="@+id/lv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#eeeeee"> </listview> <view android:layout_width="fill_parent" android:layout_height="4dp" /> <button android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/bcancel" android:text="cancel" android:background="#eeeeee" android:textcolor="#11d8f5"/> <view android:layout_width="fill_parent" android:layout_height="4dp" /> </linearlayout> </slidingdrawer> </relativelayout>
try :
<framelayout android:layout_width="match_parent" android:layout_height="match_parent"> <webview android:id="@+id/webview1" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:focusable="true" android:focusableintouchmode="true" /> <view android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="false" android:focusableintouchmode="false" android:clickable="false" android:id="@+id/darkview" android:background="#99000000" android:visibility="gone" /> </framelayout> issue due slidingdrawer not due framelayout. try alternate code made slidingdrawer android:clickable="false" , worked :
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <framelayout android:layout_width="match_parent" android:layout_height="match_parent"> <webview android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:focusable="true" android:focusableintouchmode="true" /> <view android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="false" android:focusableintouchmode="false" android:clickable="false" android:id="@+id/darkview" android:background="#99ff0000" android:visibility="visible" /> </framelayout> <slidingdrawer android:id="@+id/bottom" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerhorizontal="true" android:orientation="vertical" android:layout_margintop="120dp" android:content="@+id/content" android:handle="@+id/handle" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:clickable="false" > <imageview android:id="@+id/handle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/go_button" /> <linearlayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center_horizontal"> <textview android:id="@+id/tvabc" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="share this:" android:textcolor="#a3a3a3" android:padding="10dp" android:fontfamily="sans-serif" android:background="#eeeeee" android:gravity="center_horizontal"/> <view android:layout_width="fill_parent" android:layout_height="0.1dp" android:background="@android:color/darker_gray"/> <listview android:id="@+id/lv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#eeeeee"> </listview> <view android:layout_width="fill_parent" android:layout_height="4dp" /> <button android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/bcancel" android:text="cancel" android:background="#eeeeee" android:textcolor="#11d8f5"/> <view android:layout_width="fill_parent" android:layout_height="4dp" /> </linearlayout> </slidingdrawer> </relativelayout>
Comments
Post a Comment