diff options
-rw-r--r-- | app/src/main/res/layout-large/act_console.xml | 120 | ||||
-rw-r--r-- | app/src/main/res/layout/act_console.xml | 162 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 41 |
3 files changed, 106 insertions, 217 deletions
diff --git a/app/src/main/res/layout-large/act_console.xml b/app/src/main/res/layout-large/act_console.xml index 44d15af..c246bf2 100644 --- a/app/src/main/res/layout-large/act_console.xml +++ b/app/src/main/res/layout-large/act_console.xml @@ -147,136 +147,60 @@ <Button android:id="@+id/button_ctrl" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" + style="@style/KeyboardButton" android:contentDescription="@string/image_description_toggle_control_character" - android:padding="0dp" - android:text="@string/button_key_ctrl" - android:textSize="10dip" - /> + android:text="@string/button_key_ctrl"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> <Button android:id="@+id/button_esc" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" + style="@style/KeyboardButton" android:contentDescription="@string/image_description_send_escape_character" - android:padding="0dp" - android:text="@string/button_key_esc" - android:textSize="10dip" - /> + android:text="@string/button_key_esc"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> <Button android:id="@+id/button_tab" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" + style="@style/KeyboardButton" android:contentDescription="@string/image_description_send_tab_character" - android:padding="0dp" - android:text="@string/button_key_tab" - android:textSize="10dip" - /> + android:text="@string/button_key_tab"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> <Button android:id="@+id/button_up" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" + style="@style/KeyboardButton" android:contentDescription="@string/image_description_up" - android:padding="0dp" - android:text="@string/button_key_up" - android:textSize="10dip" - /> + android:text="@string/button_key_up"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> <Button android:id="@+id/button_down" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" + style="@style/KeyboardButton" android:contentDescription="@string/image_description_down" - android:padding="0dp" - android:text="@string/button_key_down" - android:textSize="10dip" - /> + android:text="@string/button_key_down"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> <Button android:id="@+id/button_left" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" + style="@style/KeyboardButton" android:contentDescription="@string/image_description_left" - android:padding="0dp" - android:text="@string/button_key_left" - android:textSize="10dip" - /> + android:text="@string/button_key_left"/> + + <View style="@style/KeyboardSeparator"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> <Button android:id="@+id/button_right" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" + style="@style/KeyboardButton" android:contentDescription="@string/image_description_right" - android:padding="0dp" - android:text="@string/button_key_right" - android:textSize="10dip" - /> + android:text="@string/button_key_right"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> <ImageView android:id="@+id/button_keyboard" diff --git a/app/src/main/res/layout/act_console.xml b/app/src/main/res/layout/act_console.xml index 8787265..0edae8c 100644 --- a/app/src/main/res/layout/act_console.xml +++ b/app/src/main/res/layout/act_console.xml @@ -129,138 +129,62 @@ android:padding="0dip" android:visibility="gone"> - <Button - android:id="@+id/button_ctrl" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" - android:contentDescription="@string/image_description_toggle_control_character" - android:padding="0dp" - android:text="@string/button_key_ctrl" - android:textSize="10dip" - /> + <Button + android:id="@+id/button_ctrl" + style="@style/KeyboardButton" + android:contentDescription="@string/image_description_toggle_control_character" + android:text="@string/button_key_ctrl"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> - <Button - android:id="@+id/button_esc" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" - android:contentDescription="@string/image_description_send_escape_character" - android:padding="0dp" - android:text="@string/button_key_esc" - android:textSize="10dip" - /> + <Button + android:id="@+id/button_esc" + style="@style/KeyboardButton" + android:contentDescription="@string/image_description_send_escape_character" + android:text="@string/button_key_esc"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> - <Button - android:id="@+id/button_tab" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" - android:contentDescription="@string/image_description_send_tab_character" - android:padding="0dp" - android:text="@string/button_key_tab" - android:textSize="10dip" - /> + <Button + android:id="@+id/button_tab" + style="@style/KeyboardButton" + android:contentDescription="@string/image_description_send_tab_character" + android:text="@string/button_key_tab"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> - <Button - android:id="@+id/button_up" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" - android:contentDescription="@string/image_description_up" - android:padding="0dp" - android:text="@string/button_key_up" - android:textSize="10dip" - /> + <Button + android:id="@+id/button_up" + style="@style/KeyboardButton" + android:contentDescription="@string/image_description_up" + android:text="@string/button_key_up"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> - <Button - android:id="@+id/button_down" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" - android:contentDescription="@string/image_description_down" - android:padding="0dp" - android:text="@string/button_key_down" - android:textSize="10dip" - /> + <Button + android:id="@+id/button_down" + style="@style/KeyboardButton" + android:contentDescription="@string/image_description_down" + android:text="@string/button_key_down"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> - <Button - android:id="@+id/button_left" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" - android:contentDescription="@string/image_description_left" - android:padding="0dp" - android:text="@string/button_key_left" - android:textSize="10dip" - /> + <Button + android:id="@+id/button_left" + style="@style/KeyboardButton" + android:contentDescription="@string/image_description_left" + android:text="@string/button_key_left"/> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <View style="@style/KeyboardSeparator"/> - <Button - android:id="@+id/button_right" - android:layout_width="0px" - android:layout_height="30dip" - android:layout_margin="0dp" - android:layout_weight="1" - android:background="#55f0f0f0" - android:contentDescription="@string/image_description_right" - android:padding="0dp" - android:text="@string/button_key_right" - android:textSize="10dip" - /> - <View - android:layout_width="1dp" - android:layout_height="match_parent" - android:background="#90000000" - /> + <Button + android:id="@+id/button_right" + style="@style/KeyboardButton" + android:contentDescription="@string/image_description_right" + android:text="@string/button_key_right"/> + + <View style="@style/KeyboardSeparator"/> <ImageView android:id="@+id/button_keyboard" diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..3ad5fc0 --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * ConnectBot: simple, powerful, open-source SSH client for Android + * Copyright 2007 Kenny Root, Jeffrey Sharkey + * + * 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. + */ +--> +<resources> + + <style name="KeyboardKey"> + <item name="android:layout_width">45dip</item> + <item name="android:layout_height">30dip</item> + <item name="android:layout_margin">0dp</item> + <item name="android:padding">0dp</item> + <item name="android:textSize">10sp</item> + </style> + + + <style name="KeyboardButton" parent="KeyboardKey"> + <item name="android:background">#55f0f0f0</item> + </style> + + + <style name="KeyboardSeparator"> + <item name="android:layout_width">1dip</item> + <item name="android:layout_height">match_parent</item> + <item name="android:background">#90000000</item> + </style> +</resources> |