aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2014-10-18 15:56:45 -0700
committerKenny Root <kenny@the-b.org>2014-10-18 15:56:45 -0700
commita9a0da1e71a5d3ec5c75e500683c746f6d81ed44 (patch)
tree51713d938802472fba83dd14fc7c7a8610c86dad /app
parentad4e8009343f9364d764cfd6c2d91a19bab21820 (diff)
parent34cd9778e0da1d45723ef76f00840c648f743239 (diff)
downloadconnectbot-a9a0da1e71a5d3ec5c75e500683c746f6d81ed44.tar.gz
connectbot-a9a0da1e71a5d3ec5c75e500683c746f6d81ed44.tar.bz2
connectbot-a9a0da1e71a5d3ec5c75e500683c746f6d81ed44.zip
Merge branch 'master' into gradle-conversion
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/org/connectbot/ConsoleActivity.java23
-rw-r--r--app/src/main/java/org/connectbot/util/PreferenceConstants.java1
-rw-r--r--app/src/main/res/values-tr/strings.xml2
-rw-r--r--app/src/main/res/values-v11/styles.xml1
-rw-r--r--app/src/main/res/values-v14/styles.xml1
-rw-r--r--app/src/main/res/values/strings.xml5
-rw-r--r--app/src/main/res/xml/preferences.xml7
7 files changed, 32 insertions, 8 deletions
diff --git a/app/src/main/java/org/connectbot/ConsoleActivity.java b/app/src/main/java/org/connectbot/ConsoleActivity.java
index e1359d2..1e14d16 100644
--- a/app/src/main/java/org/connectbot/ConsoleActivity.java
+++ b/app/src/main/java/org/connectbot/ConsoleActivity.java
@@ -57,6 +57,7 @@ import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
+import android.view.Window;
import android.view.WindowManager;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.View.OnClickListener;
@@ -138,6 +139,7 @@ public class ConsoleActivity extends Activity {
private ActionBarWrapper actionBar;
private boolean inActionBarMenu = false;
+ private boolean titleBarHide;
private ServiceConnection connection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
@@ -279,7 +281,9 @@ public class ConsoleActivity extends Activity {
keyboardGroup.startAnimation(keyboard_fade_out);
keyboardGroup.setVisibility(View.GONE);
- actionBar.hide();
+ if (titleBarHide) {
+ actionBar.hide();
+ }
keyboardGroupHider = null;
}
};
@@ -290,7 +294,9 @@ public class ConsoleActivity extends Activity {
if (keyboardGroupHider != null)
handler.removeCallbacks(keyboardGroupHider);
keyboardGroup.setVisibility(View.GONE);
- actionBar.hide();
+ if (titleBarHide) {
+ actionBar.hide();
+ }
}
@Override
@@ -304,11 +310,16 @@ public class ConsoleActivity extends Activity {
hardKeyboard = getResources().getConfiguration().keyboard ==
Configuration.KEYBOARD_QWERTY;
- this.setContentView(R.layout.act_console);
-
clipboard = (ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
prefs = PreferenceManager.getDefaultSharedPreferences(this);
+ titleBarHide = prefs.getBoolean(PreferenceConstants.TITLEBARHIDE, false);
+ if (titleBarHide) {
+ getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
+ }
+
+ this.setContentView(R.layout.act_console);
+
// hide status bar if requested by user
if (prefs.getBoolean(PreferenceConstants.FULLSCREEN, false)) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
@@ -429,7 +440,9 @@ public class ConsoleActivity extends Activity {
actionBar = ActionBarWrapper.getActionBar(this);
actionBar.setDisplayHomeAsUpEnabled(true);
- actionBar.hide();
+ if (titleBarHide) {
+ actionBar.hide();
+ }
actionBar.addOnMenuVisibilityListener(new ActionBarWrapper.OnMenuVisibilityListener() {
public void onMenuVisibilityChanged(boolean isVisible) {
inActionBarMenu = isVisible;
diff --git a/app/src/main/java/org/connectbot/util/PreferenceConstants.java b/app/src/main/java/org/connectbot/util/PreferenceConstants.java
index e9fb06c..ad29c39 100644
--- a/app/src/main/java/org/connectbot/util/PreferenceConstants.java
+++ b/app/src/main/java/org/connectbot/util/PreferenceConstants.java
@@ -50,6 +50,7 @@ public class PreferenceConstants {
public static final String ROTATION_AUTOMATIC = "Automatic";
public static final String FULLSCREEN = "fullscreen";
+ public static final String TITLEBARHIDE = "titlebarhide";
public static final String KEYMODE = "keymode";
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index f0c2fb9..91cc742 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -130,7 +130,7 @@
<string name="hostpref_port_title">Port</string>
<string name="bind_never">Daha önce bağlanılmadı</string>
<string name="bind_minutes">%1$s dakika önce</string>
- <string name="bind_hours">%1$ saat önce</string>
+ <string name="bind_hours">%1$s saat önce</string>
<string name="bind_days">%1$s gün önce</string>
<string name="console_copy_done">%1$d byte panoya kopyalandı</string>
<string name="console_copy_start">Kopyalanacak alanı seçmek için dokun ve sürükle ya da pad kullan</string>
diff --git a/app/src/main/res/values-v11/styles.xml b/app/src/main/res/values-v11/styles.xml
index 0b509ab..9a0c22b 100644
--- a/app/src/main/res/values-v11/styles.xml
+++ b/app/src/main/res/values-v11/styles.xml
@@ -20,7 +20,6 @@
<resources>
<style name="NoTitle" parent="android:Theme.Holo">
<item name="android:windowContentOverlay">@null</item>
- <item name="android:windowActionBarOverlay">true</item>
<item name="android:actionBarStyle">@style/SolidActionBar</item>
</style>
diff --git a/app/src/main/res/values-v14/styles.xml b/app/src/main/res/values-v14/styles.xml
index 90131d1..3969010 100644
--- a/app/src/main/res/values-v14/styles.xml
+++ b/app/src/main/res/values-v14/styles.xml
@@ -20,7 +20,6 @@
<resources>
<style name="NoTitle" parent="android:Theme.DeviceDefault">
<item name="android:windowContentOverlay">@null</item>
- <item name="android:windowActionBarOverlay">true</item>
<item name="android:actionBarStyle">@style/SolidActionBar</item>
</style>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f8f8f89..e4f2aa5 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -153,6 +153,11 @@
<!-- Summary for the rotation mode preference -->
<string name="pref_rotation_summary">"How to change rotation when keyboard popped in/out"</string>
+ <!-- Name for the titlebar hide preference -->
+ <string name="pref_titlebarhide_title">"Autohide title bar"</string>
+ <!-- Summary for the titlebar hide preference -->
+ <string name="pref_titlebarhide_summary">"Tap console to show title bar and access menu"</string>
+
<!-- Name for the full screen preference -->
<string name="pref_fullscreen_title">"Full screen"</string>
<!-- Summary for the full screen preference -->
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 5fb836b..6d64ce2 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -78,6 +78,13 @@
/>
<CheckBoxPreference
+ android:key="titlebarhide"
+ android:title="@string/pref_titlebarhide_title"
+ android:summary="@string/pref_titlebarhide_summary"
+ android:defaultValue="false"
+ />
+
+ <CheckBoxPreference
android:key="fullscreen"
android:title="@string/pref_fullscreen_title"
android:summary="@string/pref_fullscreen_summary"