diff options
21 files changed, 213 insertions, 210 deletions
diff --git a/.idea/.gitignore b/.idea/.gitignore index 8e587e7..ff07e6f 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -4,7 +4,6 @@ !/copyright/*.xml !/fileColors.xml !/encodings.xml -!/gradle.xml !/runConfigurations/*.xml !/inspectionProfiles/*.xml diff --git a/app/app.iml b/app/app.iml index e6fba85..fb1f329 100644 --- a/app/app.iml +++ b/app/app.iml @@ -75,7 +75,8 @@ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.0/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.0.0/jars" /> - <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.0/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.0.1/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> @@ -88,43 +89,41 @@ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> - <excludeFolder url="file://$MODULE_DIR$/build/jacoco" /> <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> - <excludeFolder url="file://$MODULE_DIR$/build/reports" /> - <excludeFolder url="file://$MODULE_DIR$/build/test-results" /> <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> </content> <orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" /> <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" exported="" scope="TEST" name="asm-5.0.1" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="robolectric-utils-3.0" level="project" /> + <orderEntry type="library" exported="" name="support-v4-23.0.1" level="project" /> <orderEntry type="library" exported="" name="jzlib-1.1.3" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="maven-ant-tasks-2.1.3" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="objenesis-2.1" level="project" /> + <orderEntry type="library" exported="" name="design-23.0.0" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="ant-1.8.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="assertj-core-1.7.0" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="accessibility-test-framework-1.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="asm-commons-5.0.1" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="ant-launcher-1.8.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="asm-5.0.1" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="shadows-core-3.0" level="project" /> - <orderEntry type="library" exported="" name="appcompat-v7-23.0.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="asm-util-5.0.1" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="bcprov-jdk16-1.46" level="project" /> - <orderEntry type="library" exported="" name="support-v4-23.0.0" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="mockito-core-1.10.19" level="project" /> - <orderEntry type="library" exported="" name="jsocks-1.0.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="objenesis-2.1" level="project" /> - <orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="icu4j-53.1" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="bcprov-jdk16-1.46" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="maven-ant-tasks-2.1.3" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="sqlite4java-0.282" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="robolectric-resources-3.0" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="robolectric-annotations-3.0" level="project" /> - <orderEntry type="library" exported="" name="design-23.0.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="sqlite4java-0.282" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="asm-tree-5.0.1" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="robolectric-utils-3.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="asm-analysis-5.0.1" level="project" /> <orderEntry type="library" exported="" name="sshlib-2.2.0" level="project" /> - <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="shadows-core-3.0" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="vtd-xml-2.11" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="asm-commons-5.0.1" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="asm-tree-5.0.1" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="asm-analysis-5.0.1" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="icu4j-53.1" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="ant-launcher-1.8.0" level="project" /> <orderEntry type="library" exported="" scope="TEST" name="robolectric-3.0" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="asm-util-5.0.1" level="project" /> + <orderEntry type="library" exported="" name="appcompat-v7-23.0.0" level="project" /> + <orderEntry type="library" exported="" scope="TEST" name="assertj-core-1.7.0" level="project" /> + <orderEntry type="library" exported="" name="recyclerview-v7-23.0.1" level="project" /> + <orderEntry type="library" exported="" name="jsocks-1.0.0" level="project" /> + <orderEntry type="library" exported="" name="support-annotations-23.0.1" level="project" /> </component> </module>
\ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index e02e5bd..b5f402a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -44,7 +44,7 @@ android { } testApplicationId "org.connectbot.tests" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "org.connectbot.FixJacocoTestRunner" } signingConfigs { @@ -59,9 +59,9 @@ android { } dependencies { - compile "com.android.support:support-v4:23.0.0" - compile "com.android.support:appcompat-v7:23.0.0" - compile "com.android.support:design:23.0.0" + compile "com.android.support:support-v4:23.0.1" + compile "com.android.support:appcompat-v7:23.0.1" + compile "com.android.support:design:23.0.1" androidTestCompile('com.android.support.test:runner:0.3') { exclude module: "support-annotations" @@ -132,4 +132,4 @@ android.applicationVariants.all { variant -> valuesFile.write(content, 'UTF-8') } } -}
\ No newline at end of file +} diff --git a/app/src/androidTest/java/org/connectbot/FixJacocoTestRunner.java b/app/src/androidTest/java/org/connectbot/FixJacocoTestRunner.java new file mode 100644 index 0000000..fbadb9b --- /dev/null +++ b/app/src/androidTest/java/org/connectbot/FixJacocoTestRunner.java @@ -0,0 +1,34 @@ +/* + * This class comes from a StackOverflow post: + * http://stackoverflow.com/questions/30337375/empty-jacoco-report-for-android-espresso/31600193#31600193 + * + * This should be fixed in com.android.test.support:runner:0.4 and this class can be removed. + */ +package org.connectbot; + +import android.os.Bundle; +import android.support.test.runner.AndroidJUnitRunner; +import android.util.Log; + +import java.lang.reflect.Method; + +public class FixJacocoTestRunner extends AndroidJUnitRunner { + + static { + System.setProperty("jacoco-agent.destfile", "/data/data/" + BuildConfig.APPLICATION_ID + "/coverage.ec"); + } + + @Override + public void finish(int resultCode, Bundle results) { + try { + Class rt = Class.forName("org.jacoco.agent.rt.RT"); + Method getAgent = rt.getMethod("getAgent"); + Method dump = getAgent.getReturnType().getMethod("dump", boolean.class); + Object agent = getAgent.invoke(null); + dump.invoke(agent, false); + } catch (Throwable e) { + Log.d("JACOCO", e.getMessage()); + } + super.finish(resultCode, results); + } +} diff --git a/app/src/main/java/org/connectbot/ConsoleActivity.java b/app/src/main/java/org/connectbot/ConsoleActivity.java index 5dc741f..95d21d8 100644 --- a/app/src/main/java/org/connectbot/ConsoleActivity.java +++ b/app/src/main/java/org/connectbot/ConsoleActivity.java @@ -500,6 +500,7 @@ public class ConsoleActivity extends AppCompatActivity implements BridgeDisconne new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { + setTitle(adapter.getPageTitle(position)); onTerminalChanged(); } }); @@ -1367,6 +1368,8 @@ public class ConsoleActivity extends AppCompatActivity implements BridgeDisconne */ private void setDisplayedTerminal(int requestedIndex) { pager.setCurrentItem(requestedIndex); + // set activity title + setTitle(adapter.getPageTitle(requestedIndex)); onTerminalChanged(); } diff --git a/app/src/main/res/drawable-hdpi/ic_keyboard_white.png b/app/src/main/res/drawable-hdpi/ic_keyboard_white.png Binary files differnew file mode 100644 index 0000000..5352d4c --- /dev/null +++ b/app/src/main/res/drawable-hdpi/ic_keyboard_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_keyboard_white.png b/app/src/main/res/drawable-mdpi/ic_keyboard_white.png Binary files differnew file mode 100644 index 0000000..e8c24c7 --- /dev/null +++ b/app/src/main/res/drawable-mdpi/ic_keyboard_white.png diff --git a/app/src/main/res/drawable-xhdpi/ic_keyboard_white.png b/app/src/main/res/drawable-xhdpi/ic_keyboard_white.png Binary files differnew file mode 100644 index 0000000..2b6b9b4 --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/ic_keyboard_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_keyboard_white.png b/app/src/main/res/drawable-xxhdpi/ic_keyboard_white.png Binary files differnew file mode 100644 index 0000000..9d0bed2 --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/ic_keyboard_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_keyboard_white.png b/app/src/main/res/drawable-xxxhdpi/ic_keyboard_white.png Binary files differnew file mode 100644 index 0000000..f77d9d2 --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/ic_keyboard_white.png diff --git a/app/src/main/res/drawable/button_keyboard.png b/app/src/main/res/drawable/button_keyboard.png Binary files differdeleted file mode 100644 index f3094c1..0000000 --- a/app/src/main/res/drawable/button_keyboard.png +++ /dev/null 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/drawable/keyboard_keyboard_border.xml b/app/src/main/res/drawable/keyboard_keyboard_border.xml new file mode 100644 index 0000000..3146ce4 --- /dev/null +++ b/app/src/main/res/drawable/keyboard_keyboard_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/keyboard_background" /> + </shape> + </item> +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/layout-land/item_host.xml b/app/src/main/res/layout-land/item_host.xml deleted file mode 100644 index cbccd91..0000000 --- a/app/src/main/res/layout-land/item_host.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?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. - */ ---> - -<RelativeLayout - android:id="@android:id/content" - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:padding="10dip" - > - - <ImageView - android:id="@android:id/icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:contentDescription="@string/image_description_connected" - android:paddingTop="5dip" - android:src="@drawable/connected" - /> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - - <TextView - android:id="@android:id/text1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:ellipsize="end" - android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceLarge" - /> - - <TextView - android:id="@android:id/text2" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="10dip" - android:textAppearance="?android:attr/textAppearanceSmall" - /> - - - </LinearLayout> - -</RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout-large/act_console.xml b/app/src/main/res/layout-large/act_console.xml index d0ad41b..6e7ab14 100644 --- a/app/src/main/res/layout-large/act_console.xml +++ b/app/src/main/res/layout-large/act_console.xml @@ -21,6 +21,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ff000000"> @@ -29,7 +30,8 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:theme="@style/Theme.AppCompat.Light.DarkActionBar"/> + android:theme="@style/Theme.AppCompat.Light.DarkActionBar" + tools:ignore="InconsistentLayout"/> <android.support.design.widget.TabLayout android:id="@+id/tabs" @@ -39,7 +41,8 @@ android:textAppearance="?android:attr/textAppearanceMedium" app:tabMode="scrollable" app:tabContentStart="60dp" - app:tabIndicatorColor="@android:color/white"/> + app:tabIndicatorColor="@android:color/white" + tools:ignore="InconsistentLayout"/> <TextView android:id="@android:id/empty" diff --git a/app/src/main/res/layout-port/item_host.xml b/app/src/main/res/layout-port/item_host.xml deleted file mode 100644 index 7ee7f0a..0000000 --- a/app/src/main/res/layout-port/item_host.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?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. - */ ---> - -<RelativeLayout android:id="@android:id/content" - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:padding="10dip" - > - - <ImageView - android:id="@android:id/icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:contentDescription="@string/image_description_connected" - android:paddingTop="5dip" - android:src="@drawable/connected" - /> - - <TextView - android:id="@android:id/text1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:ellipsize="end" - android:paddingRight="20dip" - android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceLarge" - /> - - <TextView - android:id="@android:id/text2" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_below="@android:id/text1" - android:textAppearance="?android:attr/textAppearanceSmall" - /> - - -</RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/inc_keyboard.xml b/app/src/main/res/layout/inc_keyboard.xml index c3d3904..945e1b9 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="@drawable/keyboard_keyboard_border" 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/layout/item_host.xml b/app/src/main/res/layout/item_host.xml new file mode 100644 index 0000000..56c3d34 --- /dev/null +++ b/app/src/main/res/layout/item_host.xml @@ -0,0 +1,76 @@ +<?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. + --> + +<RelativeLayout + android:id="@android:id/content" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:minHeight="72dp" + > + + <ImageView + android:id="@android:id/icon" + android:layout_width="40dp" + android:layout_height="40dp" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_marginEnd="16dp" + android:layout_marginRight="16dp" + android:contentDescription="@string/image_description_connected" + android:src="@drawable/connected" + /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" + android:layout_alignWithParentIfMissing="true" + android:layout_centerVertical="true" + android:layout_marginStart="16dp" + android:layout_marginLeft="16dp" + android:layout_marginEnd="16dp" + android:layout_marginRight="16dp" + android:orientation="vertical" + android:layout_toStartOf="@android:id/icon" + android:layout_toLeftOf="@android:id/icon" + > + + <TextView + android:id="@android:id/text1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="end" + android:singleLine="true" + android:paddingTop="20dp" + android:textAppearance="@style/ListItemFirstLineText" + /> + + <TextView + android:id="@android:id/text2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingBottom="20dp" + android:textAppearance="@style/ListItemSecondLineText" + /> + + </LinearLayout> + +</RelativeLayout> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 021f16b..eb99202 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -15,10 +15,11 @@ ~ 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> </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..593af85 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -27,15 +27,17 @@ <item name="android:textSize">10sp</item> </style> - <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="ListItemFirstLineText" parent="TextAppearance.AppCompat"> + <item name="android:textColor">?android:textColorPrimary</item> + <item name="android:textSize">16sp</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 name="ListItemSecondLineText" parent="TextAppearance.AppCompat"> + <item name="android:textColor">?android:textColorSecondary</item> + <item name="android:textSize">14sp</item> </style> </resources> |