Skip to content

Instantly share code, notes, and snippets.

@paraya3636
Last active July 2, 2018 13:40
Show Gist options
  • Save paraya3636/eaacdaf811822019790f111f2c4f53cd to your computer and use it in GitHub Desktop.
Save paraya3636/eaacdaf811822019790f111f2c4f53cd to your computer and use it in GitHub Desktop.
youtube sample.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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">
<fragment
android:id="@+id/youtubePlayer"
android:name="com.google.android.youtube.player.YouTubePlayerFragment"
android:layout_width="200dp"
android:layout_height="200dp"
/>
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/youtubePlayer"
android:src="@mipmap/ic_launcher"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/imageView">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4-1"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4-2"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4-3"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment