Skip to content

Commit 7edf573

Browse files
author
psi
committed
restore messed up build files
1 parent 370fbdb commit 7edf573

5 files changed

Lines changed: 15 additions & 14 deletions

File tree

.idea/copyright/profiles_settings.xml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

androidplot-core/src/main/java/com/androidplot/xy/StepModelFit.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
import com.androidplot.Region;
44

55
/**
6-
* Created by psi on 23.02.2017.
7-
*
8-
* Subclass of StepModel that chooses from predefined step values
9-
*
10-
* Depending on the currently displayed range (by value) choose increment so that
11-
* the number of lines is closest to StepModel.value
6+
* Subclass of StepModel that chooses from predefined step values. Depending on the currently
7+
* displayed range (by value) choose increment so that the number of lines
8+
* is closest to StepModel.value
129
*/
13-
1410
public class StepModelFit extends StepModel {
1511

1612
private double[] steps; // list of steps to choose from
@@ -48,10 +44,10 @@ public double getValue() {
4844
return super.getValue();
4945

5046
double curStep = steps[0];
51-
5247
double oldDistance = Math.abs((scale.length().doubleValue() / curStep)-super.getValue() );
5348

5449
// determine which step size comes closest to the desired number of steps
50+
// since steps[] is a small array brute force search is ok
5551
for (double step : steps) {
5652

5753
double newDistance = Math.abs((scale.length().doubleValue() / step)-super.getValue() );

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ buildscript {
3838
}
3939

4040
dependencies {
41-
classpath 'com.android.tools.build:gradle:2.2.3'
41+
classpath 'com.android.tools.build:gradle:2.2.0'
4242
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
4343
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
4444
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.5.0'

demoapp-wearable/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ buildscript {
1919
jcenter()
2020
}
2121
dependencies {
22-
classpath 'com.android.tools.build:gradle:2.2.3'
22+
classpath 'com.android.tools.build:gradle:1.2.3'
2323
}
2424
}
2525
apply plugin: 'com.android.application'

demoapp/src/main/java/com/androidplot/demos/TouchZoomExampleActivity.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
public class TouchZoomExampleActivity extends Activity {
3232
private static final int SERIES_SIZE = 3000;
3333
private static final int SERIES_ALPHA = 255;
34+
private static final int NUM_GRIDLINES = 5;
3435
private XYPlot plot;
3536
private PanZoom panZoom;
3637
private Button resetButton;
@@ -55,11 +56,11 @@ public void onClick(View view) {
5556
plot.setUserRangeOrigin(0);
5657

5758
// predefine the stepping of both axis
58-
// increment will be chosen from list to best fit 5 grid lines
59+
// increment will be chosen from list to best fit NUM_GRIDLINES grid lines
5960
double[] inc_domain = new double[]{10,50,100,500};
6061
double[] inc_range = new double[]{1,5,10,20,50,100};
61-
plot.setDomainStepModel(new StepModelFit(plot.getBounds().getxRegion(),inc_domain,5));
62-
plot.setRangeStepModel( new StepModelFit(plot.getBounds().getyRegion(),inc_range,5));
62+
plot.setDomainStepModel(new StepModelFit(plot.getBounds().getxRegion(),inc_domain,NUM_GRIDLINES));
63+
plot.setRangeStepModel( new StepModelFit(plot.getBounds().getyRegion(),inc_range,NUM_GRIDLINES));
6364

6465

6566
panSpinner = (Spinner) findViewById(R.id.pan_spinner);

0 commit comments

Comments
 (0)