Skip to content

Commit

Permalink
- update targetSdkVersion
Browse files Browse the repository at this point in the history
- update reselect mode
  • Loading branch information
s-hulenko committed Nov 12, 2020
1 parent ff229f6 commit e536fbb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions MPChartLib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ apply plugin: 'com.github.dcendents.android-maven'
group='com.github.philjay'

android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileSdkVersion 30
buildToolsVersion '30.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
targetSdkVersion 30
versionCode 3
versionName '3.1.2'
versionName '3.1.3'
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ public void highlightValue(Highlight high, boolean callListener) {
if (callListener && mSelectionListener != null) {

if (!valuesToHighlight()) {
if (!isNonSelectMode) mSelectionListener.onNothingSelected();
if (!isReselectMode) mSelectionListener.onNothingSelected();
} else {
// notify the listener
mSelectionListener.onValueSelected(e, high);
Expand Down Expand Up @@ -1830,18 +1830,18 @@ public void setUnbindEnabled(boolean enabled) {
/**
* non select mode, don t use reselect pie
*/
private boolean isNonSelectMode = true;
private boolean isReselectMode = false;

/**
* Set non select mode
*
* @param enable
*/
public void setNonSelectMode(boolean enable) {
this.isNonSelectMode = enable;
public void setReselectMode(boolean enable) {
this.isReselectMode = enable;
}

public boolean isNonSelectMode() {
return this.isNonSelectMode;
public boolean isReselectMode() {
return this.isReselectMode;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ public ChartGesture getLastGesture() {
protected void performHighlight(Highlight h, MotionEvent e) {

if (h == null || h.equalTo(mLastHighlighted)) {
mChart.highlightValue(null, true);
mLastHighlighted = null;
if (mChart.isReselectMode()) {
mChart.highlightValue(null, true);
mLastHighlighted = null;
}
} else {
mChart.highlightValue(h, true);
mLastHighlighted = h;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ public boolean onSingleTapConfirmed(MotionEvent e) {

@Override
public boolean onSingleTapUp(MotionEvent e) {

mLastGesture = ChartGesture.SINGLE_TAP;

OnChartGestureListener l = mChart.getOnChartGestureListener();
Expand Down

0 comments on commit e536fbb

Please sign in to comment.