Add c2c and chat support when there is eligible account.
Bug: 28141203
Bug: 28316618
Bug: 28316343
- Replaced hardcoded fragment layout with a RecyclerView. The old layout
was essentially building a list manually.
- Tweaked layout to look better.
- Hide escalation cards when there is no account. Show cards when
there is at least 1 account.
- Request an intent to start specified support type when card is
clicked.
- Monitor account changes so we can hide/show escalation cards when
add/remove account.
Change-Id: Ie48158b85ade1363a41817cc88b1193e0aef87ae
diff --git a/res/layout/support_fragment.xml b/res/layout/support_fragment.xml
index d81849d..481a548 100644
--- a/res/layout/support_fragment.xml
+++ b/res/layout/support_fragment.xml
@@ -15,53 +15,8 @@
limitations under the License.
-->
-<ScrollView
+<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/support_items"
android:layout_width="match_parent"
- android:layout_height="match_parent">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingEnd="16dp"
- android:paddingStart="16dp"
- android:paddingTop="16dp"
- android:text="@string/support_escalation_title"
- android:textColor="@color/material_grey_900"
- android:textSize="16sp"/>
- <LinearLayout
- android:id="@+id/escalation_options"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingEnd="8dp"
- android:paddingStart="8dp">
- <include
- android:id="@+id/escalation_by_phone"
- layout="@layout/support_escalation_card"/>
- <include
- android:id="@+id/escalation_by_email"
- layout="@layout/support_escalation_card"/>
- </LinearLayout>
- <View
- android:layout_width="match_parent"
- android:layout_height="1dp"
- android:background="?android:attr/listDivider"/>
- <include
- android:id="@+id/forum_tile"
- layout="@layout/support_tile"/>
- <include
- android:id="@+id/article_tile"
- layout="@layout/support_tile"/>
- <View
- android:layout_width="match_parent"
- android:layout_height="1dp"
- android:background="?android:attr/listDivider"/>
- <include
- android:id="@+id/feedback_tile"
- layout="@layout/support_tile"/>
- </LinearLayout>
-</ScrollView>
\ No newline at end of file
+ android:layout_height="match_parent"/>
\ No newline at end of file