Kaydet (Commit) 6e90795d authored tarafından Miklos Vajna's avatar Miklos Vajna

android: hide soft keyboard when scrolling

Change-Id: Ia840cd68d7af7a6948ad5766b56a3dc27cb8795b
üst 2384e6ed
...@@ -13,8 +13,10 @@ import android.graphics.PorterDuff; ...@@ -13,8 +13,10 @@ import android.graphics.PorterDuff;
import android.graphics.Rect; import android.graphics.Rect;
import android.graphics.RectF; import android.graphics.RectF;
import android.opengl.GLES20; import android.opengl.GLES20;
import android.util.Log;
import org.libreoffice.kit.DirectBufferAllocator; import org.libreoffice.kit.DirectBufferAllocator;
import org.libreoffice.LibreOfficeMainActivity;
import org.mozilla.gecko.util.FloatUtils; import org.mozilla.gecko.util.FloatUtils;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
...@@ -24,6 +26,7 @@ import java.nio.FloatBuffer; ...@@ -24,6 +26,7 @@ import java.nio.FloatBuffer;
* Draws a small rect. This is scaled to become a scrollbar. * Draws a small rect. This is scaled to become a scrollbar.
*/ */
public class ScrollbarLayer extends TileLayer { public class ScrollbarLayer extends TileLayer {
private static String LOGTAG = LayerView.class.getName();
public static final long FADE_DELAY = 500; // milliseconds before fade-out starts 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 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 { ...@@ -204,6 +207,9 @@ public class ScrollbarLayer extends TileLayer {
beginTransaction(); // called on compositor thread beginTransaction(); // called on compositor thread
mOpacity = 1.0f; mOpacity = 1.0f;
endTransaction(); endTransaction();
// Scrollbar is now visible, scrolling will start: hide the soft keyboard.
LibreOfficeMainActivity.mAppContext.hideSoftKeyboard();
return true; return true;
} }
...@@ -445,3 +451,5 @@ public class ScrollbarLayer extends TileLayer { ...@@ -445,3 +451,5 @@ public class ScrollbarLayer extends TileLayer {
return new RectF(barStart, bottom - BAR_SIZE, barEnd, bottom); return new RectF(barStart, bottom - BAR_SIZE, barEnd, bottom);
} }
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment