mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 06:10:28 +01:00
Always show alpha slider in ColorPicker
Also some code cleanup.
This commit is contained in:
parent
f61396b1f9
commit
ae4d2a4f16
|
@ -61,9 +61,7 @@ public class ColorPickerDialog
|
|||
public void reInitUI() {
|
||||
int oldColor = mOldColor.getColor();
|
||||
int newColor = mNewColor.getColor();
|
||||
boolean alphaSlider = mColorPicker.getAlphaSliderVisible();
|
||||
setUp(oldColor, newColor);
|
||||
setAlphaSliderVisible(alphaSlider);
|
||||
}
|
||||
|
||||
private void setUp(int oldColor, int newColor) {
|
||||
|
@ -95,10 +93,6 @@ public class ColorPickerDialog
|
|||
mNewColor.setColor(color);
|
||||
}
|
||||
|
||||
public void setAlphaSliderVisible(boolean visible) {
|
||||
mColorPicker.setAlphaSliderVisible(visible);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a OnColorChangedListener to get notified when the color
|
||||
* selected by the user has changed.
|
||||
|
|
|
@ -48,7 +48,6 @@ public class ColorPickerPreference
|
|||
private int mDefaultValue = Color.BLACK;
|
||||
private int mValue = Color.BLACK;
|
||||
private float mDensity = 0;
|
||||
private boolean mAlphaSliderEnabled = false;
|
||||
|
||||
private static final String androidns = "http://schemas.android.com/apk/res/android";
|
||||
|
||||
|
@ -90,7 +89,6 @@ public class ColorPickerPreference
|
|||
mDefaultValue = context.getResources().getInteger(resourceId);
|
||||
}
|
||||
}
|
||||
mAlphaSliderEnabled = attrs.getAttributeBooleanValue(null, "alphaSlider", false);
|
||||
}
|
||||
mValue = mDefaultValue;
|
||||
}
|
||||
|
@ -195,8 +193,6 @@ public class ColorPickerPreference
|
|||
|
||||
private void showDialog() {
|
||||
mDialog = new ColorPickerDialog(getContext(), getValue(), getTitle());
|
||||
if (mAlphaSliderEnabled)
|
||||
mDialog.setAlphaSliderVisible(true);
|
||||
mDialog.setOnColorChangedListener(this);
|
||||
mDialog.setOnDismissListener(this);
|
||||
addRemoveConfigChangedListener();
|
||||
|
@ -222,12 +218,6 @@ public class ColorPickerPreference
|
|||
if (mDialog != null)
|
||||
mDialog.reInitUI();
|
||||
}
|
||||
/**
|
||||
* Toggle Alpha Slider visibility (by default it's disabled)
|
||||
*/
|
||||
public void setAlphaSliderEnabled(boolean enable) {
|
||||
mAlphaSliderEnabled = enable;
|
||||
}
|
||||
|
||||
private static String convertToARGB(int color) {
|
||||
String alpha = Integer.toHexString(Color.alpha(color));
|
||||
|
|
|
@ -35,9 +35,7 @@ import android.view.View;
|
|||
|
||||
/**
|
||||
* Displays a color picker to the user and allow them
|
||||
* to select a color. A slider for the alpha channel is
|
||||
* also available. Enable it by setting
|
||||
* setAlphaSliderVisible(boolean) to true.
|
||||
* to select a color.
|
||||
* @author Daniel Nilsson
|
||||
*/
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
|
@ -77,27 +75,24 @@ public class ColorPickerView extends View {
|
|||
|
||||
private OnColorChangedListener mListener;
|
||||
|
||||
private Paint mSatValPaint;
|
||||
private Paint mSatValTrackerPaint;
|
||||
private Paint mSatValPaint = new Paint();
|
||||
private Paint mSatValTrackerPaint = new Paint();
|
||||
|
||||
private Paint mHuePaint;
|
||||
private Paint mHueTrackerPaint;
|
||||
private Paint mHuePaint = new Paint();
|
||||
private Paint mHueTrackerPaint = new Paint();
|
||||
|
||||
private Paint mAlphaPaint;
|
||||
private Paint mBorderPaint;
|
||||
private Paint mAlphaPaint = new Paint();
|
||||
private Paint mBorderPaint = new Paint();
|
||||
|
||||
private Shader mValShader;
|
||||
private Shader mSatShader;
|
||||
private Shader mHueShader;
|
||||
private Shader mAlphaShader;
|
||||
|
||||
private int mAlpha = 0xff;
|
||||
private float mHue = 360f;
|
||||
private float mSat = 0f;
|
||||
private float mVal = 0f;
|
||||
|
||||
private int mBorderColor = 0xff6E6E6E;
|
||||
private boolean mShowAlphaPanel = false;
|
||||
private final int mBorderColor = 0xff6E6E6E;
|
||||
|
||||
/**
|
||||
* Offset from the edge we must have or else
|
||||
|
@ -106,7 +101,6 @@ public class ColorPickerView extends View {
|
|||
*/
|
||||
private float mDrawingOffset;
|
||||
|
||||
|
||||
/*
|
||||
* Distance form the edges of the view
|
||||
* of where we are allowed to draw.
|
||||
|
@ -144,7 +138,7 @@ public class ColorPickerView extends View {
|
|||
RECTANGLE_TRACKER_OFFSET *= mDensity;
|
||||
HUE_PANEL_WIDTH *= mDensity;
|
||||
ALPHA_PANEL_HEIGHT *= mDensity;
|
||||
PANEL_SPACING = PANEL_SPACING * mDensity;
|
||||
PANEL_SPACING *= mDensity;
|
||||
|
||||
mDrawingOffset = calculateRequiredOffset();
|
||||
|
||||
|
@ -155,13 +149,6 @@ public class ColorPickerView extends View {
|
|||
}
|
||||
|
||||
private void initPaintTools() {
|
||||
mSatValPaint = new Paint();
|
||||
mSatValTrackerPaint = new Paint();
|
||||
mHuePaint = new Paint();
|
||||
mHueTrackerPaint = new Paint();
|
||||
mAlphaPaint = new Paint();
|
||||
mBorderPaint = new Paint();
|
||||
|
||||
mSatValTrackerPaint.setStyle(Style.STROKE);
|
||||
mSatValTrackerPaint.setStrokeWidth(2f * mDensity);
|
||||
mSatValTrackerPaint.setAntiAlias(true);
|
||||
|
@ -217,7 +204,7 @@ public class ColorPickerView extends View {
|
|||
|
||||
int rgb = Color.HSVToColor(new float[]{mHue,1f,1f});
|
||||
|
||||
mSatShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,
|
||||
Shader mSatShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,
|
||||
0xffffffff, rgb, TileMode.CLAMP);
|
||||
ComposeShader mShader = new ComposeShader(mValShader, mSatShader, PorterDuff.Mode.MULTIPLY);
|
||||
mSatValPaint.setShader(mShader);
|
||||
|
@ -226,11 +213,11 @@ public class ColorPickerView extends View {
|
|||
|
||||
Point p = satValToPoint(mSat, mVal);
|
||||
|
||||
float r = PALETTE_CIRCLE_TRACKER_RADIUS;
|
||||
mSatValTrackerPaint.setColor(0xff000000);
|
||||
canvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS - 1f * mDensity, mSatValTrackerPaint);
|
||||
|
||||
canvas.drawCircle(p.x, p.y, r - 1f * mDensity, mSatValTrackerPaint);
|
||||
mSatValTrackerPaint.setColor(0xffdddddd);
|
||||
canvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS, mSatValTrackerPaint);
|
||||
canvas.drawCircle(p.x, p.y, r, mSatValTrackerPaint);
|
||||
}
|
||||
|
||||
private void drawHuePanel(Canvas canvas) {
|
||||
|
@ -267,7 +254,7 @@ public class ColorPickerView extends View {
|
|||
}
|
||||
|
||||
private void drawAlphaPanel(Canvas canvas) {
|
||||
if (!mShowAlphaPanel || mAlphaRect == null || mAlphaPattern == null)
|
||||
if (mAlphaRect == null || mAlphaPattern == null)
|
||||
return;
|
||||
|
||||
final RectF rect = mAlphaRect;
|
||||
|
@ -287,7 +274,7 @@ public class ColorPickerView extends View {
|
|||
int color = Color.HSVToColor(hsv);
|
||||
int acolor = Color.HSVToColor(0, hsv);
|
||||
|
||||
mAlphaShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,
|
||||
Shader mAlphaShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,
|
||||
color, acolor, TileMode.CLAMP);
|
||||
|
||||
mAlphaPaint.setShader(mAlphaShader);
|
||||
|
@ -311,89 +298,57 @@ public class ColorPickerView extends View {
|
|||
final RectF rect = mHueRect;
|
||||
final float height = rect.height();
|
||||
|
||||
Point p = new Point();
|
||||
|
||||
p.y = (int) (height - (hue * height / 360f) + rect.top);
|
||||
p.x = (int) rect.left;
|
||||
|
||||
return p;
|
||||
return new Point((int) rect.left,
|
||||
(int) (height - (hue * height / 360f) + rect.top));
|
||||
}
|
||||
|
||||
private Point satValToPoint(float sat, float val) {
|
||||
final RectF rect = mSatValRect;
|
||||
final float height = rect.height();
|
||||
final float width = rect.width();
|
||||
final float height = rect.height();
|
||||
|
||||
Point p = new Point();
|
||||
p.x = (int) (sat * width + rect.left);
|
||||
p.y = (int) ((1f - val) * height + rect.top);
|
||||
|
||||
return p;
|
||||
return new Point((int) (sat * width + rect.left),
|
||||
(int) ((1f - val) * height + rect.top));
|
||||
}
|
||||
|
||||
private Point alphaToPoint(int alpha) {
|
||||
final RectF rect = mAlphaRect;
|
||||
final float width = rect.width();
|
||||
|
||||
Point p = new Point();
|
||||
p.x = (int) (width - (alpha * width / 0xff) + rect.left);
|
||||
p.y = (int) rect.top;
|
||||
return new Point((int) (width - (alpha * width / 0xff) + rect.left),
|
||||
(int) rect.top);
|
||||
}
|
||||
|
||||
return p;
|
||||
private static float clampF(float val, float min, float max) {
|
||||
return Math.min(Math.max(val, min), max);
|
||||
}
|
||||
|
||||
private float[] pointToSatVal(float x, float y) {
|
||||
final RectF rect = mSatValRect;
|
||||
float[] result = new float[2];
|
||||
|
||||
float width = rect.width();
|
||||
float height = rect.height();
|
||||
|
||||
if (x < rect.left)
|
||||
x = 0f;
|
||||
else if (x > rect.right)
|
||||
x = width;
|
||||
else
|
||||
x = x - rect.left;
|
||||
x = clampF(x - rect.left, 0f, width);
|
||||
y = clampF(y - rect.top, 0f, height);
|
||||
|
||||
if (y < rect.top)
|
||||
y = 0f;
|
||||
else if (y > rect.bottom)
|
||||
y = height;
|
||||
else
|
||||
y = y - rect.top;
|
||||
|
||||
result[0] = 1.f / width * x;
|
||||
result[1] = 1.f - (1.f / height * y);
|
||||
|
||||
return result;
|
||||
return new float[]{ x / width, 1f - y / height };
|
||||
}
|
||||
|
||||
private float pointToHue(float y) {
|
||||
final RectF rect = mHueRect;
|
||||
|
||||
float height = rect.height();
|
||||
|
||||
if (y < rect.top)
|
||||
y = 0f;
|
||||
else if (y > rect.bottom)
|
||||
y = height;
|
||||
else
|
||||
y = y - rect.top;
|
||||
y = clampF(y - rect.top, 0f, height);
|
||||
|
||||
return 360f - (y * 360f / height);
|
||||
}
|
||||
|
||||
private int pointToAlpha(int x) {
|
||||
final RectF rect = mAlphaRect;
|
||||
final int width = (int) rect.width();
|
||||
|
||||
if (x < rect.left)
|
||||
x = 0;
|
||||
else if (x > rect.right)
|
||||
x = width;
|
||||
else
|
||||
x = x - (int)rect.left;
|
||||
final int width = (int) rect.width();
|
||||
x = Math.min(Math.max(x - (int)rect.left, 0), width);
|
||||
|
||||
return 0xff - (x * 0xff / width);
|
||||
}
|
||||
|
@ -451,9 +406,6 @@ public class ColorPickerView extends View {
|
|||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int width;
|
||||
int height;
|
||||
|
||||
int widthMode = MeasureSpec.getMode(widthMeasureSpec);
|
||||
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
|
||||
|
||||
|
@ -463,25 +415,14 @@ public class ColorPickerView extends View {
|
|||
widthAllowed = chooseWidth(widthMode, widthAllowed);
|
||||
heightAllowed = chooseHeight(heightMode, heightAllowed);
|
||||
|
||||
if (!mShowAlphaPanel) {
|
||||
height = (int) (widthAllowed - PANEL_SPACING - HUE_PANEL_WIDTH);
|
||||
|
||||
//If calculated height (based on the width) is more than the allowed height.
|
||||
if (height > heightAllowed || getTag().equals("landscape")) {
|
||||
height = heightAllowed;
|
||||
width = (int) (height + PANEL_SPACING + HUE_PANEL_WIDTH);
|
||||
} else {
|
||||
width = widthAllowed;
|
||||
}
|
||||
} else {
|
||||
width = (int) (heightAllowed - ALPHA_PANEL_HEIGHT + HUE_PANEL_WIDTH);
|
||||
int width = (int) (heightAllowed - ALPHA_PANEL_HEIGHT + HUE_PANEL_WIDTH);
|
||||
int height;
|
||||
if (width > widthAllowed) {
|
||||
width = widthAllowed;
|
||||
height = (int) (widthAllowed - HUE_PANEL_WIDTH + ALPHA_PANEL_HEIGHT);
|
||||
} else {
|
||||
height = heightAllowed;
|
||||
}
|
||||
}
|
||||
|
||||
setMeasuredDimension(width, height);
|
||||
}
|
||||
|
@ -504,14 +445,12 @@ public class ColorPickerView extends View {
|
|||
|
||||
private int getPreferredWidth() {
|
||||
int width = getPreferredHeight();
|
||||
if (mShowAlphaPanel)
|
||||
width -= (PANEL_SPACING + ALPHA_PANEL_HEIGHT);
|
||||
width -= PANEL_SPACING + ALPHA_PANEL_HEIGHT;
|
||||
return (int) (width + HUE_PANEL_WIDTH + PANEL_SPACING);
|
||||
}
|
||||
|
||||
private int getPreferredHeight() {
|
||||
int height = (int)(200 * mDensity);
|
||||
if (mShowAlphaPanel)
|
||||
height += PANEL_SPACING + ALPHA_PANEL_HEIGHT;
|
||||
return height;
|
||||
}
|
||||
|
@ -534,8 +473,6 @@ public class ColorPickerView extends View {
|
|||
private void setUpSatValRect() {
|
||||
final RectF dRect = mDrawingRect;
|
||||
float panelSide = dRect.height() - BORDER_WIDTH_PX * 2;
|
||||
|
||||
if (mShowAlphaPanel)
|
||||
panelSide -= PANEL_SPACING + ALPHA_PANEL_HEIGHT;
|
||||
|
||||
float left = dRect.left + BORDER_WIDTH_PX;
|
||||
|
@ -551,17 +488,13 @@ public class ColorPickerView extends View {
|
|||
|
||||
float left = dRect.right - HUE_PANEL_WIDTH + BORDER_WIDTH_PX;
|
||||
float top = dRect.top + BORDER_WIDTH_PX;
|
||||
float bottom = dRect.bottom - BORDER_WIDTH_PX -
|
||||
(mShowAlphaPanel ? (PANEL_SPACING + ALPHA_PANEL_HEIGHT) : 0);
|
||||
float bottom = dRect.bottom - BORDER_WIDTH_PX - (PANEL_SPACING + ALPHA_PANEL_HEIGHT);
|
||||
float right = dRect.right - BORDER_WIDTH_PX;
|
||||
|
||||
mHueRect = new RectF(left, top, right, bottom);
|
||||
}
|
||||
|
||||
private void setUpAlphaRect() {
|
||||
if (!mShowAlphaPanel)
|
||||
return;
|
||||
|
||||
final RectF dRect = mDrawingRect;
|
||||
|
||||
float left = dRect.left + BORDER_WIDTH_PX;
|
||||
|
@ -575,8 +508,7 @@ public class ColorPickerView extends View {
|
|||
mAlphaPattern.setBounds(Math.round(mAlphaRect.left),
|
||||
Math.round(mAlphaRect.top),
|
||||
Math.round(mAlphaRect.right),
|
||||
Math.round(mAlphaRect.bottom)
|
||||
);
|
||||
Math.round(mAlphaRect.bottom));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -595,14 +527,6 @@ public class ColorPickerView extends View {
|
|||
return Color.HSVToColor(mAlpha, new float[]{mHue,mSat,mVal});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the color the view should show.
|
||||
* @param color The color that should be selected.
|
||||
*/
|
||||
public void setColor(int color) {
|
||||
setColor(color, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the color this view should show.
|
||||
* @param color The color that should be selected.
|
||||
|
@ -640,30 +564,4 @@ public class ColorPickerView extends View {
|
|||
public float getDrawingOffset() {
|
||||
return mDrawingOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if the user is allowed to adjust the alpha panel. Default is false.
|
||||
* If it is set to false no alpha will be set.
|
||||
*/
|
||||
public void setAlphaSliderVisible(boolean visible) {
|
||||
if (mShowAlphaPanel != visible) {
|
||||
mShowAlphaPanel = visible;
|
||||
|
||||
/*
|
||||
* Reset all shader to force a recreation.
|
||||
* Otherwise they will not look right after
|
||||
* the size of the view has changed.
|
||||
*/
|
||||
mValShader = null;
|
||||
mSatShader = null;
|
||||
mHueShader = null;
|
||||
mAlphaShader = null;
|
||||
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getAlphaSliderVisible() {
|
||||
return mShowAlphaPanel;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,91 +225,76 @@
|
|||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_brightSquare"
|
||||
android:title="@string/prefs_color_brightSquare_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FFFFFFFA">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_darkSquare"
|
||||
android:title="@string/prefs_color_darkSquare_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FF83A5D2">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_selectedSquare"
|
||||
android:title="@string/prefs_color_selectedSquare_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FF3232D1">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_brightPiece"
|
||||
android:title="@string/prefs_color_brightPiece_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FFF0F0F0">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_darkPiece"
|
||||
android:title="@string/prefs_color_darkPiece_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FF282828">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_arrow0"
|
||||
android:title="@string/prefs_color_arrow0_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#A01F1FFF">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_arrow1"
|
||||
android:title="@string/prefs_color_arrow1_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#A01FFF1F">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_arrow2"
|
||||
android:title="@string/prefs_color_arrow2_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#501F1FFF">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_arrow3"
|
||||
android:title="@string/prefs_color_arrow3_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#501FFF1F">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_arrow4"
|
||||
android:title="@string/prefs_color_arrow4_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#371F1FFF">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_arrow5"
|
||||
android:title="@string/prefs_color_arrow5_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#3C1FFF1F">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_arrow6"
|
||||
android:title="@string/prefs_color_arrow6_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#1E1F1FFF">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_arrow7"
|
||||
android:title="@string/prefs_color_arrow7_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#281FFF1F">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_squareLabel"
|
||||
android:title="@string/prefs_color_squareLabel_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FFFF0000">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_decoration"
|
||||
android:title="@string/prefs_color_decoration_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FF808080">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
</PreferenceCategory>
|
||||
|
@ -318,25 +303,21 @@
|
|||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_currentMove"
|
||||
android:title="@string/prefs_color_currentMove_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FF3333FF">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_pgnComment"
|
||||
android:title="@string/prefs_color_pgnComment_title"
|
||||
alphaSlider="true"
|
||||
android:defaultValue="#FFC0C000">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_fontForeground"
|
||||
android:title="@string/prefs_color_fontForeground_title"
|
||||
alphaSlider="false"
|
||||
android:defaultValue="#FFFFFF00">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="color_generalBackground"
|
||||
android:title="@string/prefs_color_generalBackground_title"
|
||||
alphaSlider="false"
|
||||
android:defaultValue="#FF2E2B53">
|
||||
</net.margaritov.preference.colorpicker.ColorPickerPreference>
|
||||
</PreferenceCategory>
|
||||
|
|
Loading…
Reference in New Issue
Block a user