UI updates for support tab.
Fixes: 29999181 Fixes: 29397123 - Reduce support tile min height to 48dp. - Add a 8dp spacer between escalation card and first support tile. - Show different off-hour support escalation title when support hour is always avaiable. Change-Id: I4dacf2b375734c4819b9b19b68fc84faf083c0d4
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:minHeight="@dimen/dashboard_tile_minimum_height"
|
android:minHeight="@dimen/support_tile_min_height"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@android:id/icon"
|
android:id="@android:id/icon"
|
||||||
|
22
res/layout/support_tile_spacer.xml
Normal file
22
res/layout/support_tile_spacer.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2016 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<Space
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/support_spacer_height"
|
||||||
|
android:background="@color/card_background"/>
|
@@ -300,4 +300,9 @@
|
|||||||
<dimen name="gestures_settings_padding_top_bottom">20dp</dimen>
|
<dimen name="gestures_settings_padding_top_bottom">20dp</dimen>
|
||||||
<dimen name="gestures_play_button_size">36dp</dimen>
|
<dimen name="gestures_play_button_size">36dp</dimen>
|
||||||
<dimen name="gesture_animation_padding">0dp</dimen>
|
<dimen name="gesture_animation_padding">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- Support tile minimum height -->
|
||||||
|
<dimen name="support_tile_min_height">48dp</dimen>
|
||||||
|
<!-- support spacer layout height -->
|
||||||
|
<dimen name="support_spacer_height">8dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -60,6 +60,7 @@ public final class SupportItemAdapter extends RecyclerView.Adapter<SupportItemAd
|
|||||||
private static final int TYPE_ESCALATION_OPTIONS_OFFLINE =
|
private static final int TYPE_ESCALATION_OPTIONS_OFFLINE =
|
||||||
R.layout.support_offline_escalation_options;
|
R.layout.support_offline_escalation_options;
|
||||||
private static final int TYPE_SUPPORT_TILE = R.layout.support_tile;
|
private static final int TYPE_SUPPORT_TILE = R.layout.support_tile;
|
||||||
|
private static final int TYPE_SUPPORT_TILE_SPACER = R.layout.support_tile_spacer;
|
||||||
private static final int TYPE_SIGN_IN_BUTTON = R.layout.support_sign_in_button;
|
private static final int TYPE_SIGN_IN_BUTTON = R.layout.support_sign_in_button;
|
||||||
|
|
||||||
private final Activity mActivity;
|
private final Activity mActivity;
|
||||||
@@ -111,6 +112,8 @@ public final class SupportItemAdapter extends RecyclerView.Adapter<SupportItemAd
|
|||||||
case TYPE_ESCALATION_OPTIONS_OFFLINE:
|
case TYPE_ESCALATION_OPTIONS_OFFLINE:
|
||||||
bindOfflineEscalationOptions(holder, (OfflineEscalationData) data);
|
bindOfflineEscalationOptions(holder, (OfflineEscalationData) data);
|
||||||
break;
|
break;
|
||||||
|
case TYPE_SUPPORT_TILE_SPACER:
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
bindSupportTile(holder, data);
|
bindSupportTile(holder, data);
|
||||||
break;
|
break;
|
||||||
@@ -219,7 +222,9 @@ public final class SupportItemAdapter extends RecyclerView.Adapter<SupportItemAd
|
|||||||
|
|
||||||
private void addOfflineEscalationCards() {
|
private void addOfflineEscalationCards() {
|
||||||
final CharSequence operatingHours;
|
final CharSequence operatingHours;
|
||||||
if (mSupportFeatureProvider.isAlwaysOperating(PHONE, mSelectedCountry)) {
|
final boolean isPhoneSupportAlwaysOperating =
|
||||||
|
mSupportFeatureProvider.isAlwaysOperating(PHONE, mSelectedCountry);
|
||||||
|
if (isPhoneSupportAlwaysOperating) {
|
||||||
operatingHours = mActivity.getString(R.string.support_escalation_24_7_summary);
|
operatingHours = mActivity.getString(R.string.support_escalation_24_7_summary);
|
||||||
} else {
|
} else {
|
||||||
operatingHours = mSupportFeatureProvider.getOperationHours(mActivity,
|
operatingHours = mSupportFeatureProvider.getOperationHours(mActivity,
|
||||||
@@ -231,7 +236,9 @@ public final class SupportItemAdapter extends RecyclerView.Adapter<SupportItemAd
|
|||||||
mSelectedCountry, true /* isTollFree */))
|
mSelectedCountry, true /* isTollFree */))
|
||||||
.setTolledPhone(mSupportFeatureProvider.getSupportPhones(
|
.setTolledPhone(mSupportFeatureProvider.getSupportPhones(
|
||||||
mSelectedCountry, false /* isTollFree */))
|
mSelectedCountry, false /* isTollFree */))
|
||||||
.setTileTitle(R.string.support_escalation_title)
|
.setTileTitle(isPhoneSupportAlwaysOperating
|
||||||
|
? R.string.support_escalation_24_7_title
|
||||||
|
: R.string.support_escalation_title)
|
||||||
.setTileSummary(operatingHours)
|
.setTileSummary(operatingHours)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
@@ -246,6 +253,7 @@ public final class SupportItemAdapter extends RecyclerView.Adapter<SupportItemAd
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addMoreHelpItems() {
|
private void addMoreHelpItems() {
|
||||||
|
mSupportData.add(new SupportData.Builder(mActivity, TYPE_SUPPORT_TILE_SPACER).build());
|
||||||
mSupportData.add(new SupportData.Builder(mActivity, TYPE_SUPPORT_TILE)
|
mSupportData.add(new SupportData.Builder(mActivity, TYPE_SUPPORT_TILE)
|
||||||
.setIcon(R.drawable.ic_help_24dp)
|
.setIcon(R.drawable.ic_help_24dp)
|
||||||
.setTileTitle(R.string.support_help_feedback_title)
|
.setTileTitle(R.string.support_help_feedback_title)
|
||||||
|
Reference in New Issue
Block a user