Merge pull request #34 from BrianPinsard/master
Fix for undo arrow color
This commit is contained in:
commit
1feeb8ac49
|
@ -58,7 +58,7 @@ public class MainActivity extends SimpleActivity implements MyCanvas.PathsChange
|
|||
ButterKnife.bind(this);
|
||||
mMyCanvas.setListener(this);
|
||||
|
||||
mMyCanvas.setBackgroundColor(mConfig.getBackgroundColor());
|
||||
setBackgroundColor(mConfig.getBackgroundColor());
|
||||
setColor(mConfig.getBrushColor());
|
||||
}
|
||||
|
||||
|
@ -105,12 +105,7 @@ public class MainActivity extends SimpleActivity implements MyCanvas.PathsChange
|
|||
|
||||
@Override
|
||||
public void onOk(AmbilWarnaDialog dialog, int pickedColor) {
|
||||
if (Utils.shouldUseWhite(pickedColor)) {
|
||||
((ImageView) mUndoBtn).setImageResource(R.mipmap.undo_white);
|
||||
} else {
|
||||
((ImageView) mUndoBtn).setImageResource(R.mipmap.undo_black);
|
||||
}
|
||||
mMyCanvas.setBackgroundColor(pickedColor);
|
||||
setBackgroundColor(pickedColor);
|
||||
mConfig.setBackgroundColor(pickedColor);
|
||||
}
|
||||
});
|
||||
|
@ -276,6 +271,15 @@ public class MainActivity extends SimpleActivity implements MyCanvas.PathsChange
|
|||
dialog.show();
|
||||
}
|
||||
|
||||
private void setBackgroundColor(int pickedColor) {
|
||||
if (Utils.shouldUseWhite(pickedColor)) {
|
||||
((ImageView) mUndoBtn).setImageResource(R.mipmap.undo_white);
|
||||
} else {
|
||||
((ImageView) mUndoBtn).setImageResource(R.mipmap.undo_black);
|
||||
}
|
||||
mMyCanvas.setBackgroundColor(pickedColor);
|
||||
}
|
||||
|
||||
private void setColor(int pickedColor) {
|
||||
color = pickedColor;
|
||||
mColorPicker.setBackgroundColor(color);
|
||||
|
|
Loading…
Reference in New Issue