Skip to content

Commit

Permalink
Prepare for new ColorPicker
Browse files Browse the repository at this point in the history
  • Loading branch information
Iddo Hoeve committed Dec 4, 2017
1 parent a508a08 commit b30a576
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
7 changes: 5 additions & 2 deletions src/com/doubleyellow/scoreboard/dialog/ColorPicker.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit b30a576

Please sign in to comment.