diff --git a/ARE/app/build.gradle b/ARE/app/build.gradle index 492fccd..fd865b8 100644 --- a/ARE/app/build.gradle +++ b/ARE/app/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 26 + compileSdkVersion 29 defaultConfig { applicationId "com.chinalwb.are.demo" minSdkVersion 15 - targetSdkVersion 26 + targetSdkVersion 29 } buildTypes { @@ -19,11 +19,9 @@ android { } dependencies { - implementation 'com.android.support.constraint:constraint-layout:1.0.2' - implementation 'com.android.support:design:27.1.1' -// implementation 'com.android.support:appcompat-v7:26.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'com.google.android.material:material:1.2.0' implementation project(':are') - implementation 'com.github.bumptech.glide:glide:4.9.0' -// implementation 'com.github.chinalwb:are:0.1.6' + implementation 'com.github.bumptech.glide:glide:4.11.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } diff --git a/ARE/app/src/main/AndroidManifest.xml b/ARE/app/src/main/AndroidManifest.xml index dbd0ab0..b7573ea 100644 --- a/ARE/app/src/main/AndroidManifest.xml +++ b/ARE/app/src/main/AndroidManifest.xml @@ -1,12 +1,6 @@ - - + package="com.chinalwb.are.demo"> diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_DefaultToolbarActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_DefaultToolbarActivity.java index 018d7e9..171a3dd 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_DefaultToolbarActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_DefaultToolbarActivity.java @@ -3,7 +3,7 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -217,6 +217,7 @@ public boolean onOptionsItemSelected(MenuItem item) { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); mToolbar.onActivityResult(requestCode, resultCode, data); } } diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_FullBottomActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_FullBottomActivity.java index 9831066..d8b7b0e 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_FullBottomActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_FullBottomActivity.java @@ -3,15 +3,11 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.Menu; -import android.view.MenuInflater; import android.view.MenuItem; -import android.view.View; -import android.widget.Button; import com.chinalwb.are.AREditor; import com.chinalwb.are.strategies.VideoStrategy; @@ -62,6 +58,7 @@ private void initView() { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); this.arEditor.onActivityResult(requestCode, resultCode, data); } diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_FullTopActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_FullTopActivity.java index 76c05d0..821a8d2 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_FullTopActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_FullTopActivity.java @@ -2,7 +2,7 @@ import android.content.Intent; import android.net.Uri; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; @@ -56,6 +56,7 @@ private void initView() { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); this.arEditor.onActivityResult(requestCode, resultCode, data); } diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinBottomActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinBottomActivity.java index 1a0c164..efebf36 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinBottomActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinBottomActivity.java @@ -2,7 +2,7 @@ import android.content.Intent; import android.net.Uri; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; @@ -55,6 +55,7 @@ private void initView() { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); this.arEditor.onActivityResult(requestCode, resultCode, data); } diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinHideActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinHideActivity.java index 073519d..6bf906a 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinHideActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinHideActivity.java @@ -2,7 +2,7 @@ import android.content.Intent; import android.net.Uri; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; @@ -72,6 +72,7 @@ public void onClick(View v) { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); this.arEditor.onActivityResult(requestCode, resultCode, data); } diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinTopActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinTopActivity.java index f02a429..16ff8ee 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinTopActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MinTopActivity.java @@ -2,7 +2,7 @@ import android.content.Intent; import android.net.Uri; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; @@ -55,6 +55,7 @@ private void initView() { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); this.arEditor.onActivityResult(requestCode, resultCode, data); } diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MultiInstanceActivity.kt b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MultiInstanceActivity.kt index e4a7b24..c949589 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MultiInstanceActivity.kt +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MultiInstanceActivity.kt @@ -1,7 +1,7 @@ package com.chinalwb.are.demo import android.content.Intent -import android.support.v7.app.AppCompatActivity +import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import com.chinalwb.are.AREditor import kotlinx.android.synthetic.main.activity_are__multi_instance.* @@ -26,6 +26,8 @@ class ARE_MultiInstanceActivity : AppCompatActivity() { } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) + this.activeARE?.onActivityResult(requestCode, resultCode, data) } } diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/AtActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/AtActivity.java index c6ac39c..af6b02d 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/AtActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/AtActivity.java @@ -1,10 +1,10 @@ package com.chinalwb.are.demo; import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.View; public class AtActivity extends AppCompatActivity { diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/DemoUtil.java b/ARE/app/src/main/java/com/chinalwb/are/demo/DemoUtil.java index fda62da..bb7cff2 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/DemoUtil.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/DemoUtil.java @@ -6,7 +6,7 @@ import android.content.pm.PackageManager; import android.os.Build; import android.os.Environment; -import android.support.v4.app.ActivityCompat; +import androidx.core.app.ActivityCompat; import com.chinalwb.are.styles.toolbar.ARE_Toolbar; diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/IndexActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/IndexActivity.java index 80363e5..43e0b57 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/IndexActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/IndexActivity.java @@ -1,13 +1,13 @@ package com.chinalwb.are.demo; import android.content.Intent; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; -import com.chinalwb.are.glidesupport.GlideApp; +import com.bumptech.glide.Glide; public class IndexActivity extends AppCompatActivity { @@ -20,7 +20,7 @@ protected void onCreate(Bundle savedInstanceState) { ImageView imageView = (ImageView) findViewById(R.id.image); - GlideApp.with(this).load("http://a.hiphotos.baidu.com/image/h%3D300/sign=b18b23079522720e64cee4fa4bca0a3a/4a36acaf2edda3ccc4a53e450ce93901213f9216.jpg").into(imageView); + Glide.with(this).load("http://a.hiphotos.baidu.com/image/h%3D300/sign=b18b23079522720e64cee4fa4bca0a3a/4a36acaf2edda3ccc4a53e450ce93901213f9216.jpg").into(imageView); } private void initViews() { diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/MainActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/MainActivity.java index c04fee5..0a81614 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/MainActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/MainActivity.java @@ -3,7 +3,7 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -289,6 +289,7 @@ private int getLayoutId() { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQ_WRITE_EXTERNAL_STORAGE) { String html = this.arEditor.getHtml(); DemoUtil.saveHtml(this, html); diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/TextViewActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/TextViewActivity.java index e6940f7..b6e36b1 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/TextViewActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/TextViewActivity.java @@ -1,16 +1,10 @@ package com.chinalwb.are.demo; -import android.content.Context; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; import com.chinalwb.are.render.AreTextView; -import com.chinalwb.are.spans.ARE_Clickable_Span; -import com.chinalwb.are.spans.AreAtSpan; -import com.chinalwb.are.spans.AreImageSpan; -import com.chinalwb.are.spans.AreVideoSpan; -import com.chinalwb.are.strategies.AreClickStrategy; /** * @author dlink diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/toolitems/ARE_Span_Youtube.kt b/ARE/app/src/main/java/com/chinalwb/are/demo/toolitems/ARE_Span_Youtube.kt index 8bb822c..8dced6d 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/toolitems/ARE_Span_Youtube.kt +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/toolitems/ARE_Span_Youtube.kt @@ -1,16 +1,10 @@ package com.chinalwb.are.demo.toolitems -import android.content.Context import android.graphics.Bitmap import android.graphics.Canvas -import android.graphics.Color import android.graphics.Color.TRANSPARENT import android.graphics.Paint import android.text.style.ReplacementSpan -import com.bumptech.glide.load.engine.GlideException -import com.bumptech.glide.request.RequestListener -import com.bumptech.glide.request.RequestOptions -import com.chinalwb.are.glidesupport.GlideApp import com.chinalwb.are.spans.ARE_Clickable_Span import com.chinalwb.are.spans.ARE_Span diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/toolitems/ARE_Style_Youtube.kt b/ARE/app/src/main/java/com/chinalwb/are/demo/toolitems/ARE_Style_Youtube.kt index ee7d838..6685e90 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/toolitems/ARE_Style_Youtube.kt +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/toolitems/ARE_Style_Youtube.kt @@ -3,18 +3,18 @@ package com.chinalwb.are.demo.toolitems import android.app.Activity import android.graphics.Bitmap import android.graphics.Color -import android.support.v7.app.AlertDialog +import androidx.appcompat.app.AlertDialog import android.text.Editable import android.text.Spanned import android.text.TextUtils import android.widget.EditText import android.widget.ImageView +import com.bumptech.glide.Glide import com.bumptech.glide.load.engine.GlideException import com.bumptech.glide.request.RequestListener import com.bumptech.glide.request.RequestOptions import com.chinalwb.are.AREditText import com.chinalwb.are.demo.R -import com.chinalwb.are.glidesupport.GlideApp import com.chinalwb.are.styles.ARE_ABS_FreeStyle class ARE_Style_Youtube(editText: AREditText, imageView: ImageView) : ARE_ABS_FreeStyle(editText.context) { @@ -79,7 +79,7 @@ class ARE_Style_Youtube(editText: AREditText, imageView: ImageView) : ARE_ABS_Fr editable.insert(start, title) end = start + title.length } - GlideApp.with(mImageView.context).asBitmap().load(com.chinalwb.are.demo.R.drawable.youtube) + Glide.with(mImageView.context).asBitmap().load(com.chinalwb.are.demo.R.drawable.youtube) .apply(RequestOptions().override(50, 50)) .listener(object : RequestListener { override fun onLoadFailed(e: GlideException?, model: Any?, target: com.bumptech.glide.request.target.Target?, isFirstResource: Boolean): Boolean { diff --git a/ARE/app/src/main/res/layout/activity_are__demo.xml b/ARE/app/src/main/res/layout/activity_are__demo.xml index d99c53c..a2453be 100644 --- a/ARE/app/src/main/res/layout/activity_are__demo.xml +++ b/ARE/app/src/main/res/layout/activity_are__demo.xml @@ -7,7 +7,7 @@ android:orientation="vertical" android:background="#f8f8f8"> - - diff --git a/ARE/app/src/main/res/layout/activity_are__multi_instance.xml b/ARE/app/src/main/res/layout/activity_are__multi_instance.xml index e02dd81..219c682 100644 --- a/ARE/app/src/main/res/layout/activity_are__multi_instance.xml +++ b/ARE/app/src/main/res/layout/activity_are__multi_instance.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/ARE/app/src/main/res/layout/activity_at.xml b/ARE/app/src/main/res/layout/activity_at.xml index 85e5d48..dd61ee0 100644 --- a/ARE/app/src/main/res/layout/activity_at.xml +++ b/ARE/app/src/main/res/layout/activity_at.xml @@ -1,28 +1,28 @@ - - - - + - - \ No newline at end of file + \ No newline at end of file diff --git a/ARE/are/build.gradle b/ARE/are/build.gradle index d423470..2b4a404 100644 --- a/ARE/are/build.gradle +++ b/ARE/are/build.gradle @@ -13,15 +13,15 @@ tasks.withType(Javadoc) { } android { - compileSdkVersion 26 + compileSdkVersion 29 defaultConfig { minSdkVersion 15 - targetSdkVersion 26 - versionCode 1 - versionName "1.0" + targetSdkVersion 29 + versionCode 2 + versionName "1.0.1" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } @@ -40,17 +40,17 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'androidx.appcompat:appcompat:1.2.0' // implementation 'com.android.support:support-v4:26.1.0' // implementation 'com.android.support.constraint:constraint-layout:1.0.2' - testImplementation 'junit:junit:4.12' + testImplementation 'junit:junit:4.13' // androidTestImplementation 'com.android.support.test:runner:1.0.1' // androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' implementation files('libs/tagsoup-1.2.1.jar') - implementation 'com.github.bumptech.glide:glide:4.9.0' - annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' + implementation 'com.github.bumptech.glide:glide:4.11.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' } // apply from: './android-release-aar.gradle' diff --git a/ARE/are/src/main/java/com/chinalwb/are/AREditText.java b/ARE/are/src/main/java/com/chinalwb/are/AREditText.java index 667df03..d8f9f40 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/AREditText.java +++ b/ARE/are/src/main/java/com/chinalwb/are/AREditText.java @@ -6,7 +6,7 @@ import android.graphics.Color; import android.graphics.Typeface; import android.os.Build; -import android.support.v7.widget.AppCompatEditText; +import androidx.appcompat.widget.AppCompatEditText; import android.text.Editable; import android.text.Selection; import android.text.Spannable; diff --git a/ARE/are/src/main/java/com/chinalwb/are/AREditor.java b/ARE/are/src/main/java/com/chinalwb/are/AREditor.java index 7125512..1b8b441 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/AREditor.java +++ b/ARE/are/src/main/java/com/chinalwb/are/AREditor.java @@ -4,14 +4,13 @@ import android.content.Intent; import android.content.res.TypedArray; import android.graphics.Color; -import android.support.v4.widget.NestedScrollView; +import androidx.core.widget.NestedScrollView; import android.text.Editable; import android.text.Spanned; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.widget.RelativeLayout; -import android.widget.ScrollView; import com.chinalwb.are.android.inner.Html; import com.chinalwb.are.render.AreImageGetter; diff --git a/ARE/are/src/main/java/com/chinalwb/are/Util.java b/ARE/are/src/main/java/com/chinalwb/are/Util.java index 279348e..02bf797 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/Util.java +++ b/ARE/are/src/main/java/com/chinalwb/are/Util.java @@ -28,9 +28,6 @@ import android.widget.EditText; import android.widget.Toast; -import java.util.Arrays; -import java.util.Collections; - /** * All Rights Reserved. * @@ -235,7 +232,7 @@ public static Bitmap mergeBitmaps(Bitmap background, Bitmap foreground) { //draw fg into cv.drawBitmap(foreground, fgLeft, fgTop, null); //save all clip - cv.save(Canvas.ALL_SAVE_FLAG); + cv.save(); //store cv.restore(); return newBitmap; diff --git a/ARE/are/src/main/java/com/chinalwb/are/activities/Are_AtPickerActivity.java b/ARE/are/src/main/java/com/chinalwb/are/activities/Are_AtPickerActivity.java index a835907..1281c73 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/activities/Are_AtPickerActivity.java +++ b/ARE/are/src/main/java/com/chinalwb/are/activities/Are_AtPickerActivity.java @@ -1,10 +1,9 @@ package com.chinalwb.are.activities; import android.app.Activity; -import android.content.ClipData; import android.content.Intent; import android.os.AsyncTask; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; @@ -16,9 +15,7 @@ import com.chinalwb.are.styles.ARE_At; import java.util.ArrayList; -import java.util.List; import java.util.Random; -import java.util.concurrent.ExecutorService; import static android.os.AsyncTask.THREAD_POOL_EXECUTOR; diff --git a/ARE/are/src/main/java/com/chinalwb/are/activities/Are_VideoPlayerActivity.java b/ARE/are/src/main/java/com/chinalwb/are/activities/Are_VideoPlayerActivity.java index af20fba..88ac931 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/activities/Are_VideoPlayerActivity.java +++ b/ARE/are/src/main/java/com/chinalwb/are/activities/Are_VideoPlayerActivity.java @@ -6,9 +6,9 @@ import android.content.Intent; import android.net.Uri; import android.os.AsyncTask; -import android.support.v4.widget.ContentLoadingProgressBar; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.core.widget.ContentLoadingProgressBar; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.os.Handler; import android.view.MotionEvent; @@ -17,7 +17,6 @@ import android.widget.VideoView; import com.chinalwb.are.R; -import com.chinalwb.are.Util; import com.chinalwb.are.strategies.VideoStrategy; /** diff --git a/ARE/are/src/main/java/com/chinalwb/are/colorpicker/ColorCheckedViewCheckmark.java b/ARE/are/src/main/java/com/chinalwb/are/colorpicker/ColorCheckedViewCheckmark.java index 95da6e3..158875b 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/colorpicker/ColorCheckedViewCheckmark.java +++ b/ARE/are/src/main/java/com/chinalwb/are/colorpicker/ColorCheckedViewCheckmark.java @@ -1,7 +1,7 @@ package com.chinalwb.are.colorpicker; import android.content.Context; -import android.support.v7.widget.AppCompatImageView; +import androidx.appcompat.widget.AppCompatImageView; import android.view.Gravity; import android.widget.LinearLayout; diff --git a/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiFragment.java b/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiFragment.java index 75a6692..82d6b6f 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiFragment.java +++ b/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiFragment.java @@ -2,8 +2,8 @@ import android.content.Context; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiPagerAdapter.java b/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiPagerAdapter.java index dfaf0ad..45103b6 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiPagerAdapter.java +++ b/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiPagerAdapter.java @@ -2,9 +2,9 @@ import android.content.Context; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; import java.util.ArrayList; diff --git a/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiPanel.java b/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiPanel.java index 61f5a7b..e4933a8 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiPanel.java +++ b/ARE/are/src/main/java/com/chinalwb/are/emojipanel/EmojiPanel.java @@ -1,7 +1,7 @@ package com.chinalwb.are.emojipanel; import android.content.Context; -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.ViewPager; /** * Created by wliu on 2018/3/17. diff --git a/ARE/are/src/main/java/com/chinalwb/are/glidesupport/MyAppGlideModule.java b/ARE/are/src/main/java/com/chinalwb/are/glidesupport/MyAppGlideModule.java deleted file mode 100644 index 801aac0..0000000 --- a/ARE/are/src/main/java/com/chinalwb/are/glidesupport/MyAppGlideModule.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.chinalwb.are.glidesupport; - -import com.bumptech.glide.annotation.GlideModule; -import com.bumptech.glide.module.AppGlideModule; - -@GlideModule -public final class MyAppGlideModule extends AppGlideModule { - -} \ No newline at end of file diff --git a/ARE/are/src/main/java/com/chinalwb/are/render/AreImageGetter.java b/ARE/are/src/main/java/com/chinalwb/are/render/AreImageGetter.java index 492e7ac..45a114f 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/render/AreImageGetter.java +++ b/ARE/are/src/main/java/com/chinalwb/are/render/AreImageGetter.java @@ -8,14 +8,14 @@ import android.net.Uri; import android.widget.TextView; +import com.bumptech.glide.Glide; +import com.bumptech.glide.RequestManager; import com.bumptech.glide.request.target.SimpleTarget; import com.bumptech.glide.request.transition.Transition; import com.chinalwb.are.AREditText; import com.chinalwb.are.Constants; import com.chinalwb.are.Util; import com.chinalwb.are.android.inner.Html; -import com.chinalwb.are.glidesupport.GlideApp; -import com.chinalwb.are.glidesupport.GlideRequests; public class AreImageGetter implements Html.ImageGetter { @@ -23,13 +23,13 @@ public class AreImageGetter implements Html.ImageGetter { private TextView mTextView; - private static GlideRequests sGlideRequests; + private static RequestManager sGlideRequests; public AreImageGetter(Context context, TextView textView) { mContext = context; mTextView = textView; - sGlideRequests = GlideApp.with(mContext); + sGlideRequests = Glide.with(mContext); } @Override diff --git a/ARE/are/src/main/java/com/chinalwb/are/render/AreTextView.java b/ARE/are/src/main/java/com/chinalwb/are/render/AreTextView.java index ba1b5ad..bc7c7c2 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/render/AreTextView.java +++ b/ARE/are/src/main/java/com/chinalwb/are/render/AreTextView.java @@ -1,8 +1,8 @@ package com.chinalwb.are.render; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.v7.widget.AppCompatTextView; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatTextView; import android.text.Spanned; import android.util.AttributeSet; import android.util.TypedValue; diff --git a/ARE/are/src/main/java/com/chinalwb/are/spans/AreForegroundColorSpan.java b/ARE/are/src/main/java/com/chinalwb/are/spans/AreForegroundColorSpan.java index 60cc84a..603d1c2 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/spans/AreForegroundColorSpan.java +++ b/ARE/are/src/main/java/com/chinalwb/are/spans/AreForegroundColorSpan.java @@ -1,6 +1,6 @@ package com.chinalwb.are.spans; -import android.support.annotation.ColorInt; +import androidx.annotation.ColorInt; import android.text.style.ForegroundColorSpan; public class AreForegroundColorSpan extends ForegroundColorSpan implements AreDynamicSpan { diff --git a/ARE/are/src/main/java/com/chinalwb/are/spans/AreHrSpan.java b/ARE/are/src/main/java/com/chinalwb/are/spans/AreHrSpan.java index 8c1d507..7515ae7 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/spans/AreHrSpan.java +++ b/ARE/are/src/main/java/com/chinalwb/are/spans/AreHrSpan.java @@ -1,15 +1,12 @@ package com.chinalwb.are.spans; -import android.content.Context; import android.graphics.Canvas; -import android.graphics.Color; import android.graphics.Paint; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.style.ReplacementSpan; import com.chinalwb.are.Constants; -import com.chinalwb.are.Util; public class AreHrSpan extends ReplacementSpan implements ARE_Span { diff --git a/ARE/are/src/main/java/com/chinalwb/are/strategies/defaults/DefaultImagePreviewActivity.java b/ARE/are/src/main/java/com/chinalwb/are/strategies/defaults/DefaultImagePreviewActivity.java index f2f4956..9f8d313 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/strategies/defaults/DefaultImagePreviewActivity.java +++ b/ARE/are/src/main/java/com/chinalwb/are/strategies/defaults/DefaultImagePreviewActivity.java @@ -5,18 +5,18 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.view.MotionEvent; import android.view.View; import android.widget.ImageView; +import com.bumptech.glide.Glide; +import com.bumptech.glide.RequestManager; import com.bumptech.glide.request.target.SimpleTarget; import com.bumptech.glide.request.transition.Transition; import com.chinalwb.are.R; import com.chinalwb.are.Util; -import com.chinalwb.are.glidesupport.GlideApp; -import com.chinalwb.are.glidesupport.GlideRequests; import static com.chinalwb.are.spans.AreImageSpan.ImageType; @@ -44,7 +44,7 @@ public class DefaultImagePreviewActivity extends AppCompatActivity { private static final int UI_ANIMATION_DELAY = 300; private final Handler mHideHandler = new Handler(); - private static GlideRequests sGlideRequests; + private static RequestManager sGlideRequests; private static int sWidth; @@ -108,7 +108,7 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_default_image_preview); - sGlideRequests = GlideApp.with(this); + sGlideRequests = Glide.with(this); sWidth = Util.getScreenWidthAndHeight(this)[0]; mVisible = true; mControlsView = findViewById(R.id.fullscreen_content_controls); diff --git a/ARE/are/src/main/java/com/chinalwb/are/strategies/defaults/DefaultProfileActivity.java b/ARE/are/src/main/java/com/chinalwb/are/strategies/defaults/DefaultProfileActivity.java index 5d12503..0f403b7 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/strategies/defaults/DefaultProfileActivity.java +++ b/ARE/are/src/main/java/com/chinalwb/are/strategies/defaults/DefaultProfileActivity.java @@ -1,7 +1,6 @@ package com.chinalwb.are.strategies.defaults; -import android.media.Image; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; diff --git a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Emoji.java b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Emoji.java index 821634a..f4a9919 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Emoji.java +++ b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Emoji.java @@ -1,8 +1,8 @@ package com.chinalwb.are.styles; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentManager; +import androidx.appcompat.app.AppCompatActivity; import android.text.Editable; import android.text.Spannable; import android.text.SpannableStringBuilder; diff --git a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Hr.java b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Hr.java index da54c5b..1dcc97c 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Hr.java +++ b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Hr.java @@ -1,19 +1,13 @@ package com.chinalwb.are.styles; -import android.test.mock.MockContext; import android.text.Editable; -import android.text.Layout; import android.text.Spannable; import android.text.SpannableStringBuilder; -import android.text.Spanned; -import android.text.style.AlignmentSpan; import android.view.View; -import android.widget.EditText; import android.widget.ImageView; import com.chinalwb.are.AREditText; import com.chinalwb.are.Constants; -import com.chinalwb.are.spans.AreAtSpan; import com.chinalwb.are.spans.AreHrSpan; import com.chinalwb.are.styles.toolbar.ARE_Toolbar; diff --git a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Image.java b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Image.java index 75f397f..06250f9 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Image.java +++ b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Image.java @@ -16,6 +16,8 @@ import android.widget.EditText; import android.widget.ImageView; +import com.bumptech.glide.Glide; +import com.bumptech.glide.RequestManager; import com.bumptech.glide.request.target.SimpleTarget; import com.bumptech.glide.request.transition.Transition; import com.chinalwb.are.AREditText; @@ -24,8 +26,6 @@ import com.chinalwb.are.spans.AreImageSpan; import com.chinalwb.are.styles.toolbar.ARE_Toolbar; import com.chinalwb.are.styles.windows.ImageSelectDialog; -import com.chinalwb.are.glidesupport.GlideApp; -import com.chinalwb.are.glidesupport.GlideRequests; import static com.chinalwb.are.spans.AreImageSpan.ImageType; @@ -37,7 +37,7 @@ public class ARE_Image implements IARE_Style, IARE_Image { private Context mContext; - private static GlideRequests sGlideRequests; + private static RequestManager sGlideRequests; private static int sWidth = 0; @@ -48,7 +48,7 @@ public class ARE_Image implements IARE_Style, IARE_Image { public ARE_Image(ImageView emojiImageView) { this.mInsertImageView = emojiImageView; this.mContext = emojiImageView.getContext(); - sGlideRequests = GlideApp.with(mContext); + sGlideRequests = Glide.with(mContext); sWidth = Util.getScreenWidthAndHeight(mContext)[0]; setListenerForImageView(this.mInsertImageView); } diff --git a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Link.java b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Link.java index d83ad4a..422e90a 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Link.java +++ b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Link.java @@ -2,11 +2,10 @@ import android.app.Activity; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.text.Editable; import android.text.Spanned; import android.text.TextUtils; -import android.text.style.URLSpan; import android.view.LayoutInflater; import android.view.View; import android.widget.EditText; @@ -17,8 +16,6 @@ import com.chinalwb.are.spans.AreUrlSpan; import com.chinalwb.are.styles.toolbar.ARE_Toolbar; -import org.w3c.dom.Text; - /** * Created by wliu on 2018/1/21. diff --git a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Video.java b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Video.java index 28d7857..97ffa1c 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Video.java +++ b/ARE/are/src/main/java/com/chinalwb/are/styles/ARE_Video.java @@ -14,14 +14,13 @@ import android.os.Build; import android.provider.DocumentsContract; import android.provider.MediaStore; -import android.support.v4.content.CursorLoader; +import androidx.loader.content.CursorLoader; import android.text.Editable; import android.text.Layout; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.style.AlignmentSpan; -import android.text.style.ImageSpan; import android.view.View; import android.view.View.OnClickListener; import android.widget.EditText; @@ -32,7 +31,6 @@ import com.chinalwb.are.R; import com.chinalwb.are.Util; import com.chinalwb.are.activities.Are_VideoPlayerActivity; -import com.chinalwb.are.spans.AreImageSpan; import com.chinalwb.are.spans.AreVideoSpan; import com.chinalwb.are.strategies.VideoStrategy; import com.chinalwb.are.styles.toolbar.ARE_Toolbar; diff --git a/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Image.java b/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Image.java index d282b37..758834c 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Image.java +++ b/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Image.java @@ -15,6 +15,8 @@ import android.widget.EditText; import android.widget.ImageView; +import com.bumptech.glide.Glide; +import com.bumptech.glide.RequestManager; import com.bumptech.glide.request.target.SimpleTarget; import com.bumptech.glide.request.transition.Transition; import com.chinalwb.are.AREditText; @@ -24,8 +26,6 @@ import com.chinalwb.are.styles.IARE_Image; import com.chinalwb.are.styles.IARE_Style; import com.chinalwb.are.styles.windows.ImageSelectDialog; -import com.chinalwb.are.glidesupport.GlideApp; -import com.chinalwb.are.glidesupport.GlideRequests; import static com.chinalwb.are.spans.AreImageSpan.ImageType; @@ -39,7 +39,7 @@ public class ARE_Style_Image implements IARE_Style, IARE_Image { private Context mContext; - private static GlideRequests sGlideRequests; + private static RequestManager sGlideRequests; private static int sWidth = 0; @@ -51,7 +51,7 @@ public ARE_Style_Image(AREditText editText, ImageView emojiImageView) { this.mEditText = editText; this.mInsertImageView = emojiImageView; this.mContext = emojiImageView.getContext(); - sGlideRequests = GlideApp.with(mContext); + sGlideRequests = Glide.with(mContext); sWidth = Util.getScreenWidthAndHeight(mContext)[0]; setListenerForImageView(this.mInsertImageView); } diff --git a/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Link.java b/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Link.java index e7f112d..c3da1d7 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Link.java +++ b/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Link.java @@ -3,7 +3,7 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; +import androidx.appcompat.app.AlertDialog; import android.text.Editable; import android.text.Spanned; import android.text.TextUtils; diff --git a/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Video.java b/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Video.java index 5b4b57f..eebae18 100644 --- a/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Video.java +++ b/ARE/are/src/main/java/com/chinalwb/are/styles/toolitems/styles/ARE_Style_Video.java @@ -14,7 +14,7 @@ import android.os.Build; import android.provider.DocumentsContract; import android.provider.MediaStore; -import android.support.v4.content.CursorLoader; +import androidx.loader.content.CursorLoader; import android.text.Editable; import android.text.Layout; import android.text.Spannable; diff --git a/ARE/build.gradle b/ARE/build.gradle index 8814250..0cb3648 100644 --- a/ARE/build.gradle +++ b/ARE/build.gradle @@ -1,21 +1,22 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - ext.kotlin_version = '1.3.31' +buildscript { + ext.kotlin_version = '1.3.72' - repositories { - maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } - jcenter() - google() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.0.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } + repositories { + maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } + jcenter() + google() + } + dependencies { + classpath 'com.android.tools.build:gradle:4.0.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } } allprojects { - repositories { - maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } - jcenter() - google() - } + repositories { + maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } + jcenter() + google() + } } diff --git a/ARE/gradle.properties b/ARE/gradle.properties new file mode 100644 index 0000000..5465fec --- /dev/null +++ b/ARE/gradle.properties @@ -0,0 +1,2 @@ +android.enableJetifier=true +android.useAndroidX=true \ No newline at end of file diff --git a/ARE/gradle/wrapper/gradle-wrapper.properties b/ARE/gradle/wrapper/gradle-wrapper.properties index 86a10a4..9c58c83 100644 --- a/ARE/gradle/wrapper/gradle-wrapper.properties +++ b/ARE/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Jan 14 19:52:24 CST 2018 +#Thu Aug 20 17:04:03 KST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/ARE/local.properties b/ARE/local.properties index aa019da..8d26fdb 100644 --- a/ARE/local.properties +++ b/ARE/local.properties @@ -4,5 +4,5 @@ # Location of the SDK. This is only used by Gradle. # For customization when using a Version Control System, please read the # header note. -#Sat May 09 18:23:15 CST 2020 -sdk.dir=/Users/wliu/Library/Android/sdk +#Thu Aug 20 17:01:52 KST 2020 +sdk.dir=/Users/jgpak/Library/Android/sdk