Java Question make YouTubePlayerView library

hanyelmehy

Active Member
Licensed User
Longtime User
i start to work on YouTubePlayerView library ,but i can implement this part in B4A library
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>
Then make this part
B4X:
setContentView(R.layout.activity_main);

        /** Initializing YouTube player view **/
        YouTubePlayerView youTubePlayerView = (YouTubePlayerView) findViewById(R.id.youtube_player);
 
Top