Skip to content

Commit

Permalink
update build tool and sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
lllllT committed Nov 6, 2018
1 parent 51a70cc commit b4bd6c4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 11
buildToolsVersion "20.0.0"
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "org.tamanegi.atmosphere"
minSdkVersion 11
targetSdkVersion 11
targetSdkVersion 28
versionCode 6
versionName '0.1.5'
}
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/org/tamanegi/atmosphere/PlotView.java
Expand Up @@ -138,21 +138,21 @@ public void onDraw(Canvas canvas)
paint.setStrokeWidth(1);
if(value_sub_step > 0) {
paint.setColor(sub_tics_color);
float sub_min = FloatMath.floor(
double sub_min = Math.floor(
(value_min + value_sub_step) / value_sub_step) *
value_sub_step;
for(float v = 0; v < value_range; v += value_sub_step) {
float y = h - ((sub_min + v - value_min) / value_range) * h;
float y = (float) (h - ((sub_min + v - value_min) / value_range) * h);
canvas.drawLine(0, y, w, y, paint);
}
}
if(value_main_step > 0) {
paint.setColor(main_tics_color);
float main_min = FloatMath.floor(
double main_min = Math.floor(
(value_min + value_main_step) / value_main_step) *
value_main_step;
for(float v = 0; v < value_range; v += value_main_step) {
float y = h - ((main_min + v - value_min) / value_range) * h;
float y = (float) (h - ((main_min + v - value_min) / value_range) * h);
canvas.drawLine(0, y, w, y, paint);
}
}
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/org/tamanegi/atmosphere/VerticalTicsView.java
Expand Up @@ -61,19 +61,19 @@ public void onDraw(Canvas canvas)
int h = getHeight();
float value_range = value_max - value_min;

float min = FloatMath.floor(value_min / value_step + 0.5f) * value_step;
float max = FloatMath.ceil(value_max / value_step + 0.5f) * value_step;
double min = Math.floor(value_min / value_step + 0.5f) * value_step;
double max = Math.ceil(value_max / value_step + 0.5f) * value_step;
for(float v = 0; min + v < max; v += value_step) {
float y = h - ((min + v - value_min) / value_range) * h;
double y = h - ((min + v - value_min) / value_range) * h;

float th2 = -paint.ascent() / 2;
float tx = w;
float ty = (y - th2 < 0 ? th2 * 2 :
double ty = (y - th2 < 0 ? th2 * 2 :
y + th2 > h ? h :
y + th2);

String str = String.format(number_format, min + v);
canvas.drawText(str, tx, ty, paint);
canvas.drawText(str, tx, (float) ty, paint);
}
}

Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Expand Up @@ -2,14 +2,16 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

allprojects {
repositories {
jcenter()
google()
}
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Wed Jun 08 00:01:51 JST 2016
#Tue Nov 06 23:06:50 JST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

0 comments on commit b4bd6c4

Please sign in to comment.