Skip to content

Commit

Permalink
RxTool 全面升级到 android X.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamsiree committed Nov 23, 2019
1 parent 0657bec commit 6c2c5a7
Show file tree
Hide file tree
Showing 113 changed files with 396 additions and 278 deletions.
13 changes: 9 additions & 4 deletions RxArcGisKit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ android {
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -23,10 +28,10 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly 'com.android.support:appcompat-v7:28.0.0'
compileOnly 'androidx.appcompat:appcompat:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
compileOnly 'com.esri.arcgisruntime:arcgis-android:100.3.0'
compileOnly project(':RxKit')
}
13 changes: 9 additions & 4 deletions RxCamera/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ android {
versionCode 1
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -31,10 +36,10 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly project(':RxKit')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
compileOnly 'io.reactivex.rxjava2:rxjava:2.1.14'
compileOnly 'io.reactivex.rxjava2:rxandroid:2.0.2'
}
3 changes: 2 additions & 1 deletion RxCamera/src/main/api14/com/vondear/camera/Camera1.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
import android.os.Build;
import android.support.v4.util.SparseArrayCompat;
import android.view.SurfaceHolder;

import androidx.collection.SparseArrayCompat;

import java.io.IOException;
import java.util.List;
import java.util.Set;
Expand Down
3 changes: 2 additions & 1 deletion RxCamera/src/main/api21/com/vondear/camera/Camera2.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
import android.hardware.camera2.params.StreamConfigurationMap;
import android.media.Image;
import android.media.ImageReader;
import android.support.annotation.NonNull;
import android.util.Log;
import android.util.SparseIntArray;
import android.view.Surface;

import androidx.annotation.NonNull;

import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.vondear.camera;

import android.content.Context;
import android.support.v4.view.ViewCompat;
import androidx.core.view.ViewCompat;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
Expand Down
6 changes: 4 additions & 2 deletions RxCamera/src/main/base/com/vondear/camera/AspectRatio.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.v4.util.SparseArrayCompat;

import androidx.annotation.NonNull;
import androidx.collection.SparseArrayCompat;


/**
* Immutable class for describing proportional relationship between width and height.
Expand Down
3 changes: 2 additions & 1 deletion RxCamera/src/main/base/com/vondear/camera/Size.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.vondear.camera;

import android.support.annotation.NonNull;

import androidx.annotation.NonNull;

/**
* Immutable class for describing width and height dimensions in pixels.
Expand Down
3 changes: 2 additions & 1 deletion RxCamera/src/main/base/com/vondear/camera/SizeMap.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.vondear.camera;

import android.support.v4.util.ArrayMap;

import androidx.collection.ArrayMap;

import java.util.Set;
import java.util.SortedSet;
Expand Down
13 changes: 7 additions & 6 deletions RxCamera/src/main/java/com/vondear/camera/RxCameraView.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.os.ParcelableCompat;
import android.support.v4.os.ParcelableCompatCreatorCallbacks;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.FrameLayout;

import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.os.ParcelableCompat;
import androidx.core.os.ParcelableCompatCreatorCallbacks;
import androidx.core.view.ViewCompat;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
Expand Down
11 changes: 6 additions & 5 deletions RxCamera/src/main/java/com/vondear/camera/tool/RxCameraTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.content.Context;
import android.hardware.Camera;
import android.os.SystemClock;
import android.support.annotation.NonNull;
import android.util.Log;

import com.vondear.camera.RxCameraView;
Expand All @@ -26,6 +25,7 @@
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;

Expand All @@ -40,8 +40,6 @@ public class RxCameraTool {

/**
* 打开闪光灯
*
* @return
*/
public static void openFlashLight() {
try {
Expand All @@ -60,7 +58,6 @@ public static void openFlashLight() {
/**
* 关闭闪光灯
*
* @return
*/
public static void closeFlashLight() {
try {
Expand All @@ -83,7 +80,11 @@ public static void takePic(Context mContext, final RxCameraView mCameraView) {
if (mCameraView.isCameraOpened()) {
RxVibrateTool.vibrateOnce(mContext, 150);
RxToast.normal("正在拍照..");
mCameraView.takePicture();
try {
mCameraView.takePicture();
} catch (Exception var2) {
RxToast.normal("你碰到问题咯");
}
} else {
mCameraView.start();
RxVibrateTool.vibrateOnce(mContext, 150);
Expand Down
34 changes: 25 additions & 9 deletions RxDemo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'

android {

Expand All @@ -11,6 +12,12 @@ android {
versionName "1.0.0"
multiDexEnabled true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -34,16 +41,16 @@ dependencies {
//流式布局
//动画向下版本兼容 nineold包
//noinspection GradleCompatible
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android:flexbox:0.3.2'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.jakewharton:butterknife:8.8.1'

implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'jp.wasabeef:glide-transformations:3.3.0'
Expand All @@ -54,7 +61,16 @@ dependencies {
implementation 'com.afollestad.material-dialogs:core:0.9.3.0'
// implementation 'com.github.google:cameraview:3eaeac09a7'
implementation 'com.orhanobut:logger:2.2.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

implementation 'com.jakewharton:butterknife:10.2.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'

implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// Because RxAndroid releases are few and far between, it is recommended you also
// explicitly depend on RxJava's latest version for bug fixes and new features.
// (see https://github.com/ReactiveX/RxJava/releases for latest 2.x.x version)
implementation 'io.reactivex.rxjava2:rxjava:2.2.14'

configurations.all {
exclude group: 'com.android.support', module: 'support-v13'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;

import androidx.multidex.MultiDex;

import com.vondear.rxtool.RxTool;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.vondear.rxdemo.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.LinearLayout;

import androidx.appcompat.app.AppCompatActivity;

import com.vondear.rxdemo.R;
import com.vondear.rxdemo.adapter.AdapterStackTest;
import com.vondear.rxtool.RxTool;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
package com.vondear.rxdemo.activity;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.vondear.rxdemo.R;
import com.vondear.rxui.view.wavesidebar.adapter.AdapterContactCity;
import com.vondear.rxui.model.ModelContactCity;
import com.vondear.rxui.view.wavesidebar.ComparatorLetter;
import com.vondear.rxui.activity.ActivityBase;
import com.vondear.rxui.model.ModelContactCity;
import com.vondear.rxui.view.RxTitle;
import com.vondear.rxui.view.wavesidebar.ComparatorLetter;
import com.vondear.rxui.view.wavesidebar.PinnedHeaderDecoration;
import com.vondear.rxui.view.wavesidebar.WaveSideBarView;
import com.vondear.rxui.view.wavesidebar.adapter.AdapterContactCity;

import java.lang.reflect.Type;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import android.animation.ObjectAnimator;
import android.graphics.PointF;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
Expand All @@ -19,6 +17,9 @@
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.vondear.rxdemo.R;
import com.vondear.rxdemo.adapter.AdapterLeftMenu;
import com.vondear.rxdemo.adapter.AdapterRightDish;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.vondear.rxdemo.activity;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;

import com.google.android.material.tabs.TabLayout;
import com.vondear.rxdemo.R;
import com.vondear.rxdemo.fragment.FragmentLoadingDemo;
import com.vondear.rxdemo.fragment.FragmentLoadingWay;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;

import com.vondear.rxdemo.R;
import com.vondear.rxdemo.tools.EvaluatorARGB;
import com.vondear.rxui.view.progressing.SpinKitView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;

import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.vondear.rxdemo.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.widget.NestedScrollView;
import androidx.core.widget.NestedScrollView;
import android.text.Editable;
import android.text.InputType;
import android.text.TextUtils;
Expand Down
Loading

0 comments on commit 6c2c5a7

Please sign in to comment.