How to Play YouTube Video in Android Tutorial with Source Code

The most easiest and simplest Tutorial step by step with free source code: Play YouTube Video using WebView Widget in Android Studio version 3.1.2. Create new project with Application name: Play YouTube Video; Minimum SDK: API 27 – Android 8.1 (Oreo). In manifest->AndroidManifest.xml write the code: <?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.app.toyo.playyoutubevideo” android:installLocation=”preferExternal”> <uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE”/> <uses-permission […]

Read the rest of this entry »

Android Tutorial How to Set Height and Width in Percentage of a Button with ConstraintLayout

Set size (height and width) for elements in layout (Constraint layout) with percent (%) in Android Studio version 3.1.2. Create new project with Application name: My Application; Minimum SDK: API 27 – Android 8.1 (Oreo). In app->res->layout->activity_main.xml write the code: <?xml version=”1.0″ encoding=”utf-8″?> <android.support.constraint.ConstraintLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” tools:context=”.MainActivity”> <android.support.constraint.Guideline android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:id=”@+id/right_guideline” app:layout_constraintGuide_percent=”.80″ […]

Read the rest of this entry »

Tutorial How to Play YouTube Video using YouTube Player Fragment with YouTube Android Player API in Android Studio 2.1.2

Easy Tutorial step by step with free source code: Play YouTube Video using YouTube Player Fragment with YouTube Android Player API in Android Studio version 2.1.2. Learn how to download and import YouTube Android Player API. Create new project with Application name: YouTube Player Fragment; Minimum SDK: API 11 – Android 3.0 (Honeycomb). Download YouTube […]

Read the rest of this entry »