From b30a576349298b262377056b2c3fbb50cd48fb50 Mon Sep 17 00:00:00 2001 From: Iddo Hoeve Date: Thu, 30 Nov 2017 23:42:59 +0100 Subject: [PATCH] Prepare for new ColorPicker --- build.gradle | 2 ++ src/com/doubleyellow/scoreboard/dialog/ColorPicker.java | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0d73e5ae..02f10698 100644 --- a/build.gradle +++ b/build.gradle @@ -47,8 +47,10 @@ android { } // 25, 26 + //compileSdkVersion 25 compileSdkVersion 27 // buildToolsVersion not required for gradle 3.0.0 and higher (e.g. when using wrapper) + //buildToolsVersion '25.0.2' buildToolsVersion '27.0.1' useLibrary 'org.apache.http.legacy' diff --git a/src/com/doubleyellow/scoreboard/dialog/ColorPicker.java b/src/com/doubleyellow/scoreboard/dialog/ColorPicker.java index 41c877c7..fe30f24d 100644 --- a/src/com/doubleyellow/scoreboard/dialog/ColorPicker.java +++ b/src/com/doubleyellow/scoreboard/dialog/ColorPicker.java @@ -31,6 +31,7 @@ import com.doubleyellow.scoreboard.model.Player; import com.doubleyellow.scoreboard.main.ScoreBoard; import com.doubleyellow.android.view.ColorPickerView; +import com.doubleyellow.android.view.LineColorPicker; /** * Dialog that is displayed when user 'color' is clicked. @@ -83,14 +84,16 @@ public void init(Player targetPlayer, String sCurrentColor) { private View getColorPickerView() { ColorPickerView view = new ColorPickerView(context); + view.setAlphaSliderVisible(false); // no transparency + + //LineColorPicker view = new LineColorPicker(context, null); ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); view.setLayoutParams(layoutParams); - view.setOnColorChangedListener(colorChangedListener); - //view.setAlphaSliderVisible(false); // no transparency if ( this.sColor != null ) { view.setColor(Color.parseColor(this.sColor)); } + view.setOnColorChangedListener(colorChangedListener); return view; }