Answer the question
In order to leave comments, you need to log in
How to make WebView open Input File - File Manager (photo selection) for uploading to the site?
I distribute permissions to the application in the manifest for (Internet / Camera and Storage):
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.loadUrl("https://dodating.ru");
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView.setWebViewClient(new WebViewClient());
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
myWebView.setBackgroundColor(Color.parseColor("#7d41f9"));
myWebView.setPadding(0, 0, 0, 0);
}
}
Answer the question
In order to leave comments, you need to log in
Here it is described in detail: https://www.tutorialspoint.com/how-to-detect-click...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question