diff options
author | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 05:25:02 +0000 |
---|---|---|
committer | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 05:25:02 +0000 |
commit | 439be42cd51dfdd2544c7f4d77e167a8142bb35b (patch) | |
tree | 7c981c6aa51ca7219ccfaf63122643b9e9b270d3 /remoting/resources | |
parent | 522a5bb8e2e22bb226f6c882839c37324e7c76d2 (diff) | |
download | chromium_src-439be42cd51dfdd2544c7f4d77e167a8142bb35b.zip chromium_src-439be42cd51dfdd2544c7f4d77e167a8142bb35b.tar.gz chromium_src-439be42cd51dfdd2544c7f4d77e167a8142bb35b.tar.bz2 |
Improve host-list appearance in Chromoting Android client.
This removes the non-localized ONLINE/OFFLINE text, and adds new
styling to distinguish offline hosts.
This also adds toast to indicate a host is offline.
BUG=331103,355868
Review URL: https://codereview.chromium.org/211953002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/resources')
5 files changed, 26 insertions, 9 deletions
diff --git a/remoting/resources/android/drawable/list_item_disabled_selector.xml b/remoting/resources/android/drawable/list_item_disabled_selector.xml new file mode 100644 index 0000000..3f991bd --- /dev/null +++ b/remoting/resources/android/drawable/list_item_disabled_selector.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- Copyright 2014 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@color/list_item_disabled_pressed" + android:state_pressed="true"/> + + <!-- Default used for all other states. --> + <item android:drawable="@android:color/transparent"/> +</selector> diff --git a/remoting/resources/android/drawable/list_item_selector.xml b/remoting/resources/android/drawable/list_item_selector.xml index 5e93ecc..c4b17a8 100644 --- a/remoting/resources/android/drawable/list_item_selector.xml +++ b/remoting/resources/android/drawable/list_item_selector.xml @@ -6,11 +6,7 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:drawable="@color/list_item_disabled_pressed" - android:state_enabled="false" - android:state_pressed="true"/> <item android:drawable="@color/list_item_pressed" - android:state_enabled="true" android:state_pressed="true"/> <!-- Default used for all other states. --> diff --git a/remoting/resources/android/layout/host.xml b/remoting/resources/android/layout/host.xml index f1b1f4f..1a37741 100644 --- a/remoting/resources/android/layout/host.xml +++ b/remoting/resources/android/layout/host.xml @@ -6,11 +6,14 @@ --> <TextView xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/host_label" android:background="@drawable/list_item_selector" + android:drawablePadding="16sp" + android:gravity="center_vertical" + android:id="@+id/host_label" android:layout_height="wrap_content" android:layout_width="match_parent" - android:drawableLeft="@drawable/icon_host" - android:drawablePadding="15sp" - android:padding="15sp" - android:gravity="center_vertical"/> + android:paddingBottom="20sp" + android:paddingLeft="16sp" + android:paddingRight="16sp" + android:paddingTop="20sp" + style="@android:style/TextAppearance.Holo.Medium"/> diff --git a/remoting/resources/android/values/colors.xml b/remoting/resources/android/values/colors.xml index 4e70228..0d7b817 100644 --- a/remoting/resources/android/values/colors.xml +++ b/remoting/resources/android/values/colors.xml @@ -8,4 +8,5 @@ <resources> <color name="list_item_disabled_pressed">#171717</color> <color name="list_item_pressed">#444444</color> + <color name="host_offline_text">#636363</color> </resources> diff --git a/remoting/resources/remoting_strings.grd b/remoting/resources/remoting_strings.grd index 467caa4..2432415 100644 --- a/remoting/resources/remoting_strings.grd +++ b/remoting/resources/remoting_strings.grd @@ -420,6 +420,9 @@ <message desc="Error that is shown if a network error occurs, including the case where the device is off-line." name="IDS_ERROR_NETWORK_ERROR" formatter_data="android_java"> A network error occurred. Please check that your device is on-line and try again. </message> + <message desc="Text shown in tooltip when user touches an offline host on the device." name="IDS_HOST_OFFLINE_TOOLTIP" formatter_data="android_java"> + Host is offline. + </message> </if> <message desc="Label for the access code entry box. This is where the client user enters the code that permits access to the host." name="IDS_ACCESS_CODE"> |