android tv: add share qr code page

Adds a page to share QR code. Includes QR icon on homepage.

Change-Id: I22717771893c53d98ea3db535d498c5ad48d49f6
diff --git a/ring-android/app/src/main/res/layout-land/frag_share.xml b/ring-android/app/src/main/res/layout-land/frag_share.xml
index a070194..7f13f12 100644
--- a/ring-android/app/src/main/res/layout-land/frag_share.xml
+++ b/ring-android/app/src/main/res/layout-land/frag_share.xml
@@ -23,8 +23,8 @@
 
     <ImageView
         android:id="@+id/qr_image"
-        android:layout_width="300dp"
-        android:layout_height="300dp"
+        android:layout_width="@dimen/qr_code_size"
+        android:layout_height="@dimen/qr_code_size"
         android:layout_marginTop="8dp"
         android:layout_marginEnd="48dp"
         android:layout_marginBottom="8dp"
diff --git a/ring-android/app/src/main/res/layout-w720dp-land/tv_activity_home.xml b/ring-android/app/src/main/res/layout-w720dp-land/tv_activity_home.xml
deleted file mode 100644
index 7aa205e..0000000
--- a/ring-android/app/src/main/res/layout-w720dp-land/tv_activity_home.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<fragment xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/main_browse_fragment"
-    android:name="cx.ring.tv.main.MainFragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context="cx.ring.tv.main.HomeActivity"
-    tools:deviceIds="tv"
-    tools:ignore="MergeRootFrame" />
diff --git a/ring-android/app/src/main/res/layout-w720dp-land/tv_activity_share.xml b/ring-android/app/src/main/res/layout-w720dp-land/tv_activity_share.xml
new file mode 100644
index 0000000..bb24714
--- /dev/null
+++ b/ring-android/app/src/main/res/layout-w720dp-land/tv_activity_share.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+Copyright (C) 2004-2019 Savoir-faire Linux Inc.
+
+Author: Rayan Osseiran <rayan.osseiran@savoirfairelinux.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+-->
+
+
+<fragment xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/share_frag"
+    android:name="cx.ring.tv.account.TVShareFragment"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="cx.ring.tv.account.TVShareActivity"
+    tools:deviceIds="tv"
+    tools:ignore="MergeRootFrame" />
diff --git a/ring-android/app/src/main/res/layout-w720dp-land/tv_frag_share.xml b/ring-android/app/src/main/res/layout-w720dp-land/tv_frag_share.xml
new file mode 100644
index 0000000..ea6ab38
--- /dev/null
+++ b/ring-android/app/src/main/res/layout-w720dp-land/tv_frag_share.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?><!--Copyright (C) 2004-2019 Savoir-faire Linux Inc.
+
+Author: Rayan Osseiran <rayan.osseiran@savoirfairelinux.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+-->
+
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <TextView
+        android:id="@+id/share_instruction"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/padding_small"
+        android:layout_marginEnd="@dimen/padding_small"
+        android:gravity="center"
+        android:text="@string/share_message"
+        android:textColor="@color/text_color_primary_dark"
+        android:textSize="24sp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@+id/qr_image"
+        app:layout_constraintHorizontal_bias="0.5"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+
+    <ImageView
+        android:id="@+id/qr_image"
+        android:layout_width="@dimen/qr_code_size"
+        android:layout_height="@dimen/qr_code_size"
+        android:layout_marginEnd="48dp"
+        android:background="@null"
+        android:gravity="center"
+        android:padding="@dimen/padding_small"
+        android:scaleType="fitCenter"
+        android:transitionName="photo"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+
+</androidx.constraintlayout.widget.ConstraintLayout>
+
+
+
diff --git a/ring-android/app/src/main/res/layout/frag_share.xml b/ring-android/app/src/main/res/layout/frag_share.xml
index 04493fb..826ba48 100644
--- a/ring-android/app/src/main/res/layout/frag_share.xml
+++ b/ring-android/app/src/main/res/layout/frag_share.xml
@@ -8,8 +8,8 @@
 
     <ImageView
         android:id="@+id/qr_image"
-        android:layout_width="300dp"
-        android:layout_height="300dp"
+        android:layout_width="@dimen/qr_code_size"
+        android:layout_height="@dimen/qr_code_size"
         android:layout_marginTop="32dp"
         android:gravity="center"
         android:padding="@dimen/padding_small"
diff --git a/ring-android/app/src/main/res/layout/tv_activity_share.xml b/ring-android/app/src/main/res/layout/tv_activity_share.xml
new file mode 100644
index 0000000..a4700b0
--- /dev/null
+++ b/ring-android/app/src/main/res/layout/tv_activity_share.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+Copyright (C) 2004-2016 Savoir-faire Linux Inc.
+
+Author: Rayan Osseiran <rayan.osseiran@savoirfairelinux.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+-->
+
+<fragment xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/share_frag"
+    android:name="cx.ring.tv.account.TVShareFragment"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="cx.ring.tv.account.TVShareActivity"
+    tools:deviceIds="tv"
+    tools:ignore="MergeRootFrame" />
\ No newline at end of file
diff --git a/ring-android/app/src/main/res/layout/tv_frag_share.xml b/ring-android/app/src/main/res/layout/tv_frag_share.xml
new file mode 100644
index 0000000..51bf74c
--- /dev/null
+++ b/ring-android/app/src/main/res/layout/tv_frag_share.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.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">
+
+
+    <ImageView
+        android:id="@+id/qr_image"
+        android:layout_width="300dp"
+        android:layout_height="300dp"
+        android:layout_marginStart="55dp"
+        android:layout_marginEnd="55dp"
+        android:layout_marginBottom="181dp"
+        android:gravity="center"
+        android:padding="@dimen/padding_small"
+        android:scaleType="fitCenter"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/share_instruction"
+        tools:layout_conversion_wrapHeight="1050"
+        tools:layout_conversion_wrapWidth="1050" />
+
+    <TextView
+        android:id="@+id/share_instruction"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="76dp"
+        android:layout_marginTop="128dp"
+        android:layout_marginEnd="76dp"
+        android:layout_marginBottom="64dp"
+        android:gravity="center"
+        android:text="@string/share_message"
+        android:textColor="@color/text_color_primary_dark"
+        android:textSize="16sp"
+        app:layout_constraintBottom_toTopOf="@+id/qr_image"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:layout_conversion_wrapHeight="215"
+        tools:layout_conversion_wrapWidth="1440" />
+
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/ring-android/app/src/main/res/values/dimens.xml b/ring-android/app/src/main/res/values/dimens.xml
index db4a380..bfc640a 100644
--- a/ring-android/app/src/main/res/values/dimens.xml
+++ b/ring-android/app/src/main/res/values/dimens.xml
@@ -53,5 +53,7 @@
     <dimen name="fab_margin">16dp</dimen>
     <dimen name="text_margin">16dp</dimen>
 
+    <dimen name="qr_code_size">300dp</dimen>
+
     <dimen name="tv_avatar_size">320dp</dimen>
 </resources>
\ No newline at end of file
diff --git a/ring-android/app/src/main/res/values/styles.xml b/ring-android/app/src/main/res/values/styles.xml
index da5d20e..714f791 100644
--- a/ring-android/app/src/main/res/values/styles.xml
+++ b/ring-android/app/src/main/res/values/styles.xml
@@ -120,6 +120,7 @@
     </style>
 
     <style name="Theme.Ring.Leanback" parent="Theme.Leanback">
+        <item name="android:windowContentTransitions">true</item>
         <item name="searchOrbViewStyle">@style/CustomSearchOrbView</item>
     </style>