Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-15900] Disable HW Acceleration for ArrowView #5497

Merged
merged 1 commit into from
Mar 21, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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