android - How to open WebView in androdi by clicking ImageButton? -


    android:layout_width="368dp"     android:layout_height="495dp"     android:orientation="vertical"     tools:layout_editor_absolutey="8dp"     tools:layout_editor_absolutex="8dp">      <webview         android:id="@+id/webview"         android:layout_width="fill_parent"         android:layout_height="fill_parent"         android:visibility="invisible" />      <imagebutton         android:id="@+id/imgbutton"         android:layout_width="100dp"         android:layout_height="100dp"         android:layout_marginbottom="30dp"         android:layout_marginleft="140dp"         android:onclick="loadurl"         android:src="@drawable/img"         android:contentdescription="@null"/>  </linearlayout> 

how can open website in app clicking imagebutton or imageview without open browser?

try doing in button onclick dont forget register button first.

view web = findviewbyid(r.id.webview); web.setvisibility(view.gone); 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -