diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-13 12:13:19 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-16 09:38:11 +0100 |
commit | 6e90795d716def8936d614bace858dfb04c6e0b7 (patch) | |
tree | 95f9f0b100146dfa4adba7c3b0db5461ac3bebc5 /android | |
parent | 2384e6ed82a05806e6234d2057563744ef112743 (diff) |
android: hide soft keyboard when scrolling
Change-Id: Ia840cd68d7af7a6948ad5766b56a3dc27cb8795b
Diffstat (limited to 'android')
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java index ddd4a0a37382..589bc7af63ac 100644 --- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java +++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java @@ -13,8 +13,10 @@ import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.RectF; import android.opengl.GLES20; +import android.util.Log; import org.libreoffice.kit.DirectBufferAllocator; +import org.libreoffice.LibreOfficeMainActivity; import org.mozilla.gecko.util.FloatUtils; import java.nio.ByteBuffer; @@ -24,6 +26,7 @@ import java.nio.FloatBuffer; * Draws a small rect. This is scaled to become a scrollbar. */ public class ScrollbarLayer extends TileLayer { + private static String LOGTAG = LayerView.class.getName(); public static final long FADE_DELAY = 500; // milliseconds before fade-out starts private static final float FADE_AMOUNT = 0.03f; // how much (as a percent) the scrollbar should fade per frame @@ -204,6 +207,9 @@ public class ScrollbarLayer extends TileLayer { beginTransaction(); // called on compositor thread mOpacity = 1.0f; endTransaction(); + + // Scrollbar is now visible, scrolling will start: hide the soft keyboard. + LibreOfficeMainActivity.mAppContext.hideSoftKeyboard(); return true; } @@ -445,3 +451,5 @@ public class ScrollbarLayer extends TileLayer { return new RectF(barStart, bottom - BAR_SIZE, barEnd, bottom); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |