Kaydet (Commit) 907583d1 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Miklos Vajna

android: change cursor blink time to a constant static field

Change-Id: I49947cccfd2662533da3087cb1f04dc91014cfb0
üst 86548b6b
......@@ -34,6 +34,7 @@ import java.util.List;
public class TextCursorView extends View implements View.OnTouchListener {
private static final String LOGTAG = TextCursorView.class.getSimpleName();
private static final float CURSOR_WIDTH = 2f;
private static final int CURSOR_BLINK_TIME = 500;
private boolean mInitialized = false;
private RectF mCursorPosition = new RectF();
......@@ -96,7 +97,7 @@ public class TextCursorView extends View implements View.OnTouchListener {
mGraphicHandleFillPaint.setColor(Color.WHITE);
mGraphicSelectionVisible = false;
postDelayed(cursorAnimation, 500);
postDelayed(cursorAnimation, CURSOR_BLINK_TIME);
mInitialized = true;
}
......@@ -197,7 +198,7 @@ public class TextCursorView extends View implements View.OnTouchListener {
mCursorPaint.setAlpha(mCursorPaint.getAlpha() == 0 ? 0xFF : 0);
invalidate();
}
postDelayed(cursorAnimation, 500);
postDelayed(cursorAnimation, CURSOR_BLINK_TIME);
}
};
......
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