aboutsummaryrefslogtreecommitdiffstats
path: root/app/src
diff options
context:
space:
mode:
authorAlexandre Del Bigio <alescdb@users.noreply.github.com>2015-09-02 14:41:40 +0200
committerAlexandre Del Bigio <alescdb@users.noreply.github.com>2015-09-02 14:41:40 +0200
commitbe29a2626b892bac82f1309a92111f78a790896e (patch)
tree66f171347e73d08e01ffa67bcf24d36f58a0e0d7 /app/src
parentf4ca0e0603b50c7b1de92dc9a9c5b5020bfc25dd (diff)
downloadconnectbot-be29a2626b892bac82f1309a92111f78a790896e.tar.gz
connectbot-be29a2626b892bac82f1309a92111f78a790896e.tar.bz2
connectbot-be29a2626b892bac82f1309a92111f78a790896e.zip
Keyboard separator as layer-list (instead of views)
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/res/drawable/button_keyboard.pngbin1701 -> 0 bytes
-rw-r--r--app/src/main/res/drawable/keyboard_button_border.xml27
-rw-r--r--app/src/main/res/drawable/keyboard_button_selector.xml (renamed from app/src/main/res/drawable/selector_keyboard.xml)2
-rw-r--r--app/src/main/res/layout/inc_keyboard.xml50
-rw-r--r--app/src/main/res/values/colors.xml4
-rw-r--r--app/src/main/res/values/styles.xml8
6 files changed, 34 insertions, 57 deletions
diff --git a/app/src/main/res/drawable/button_keyboard.png b/app/src/main/res/drawable/button_keyboard.png
deleted file mode 100644
index f3094c1..0000000
--- a/app/src/main/res/drawable/button_keyboard.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/drawable/keyboard_button_border.xml b/app/src/main/res/drawable/keyboard_button_border.xml
new file mode 100644
index 0000000..031fe6c
--- /dev/null
+++ b/app/src/main/res/drawable/keyboard_button_border.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ ConnectBot: simple, powerful, open-source SSH client for Android
+ ~ Copyright 2015 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.
+ -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="rectangle">
+ <stroke
+ android:width="1dp"
+ android:color="@color/key_separator" />
+ <solid android:color="@color/key_background_normal" />
+ </shape>
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/app/src/main/res/drawable/selector_keyboard.xml b/app/src/main/res/drawable/keyboard_button_selector.xml
index a7c822d..09edcf6 100644
--- a/app/src/main/res/drawable/selector_keyboard.xml
+++ b/app/src/main/res/drawable/keyboard_button_selector.xml
@@ -22,5 +22,5 @@
android:state_selected="true"/>
<item android:drawable="@color/key_background_pressed"
android:state_pressed="true"/>
- <item android:drawable="@color/key_background_normal"/>
+ <item android:drawable="@drawable/keyboard_button_border"/>
</selector>
diff --git a/app/src/main/res/layout/inc_keyboard.xml b/app/src/main/res/layout/inc_keyboard.xml
index c3d3904..27dbaa6 100644
--- a/app/src/main/res/layout/inc_keyboard.xml
+++ b/app/src/main/res/layout/inc_keyboard.xml
@@ -46,161 +46,117 @@
android:contentDescription="@string/image_description_toggle_control_character"
android:text="@string/button_key_ctrl"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_esc"
style="@style/KeyboardButton"
android:contentDescription="@string/image_description_send_escape_character"
android:text="@string/button_key_esc"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_tab"
style="@style/KeyboardButton"
android:contentDescription="@string/image_description_send_tab_character"
android:text="@string/button_key_tab"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_up"
style="@style/KeyboardButton"
android:contentDescription="@string/image_description_up"
android:text="@string/button_key_up"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_down"
style="@style/KeyboardButton"
android:contentDescription="@string/image_description_down"
android:text="@string/button_key_down"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_left"
style="@style/KeyboardButton"
android:contentDescription="@string/image_description_left"
android:text="@string/button_key_left"/>
- <View style="@style/KeyboardSeparator"/>
-
<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"/>
-
<Button
android:id="@+id/button_home"
style="@style/KeyboardButton"
android:text="@string/button_key_home"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_end"
style="@style/KeyboardButton"
android:text="@string/button_key_end"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_pgup"
style="@style/KeyboardButton"
android:text="@string/button_key_pgup"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_pgdn"
style="@style/KeyboardButton"
android:text="@string/button_key_pgdn"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f1"
style="@style/KeyboardButton"
android:text="@string/button_key_f1"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f2"
style="@style/KeyboardButton"
android:text="@string/button_key_f2"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f3"
style="@style/KeyboardButton"
android:text="@string/button_key_f3"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f4"
style="@style/KeyboardButton"
android:text="@string/button_key_f4"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f5"
style="@style/KeyboardButton"
android:text="@string/button_key_f5"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f6"
style="@style/KeyboardButton"
android:text="@string/button_key_f6"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f7"
style="@style/KeyboardButton"
android:text="@string/button_key_f7"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f8"
style="@style/KeyboardButton"
android:text="@string/button_key_f8"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f9"
style="@style/KeyboardButton"
android:text="@string/button_key_f9"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f10"
style="@style/KeyboardButton"
android:text="@string/button_key_f10"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f11"
style="@style/KeyboardButton"
android:text="@string/button_key_f11"/>
- <View style="@style/KeyboardSeparator"/>
-
<Button
android:id="@+id/button_f12"
style="@style/KeyboardButton"
@@ -208,12 +164,10 @@
</LinearLayout>
</HorizontalScrollView>
- <View style="@style/KeyboardSeparator"/>
-
<ImageView
android:id="@+id/button_keyboard"
style="@style/KeyboardKey"
- android:background="#55b0b0f0"
+ android:background="@color/keyboard_background"
android:contentDescription="@string/image_description_show_keyboard"
- android:src="@drawable/button_keyboard"/>
+ android:src="@drawable/ic_keyboard_white"/>
</LinearLayout>
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 021f16b..6f3eb1c 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -15,10 +15,12 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
<resources>
<color name="key_background_selected">#55f0f0f0</color>
<color name="key_background_pressed">#aaa0a0ff</color>
<color name="key_background_normal">#55f0f0f0</color>
<color name="key_background_layout">#55000000</color>
+ <color name="key_separator">#00000000</color>
+ <color name="keyboard_background">#55b0b0f0</color>
+ <color name="colorPrimary">#ffffffff</color>
</resources> \ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 976d4bf..031d358 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -29,13 +29,7 @@
<style name="KeyboardButton" parent="KeyboardKey">
- <item name="android:background">@drawable/selector_keyboard</item>
+ <item name="android:background">@drawable/keyboard_button_selector</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>