Skip to content

Commit

Permalink
降低目标sdk版本
Browse files Browse the repository at this point in the history
  • Loading branch information
hnsycsxhzcsh committed Jan 12, 2019
1 parent 969c73f commit 491bffa
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 233 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
compileSdkVersion 23
defaultConfig {
applicationId "com.rulerview"
minSdkVersion 17
targetSdkVersion 26
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -20,7 +20,7 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:23.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/rulerview/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

mSizeViewKg = findViewById(R.id.sizeview_kg);
mSizeViewCm = findViewById(R.id.sizeview_cm);
mSizeViewKg = (RulerView) findViewById(R.id.sizeview_kg);
mSizeViewCm = (RulerView) findViewById(R.id.sizeview_cm);

mSizeViewKg.setCurrentValue(89);

Expand Down
34 changes: 0 additions & 34 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml

This file was deleted.

170 changes: 0 additions & 170 deletions app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary file not shown.
Binary file not shown.
8 changes: 3 additions & 5 deletions rulerlibrary/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 26


compileSdkVersion 23

defaultConfig {
minSdkVersion 17
targetSdkVersion 26
targetSdkVersion 23
versionCode 1
versionName "1.0"

Expand All @@ -27,7 +25,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:23.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
Expand Down
8 changes: 0 additions & 8 deletions rulerlibrary/src/main/java/com/rulerlibrary/RulerView.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import android.graphics.RegionIterator;
import android.os.Build;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v4.view.animation.FastOutLinearInInterpolator;
import android.text.TextUtils;
Expand Down Expand Up @@ -98,13 +97,6 @@ public RulerView(Context context, @Nullable AttributeSet attrs, int defStyleAttr
initView(context, attrs);
}

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public RulerView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
initView(context, attrs);
}


private void initView(Context context, AttributeSet attrs) {
mDetector = new GestureDetectorCompat(context, new RulerGestureListener());

Expand Down

0 comments on commit 491bffa

Please sign in to comment.