momodalo / vimtouch

vimtouch
Apache License 2.0
351 stars 71 forks source link

Hide shortcut bar #63

Open eater opened 11 years ago

eater commented 11 years ago

Is that what it's called, the bar at the top with the VimTouch logo, the pencil, the ESC, and the :Q! ?

I want to remove it -- is that possible? It takes up screen space, and having the possibility of accidentally hitting :q! with a stray finger and losing my document makes me nervous.

anjiro commented 10 years ago

Edit res/values-v11/styles.xml and change Theme.Holo.Light and Theme.Holo to Theme.Holo.NoActionBar.

looran commented 10 years ago

As anjiro explained, to remove action bar in vimtouch, for now it seems you need to modify the source. This will remove action bar in "Light" (white) mode only, not in "Dark" mode:

TODO: add a theme selector in UI and create a new "No action bar" theme ;)
diff --git a/res/values-v11/styles.xml b/res/values-v11/styles.xml
index 499a8c0..f0d93c7 100644
--- a/res/values-v11/styles.xml
+++ b/res/values-v11/styles.xml
@@ -19,7 +19,7 @@
 >
     <style name="VimInstallTheme" parent="@android:style/Theme.Holo.Light.Dialog">
     </style>
-    <style name="VimTheme" parent="@android:style/Theme.Holo.Light">
+    <style name="VimTheme" parent="@android:style/Theme.Holo.NoActionBar">
         <item name="android:windowFrame">@null</item>
         <item name="quickBarBackground">@drawable/bar_bg</item>
     </style>

And then compile Vimtouch.

I had to make 2 other change to compile:

diff --git a/prepare-clean-checkout.sh b/prepare-clean-checkout.sh
index 1e0560e..d76b88a 100755
--- a/prepare-clean-checkout.sh
+++ b/prepare-clean-checkout.sh
@@ -20,7 +20,7 @@ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
 tar xzvf libiconv-1.14.tar.gz
 mv libiconv-1.14 libiconv
 rm libiconv-1.14.tar.gz
-git clone git@github.com:momodalo/android_external_libncurses.git -b vimtouch libncurses
+git clone https://github.com/momodalo/android_external_libncurses.git -b vimtouch libncurses
 cd ..

 # extract latest platform:

diff --git a/project.properties b/project.properties
index e5d146b..5c85d23 100644
--- a/project.properties
+++ b/project.properties
@@ -11,7 +11,8 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

 # Project target.
-target=android-18
+# target=android-18
+target=android-19
 android.library.reference.1=libraries/emulatorview/
 android.library.reference.2=libraries/aFileChooser/
 android.library.reference.3=libraries/SlidingMenu/

And then follow https://github.com/momodalo/vimtouch/#developer to compile. You may need additional packages / env variables like the following:

apt-get install openjdk-7-jdk                                                  

ANDROID_HOME=$HOME/src/android/sdk/adt-bundle-linux-x86_64-20131030/sdk; export ANDROID_HOME
ANDROID_NDK_ROOT=$HOME/src/android/ndk/android-ndk-r9d; export ANDROID_NDK_ROOT
ANDROID_SDK_HOME=$HOME/src/android/sdk/adt-bundle-linux-x86_64-20131030/sdk; export ANDROID_SDK_HOME

./prepare-clean-checkout.sh
ant debug

Little screenshot: 20140311_2329_android_vimtouch_noactionbar

Best text editor on android, thanks devs !!