diff options
author | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-16 23:10:34 +0000 |
---|---|---|
committer | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-16 23:10:34 +0000 |
commit | b743887fa930b6e54412c3c28a8bcf332b1851f1 (patch) | |
tree | e58f01a68ca0bddc89e815f7cfcdfea8bd5d1882 /remoting/android | |
parent | 52c7ac436dd59f81e38468c033c5108bf642b35a (diff) | |
download | chromium_src-b743887fa930b6e54412c3c28a8bcf332b1851f1.zip chromium_src-b743887fa930b6e54412c3c28a8bcf332b1851f1.tar.gz chromium_src-b743887fa930b6e54412c3c28a8bcf332b1851f1.tar.bz2 |
Move Android resources for Chromoting
This moves the Android-specific resources to a /res/ folder alongside
the Java sources.
R=jamiewalch@chromium.org
Review URL: https://codereview.chromium.org/235923015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/android')
22 files changed, 309 insertions, 0 deletions
diff --git a/remoting/android/java/README b/remoting/android/java/README new file mode 100644 index 0000000..6e6720b --- /dev/null +++ b/remoting/android/java/README @@ -0,0 +1,9 @@ +The icon: +ic_action_keyboard.png + +was taken from the icon pack at: +https://developer.android.com/design/downloads/index.html + +which carries the following notice: +"You may use these materials without restriction in your apps and to develop +your apps." diff --git a/remoting/android/java/res/drawable-hdpi/ic_action_keyboard.png b/remoting/android/java/res/drawable-hdpi/ic_action_keyboard.png Binary files differnew file mode 100644 index 0000000..35d5611 --- /dev/null +++ b/remoting/android/java/res/drawable-hdpi/ic_action_keyboard.png diff --git a/remoting/android/java/res/drawable-mdpi/ic_action_keyboard.png b/remoting/android/java/res/drawable-mdpi/ic_action_keyboard.png Binary files differnew file mode 100644 index 0000000..5e81588 --- /dev/null +++ b/remoting/android/java/res/drawable-mdpi/ic_action_keyboard.png diff --git a/remoting/android/java/res/drawable-xhdpi/ic_action_keyboard.png b/remoting/android/java/res/drawable-xhdpi/ic_action_keyboard.png Binary files differnew file mode 100644 index 0000000..1af6573 --- /dev/null +++ b/remoting/android/java/res/drawable-xhdpi/ic_action_keyboard.png diff --git a/remoting/android/java/res/drawable-xxhdpi/ic_action_keyboard.png b/remoting/android/java/res/drawable-xxhdpi/ic_action_keyboard.png Binary files differnew file mode 100644 index 0000000..106cd7e --- /dev/null +++ b/remoting/android/java/res/drawable-xxhdpi/ic_action_keyboard.png diff --git a/remoting/android/java/res/drawable/empty_host_list.png b/remoting/android/java/res/drawable/empty_host_list.png Binary files differnew file mode 100644 index 0000000..7d2e19b --- /dev/null +++ b/remoting/android/java/res/drawable/empty_host_list.png diff --git a/remoting/android/java/res/drawable/icon_host_offline.png b/remoting/android/java/res/drawable/icon_host_offline.png Binary files differnew file mode 100644 index 0000000..8c1802c --- /dev/null +++ b/remoting/android/java/res/drawable/icon_host_offline.png diff --git a/remoting/android/java/res/drawable/list_item_disabled_selector.xml b/remoting/android/java/res/drawable/list_item_disabled_selector.xml new file mode 100644 index 0000000..3f991bd --- /dev/null +++ b/remoting/android/java/res/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/android/java/res/drawable/list_item_selector.xml b/remoting/android/java/res/drawable/list_item_selector.xml new file mode 100644 index 0000000..c4b17a8 --- /dev/null +++ b/remoting/android/java/res/drawable/list_item_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_pressed" + android:state_pressed="true"/> + + <!-- Default used for all other states. --> + <item android:drawable="@android:color/transparent"/> +</selector> diff --git a/remoting/android/java/res/layout/account_dropdown.xml b/remoting/android/java/res/layout/account_dropdown.xml new file mode 100644 index 0000000..a9f0c96 --- /dev/null +++ b/remoting/android/java/res/layout/account_dropdown.xml @@ -0,0 +1,13 @@ +<?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. +--> + +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:drawablePadding="15sp" + android:padding="15sp" + android:gravity="center_vertical"/> diff --git a/remoting/android/java/res/layout/account_selected.xml b/remoting/android/java/res/layout/account_selected.xml new file mode 100644 index 0000000..5eae097 --- /dev/null +++ b/remoting/android/java/res/layout/account_selected.xml @@ -0,0 +1,29 @@ +<?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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center_vertical|start" + android:orientation="vertical"> + <TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/action_bar_title_top_margin" + android:singleLine="true" + android:ellipsize="end" + android:text="@string/mode_me2me" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textSize="@dimen/action_bar_title_text_size"/> + <TextView android:id="@+id/account_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/action_bar_subtitle_top_margin" + android:singleLine="true" + android:ellipsize="end" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textSize="@dimen/action_bar_subtitle_text_size"/> +</LinearLayout> diff --git a/remoting/android/java/res/layout/desktop.xml b/remoting/android/java/res/layout/desktop.xml new file mode 100644 index 0000000..d4ac3e5 --- /dev/null +++ b/remoting/android/java/res/layout/desktop.xml @@ -0,0 +1,22 @@ +<?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. +--> + +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="match_parent" + android:layout_width="match_parent" + android:orientation="vertical"> + <org.chromium.chromoting.DesktopView android:id="@+id/desktop_view" + android:layout_height="match_parent" + android:layout_width="match_parent"/> + <ImageButton android:id="@+id/desktop_overlay_button" + android:background="@android:color/transparent" + android:layout_gravity="top|right" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:onClick="onOverlayButtonPressed" + android:src="@android:drawable/ic_menu_more"/> +</FrameLayout> diff --git a/remoting/android/java/res/layout/host.xml b/remoting/android/java/res/layout/host.xml new file mode 100644 index 0000000..1a37741 --- /dev/null +++ b/remoting/android/java/res/layout/host.xml @@ -0,0 +1,19 @@ +<?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. +--> + +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + 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:paddingBottom="20sp" + android:paddingLeft="16sp" + android:paddingRight="16sp" + android:paddingTop="20sp" + style="@android:style/TextAppearance.Holo.Medium"/> diff --git a/remoting/android/java/res/layout/main.xml b/remoting/android/java/res/layout/main.xml new file mode 100644 index 0000000..975cd6b --- /dev/null +++ b/remoting/android/java/res/layout/main.xml @@ -0,0 +1,41 @@ +<?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. +--> + +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="match_parent" + android:layout_width="match_parent"> + <ListView android:id="@+id/hostList_chooser" + android:layout_height="match_parent" + android:layout_width="match_parent"/> + <LinearLayout android:id="@+id/hostList_empty" + android:gravity="center" + android:layout_height="match_parent" + android:layout_width="match_parent" + android:orientation="vertical" + android:visibility="gone"> + <ImageView android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:src="@drawable/empty_host_list"/> + <TextView android:gravity="center" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:text="@string/host_list_empty_android" + style="@style/EmptyStateText"/> + <TextView android:id="@+id/host_setup_link_android" + android:gravity="center" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:text="@string/host_setup_link_android" + style="@style/EmptyStateText.Hyperlink"/> + </LinearLayout> + <ProgressBar android:id="@+id/hostList_progress" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:layout_gravity="center" + android:visibility="gone" + style="@android:style/Widget.Holo.ProgressBar.Large"/> +</FrameLayout> diff --git a/remoting/android/java/res/layout/pin_dialog.xml b/remoting/android/java/res/layout/pin_dialog.xml new file mode 100644 index 0000000..4ea5dc3 --- /dev/null +++ b/remoting/android/java/res/layout/pin_dialog.xml @@ -0,0 +1,21 @@ +<?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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_height="wrap_content" + android:layout_width="match_parent"> + <EditText android:id="@+id/pin_dialog_text" + android:inputType="numberPassword" + android:imeOptions="actionDone" + android:layout_height="wrap_content" + android:layout_width="match_parent"/> + <CheckBox android:id="@+id/pin_dialog_check" + android:text="@string/remember_pin" + android:layout_height="wrap_content" + android:layout_width="match_parent"/> +</LinearLayout> diff --git a/remoting/android/java/res/menu/chromoting_actionbar.xml b/remoting/android/java/res/menu/chromoting_actionbar.xml new file mode 100644 index 0000000..07b97f0 --- /dev/null +++ b/remoting/android/java/res/menu/chromoting_actionbar.xml @@ -0,0 +1,21 @@ +<?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. +--> + +<!--Action bar buttons for the Android app's host listing--> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@+id/actionbar_directoryrefresh" + android:title="@string/tooltip_refresh" + android:icon="@android:drawable/ic_popup_sync" + android:showAsAction="ifRoom"/> + <!-- + The Help option must be the final menu item and it must only appear in + the action-bar overflow menu. + --> + <item android:id="@+id/actionbar_help" + android:title="@string/actionbar_help" + android:showAsAction="never"/> +</menu> diff --git a/remoting/android/java/res/menu/desktop_actionbar.xml b/remoting/android/java/res/menu/desktop_actionbar.xml new file mode 100644 index 0000000..f737132 --- /dev/null +++ b/remoting/android/java/res/menu/desktop_actionbar.xml @@ -0,0 +1,31 @@ +<?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. +--> + +<!--Action bar buttons for the Android app's remote desktop viewer--> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@+id/actionbar_keyboard" + android:title="@string/show_hide_keyboard" + android:icon="@drawable/ic_action_keyboard" + android:showAsAction="ifRoom"/> + <item android:id="@+id/actionbar_hide" + android:title="@string/close" + android:icon="@android:drawable/ic_menu_close_clear_cancel" + android:showAsAction="ifRoom"/> + <item android:id="@+id/actionbar_send_ctrl_alt_del" + android:title="@string/send_ctrl_alt_del" + android:showAsAction="withText"/> + <item android:id="@+id/actionbar_disconnect" + android:title="@string/disconnect_myself_button" + android:showAsAction="withText"/> + <!-- + The Help option must be the final menu item and it must only appear in + the action-bar overflow menu. + --> + <item android:id="@+id/actionbar_help" + android:title="@string/actionbar_help" + android:showAsAction="never"/> +</menu> diff --git a/remoting/android/java/res/menu/help_actionbar.xml b/remoting/android/java/res/menu/help_actionbar.xml new file mode 100644 index 0000000..09f2625 --- /dev/null +++ b/remoting/android/java/res/menu/help_actionbar.xml @@ -0,0 +1,15 @@ +<?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. +--> + +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@+id/actionbar_feedback" + android:title="@string/actionbar_feedback" + android:showAsAction="ifRoom|withText"/> + <item android:id="@+id/actionbar_play_store" + android:title="@string/actionbar_play_store" + android:showAsAction="never"/> +</menu> diff --git a/remoting/android/java/res/values-land/dimens.xml b/remoting/android/java/res/values-land/dimens.xml new file mode 100644 index 0000000..ffdc015 --- /dev/null +++ b/remoting/android/java/res/values-land/dimens.xml @@ -0,0 +1,13 @@ +<?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. +--> + +<resources> + <dimen name="action_bar_title_text_size">16dp</dimen> + <dimen name="action_bar_subtitle_text_size">12dp</dimen> + <dimen name="action_bar_title_top_margin">-4dp</dimen> + <dimen name="action_bar_subtitle_top_margin">-2dp</dimen> +</resources> diff --git a/remoting/android/java/res/values/colors.xml b/remoting/android/java/res/values/colors.xml new file mode 100644 index 0000000..0d7b817 --- /dev/null +++ b/remoting/android/java/res/values/colors.xml @@ -0,0 +1,12 @@ +<?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. +--> + +<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/android/java/res/values/dimens.xml b/remoting/android/java/res/values/dimens.xml new file mode 100644 index 0000000..3e7b686 --- /dev/null +++ b/remoting/android/java/res/values/dimens.xml @@ -0,0 +1,13 @@ +<?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. +--> + +<resources> + <dimen name="action_bar_title_text_size">18dp</dimen> + <dimen name="action_bar_subtitle_text_size">14dp</dimen> + <dimen name="action_bar_title_top_margin">0dp</dimen> + <dimen name="action_bar_subtitle_top_margin">-3dp</dimen> +</resources> diff --git a/remoting/android/java/res/values/styles.xml b/remoting/android/java/res/values/styles.xml new file mode 100644 index 0000000..881d2bb --- /dev/null +++ b/remoting/android/java/res/values/styles.xml @@ -0,0 +1,22 @@ +<?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. +--> + +<resources> + <style name="MainTheme" parent="@android:style/Theme.Holo"> + <item name="android:actionBarStyle">@style/MainActionBar</item> + </style> + <style name="MainActionBar" parent="@android:style/Widget.Holo.ActionBar"> + <item name="android:displayOptions">showHome</item> + </style> + <style name="EmptyStateText" parent="@android:style/TextAppearance.Holo.Large"> + <item name="android:textColor">#888</item> + </style> + <style name="EmptyStateText.Hyperlink"> + <item name="android:textColor">@android:color/holo_blue_light</item> + <item name="android:textStyle">italic</item> + </style> +</resources> |