i start to work on YouTubePlayerView library ,but i can implement this part in B4A library
Add YouTubePlayerView to View
Then make this part
Add YouTubePlayerView to View
B4X:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.stacktips.youtube.MainActivity">
<com.google.android.youtube.player.YouTubePlayerView
android:id="@+id/youtube_player_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
B4X:
setContentView(R.layout.activity_main);
/** Initializing YouTube player view **/
YouTubePlayerView youTubePlayerView = (YouTubePlayerView) findViewById(R.id.youtube_player);