Can I insert an Iframe video into an android application via html? You need to insert video from the site via Iframe .....................

    1 answer 1

    For this, Android has a WebView. Here is a short example of using this xml.

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <WebView android:id="@+id/webView1" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </RelativeLayout> 

    and this is java code

     public class WebViewActivity extends Activity { private WebView webView; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.webview); webView = (WebView) findViewById(R.id.webView1); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl("https://www.youtube.com/embed/RZTei7UMTPk"); } } 
    • Well, here's an example video that you need to display <iframe width="560" height="315" src="https://www.youtube.com/embed/RZTei7UMTPk" frameborder="0" allowfullscreen></iframe> - Andrei
    • @Andrey expensively fixed, look - elik
    • Thank you very much bro, now I will try to write it off - Andrey
    • Well! Do not worry. - elik
    • one
      @Andrey, if you have all the videos - youtube - that is, the official lib for displaying videos from the tube. - Yuriy SPb