Merge pull request #215 from bilicainiaohh/fix-ui-bugs

修复了一些ui问题
This commit is contained in:
Tungstend 2024-01-21 17:57:12 +08:00 committed by GitHub
commit 7e52a71d46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -100,6 +100,9 @@ public class ControlButton extends AppCompatButton implements CustomView {
super(context);
this.menu = gameMenu;
//去除阴影
setStateListAnimator(null);
boundaryPath = new Path();
boundaryPaint = new Paint();
boundaryPaint.setAntiAlias(true);

View File

@ -111,6 +111,10 @@ public class ControlDirection extends RelativeLayout implements CustomView {
this.displayMode = displayMode;
setClickable(true);
for (AppCompatButton b : buttons) {
b.setStateListAnimator(null);
}
boundaryPath = new Path();
boundaryPaint = new Paint();
boundaryPaint.setAntiAlias(true);

View File

@ -76,6 +76,7 @@ public class FCLButton extends AppCompatButton {
setMinHeight(0);
setMinimumWidth(0);
setMinimumHeight(0);
setStateListAnimator(null);
if (autoPadding) {
setPadding(
ConvertUtils.dip2px(getContext(), shape == GradientDrawable.RECTANGLE ? 16f : 10f),
@ -91,7 +92,7 @@ public class FCLButton extends AppCompatButton {
drawableNormal.setStroke(ConvertUtils.dip2px(getContext(), 1.5f), Color.GRAY);
drawableNormal.setColor(Color.TRANSPARENT);
drawablePress.setShape(shape);
drawablePress.setCornerRadius(ConvertUtils.dip2px(getContext(), 5));
drawablePress.setCornerRadius(ConvertUtils.dip2px(getContext(), 8));
drawablePress.setStroke(ConvertUtils.dip2px(getContext(), 1.5f), Color.GRAY);
drawablePress.setColor(ThemeEngine.getInstance().getTheme().getLtColor());
}