Skip to content

Commit

Permalink
Merge pull request #5498 from vishalduggal/timob-15900-32X
Browse files Browse the repository at this point in the history
[TIMOB-15900] (3_2_X) Disable HW Acceleration for ArrowView
  • Loading branch information
hieupham007 committed Mar 21, 2014
2 parents 83e302c + 13c6fa2 commit 8857190
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ public class TiArrowView extends View

private boolean leftArrow;
private Path path;
private Paint p;

public TiArrowView(Context context) {
super(context);
leftArrow = true;
setFocusable(false);
setFocusableInTouchMode(false);
if(android.os.Build.VERSION.SDK_INT >= 11) {
//Paint.setStrokeCap not supported for lines in HW acceleration mode.
this.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
p = new Paint();
configureDrawable();
}

Expand Down Expand Up @@ -69,7 +75,7 @@ protected void onDraw(Canvas canvas) {
if (!leftArrow) {
canvas.translate(1, 0);
}
Paint p = new Paint();

p.setAntiAlias(false);
p.setARGB(175, 216, 216, 216);
p.setStyle(Paint.Style.FILL);
Expand Down

0 comments on commit 8857190

Please sign in to comment.