Refactored to AndroidX + target and compile sdk 28 + Side fixes that were needed
All of these changes were needed to get app compiling after refactoring
This commit is contained in:
parent
87cf190992
commit
acad5c1608
@ -13,7 +13,7 @@ android {
|
||||
versionCode libraryVersionCode
|
||||
versionName libraryVersionName
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
|
||||
}
|
||||
|
||||
@ -27,7 +27,8 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
testImplementation rootProject.ext.deps["junit"]
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.neoterm.bridge;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -12,7 +12,7 @@ android {
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
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'
|
||||
implementation project(':NeoTermBridge')
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.neoterm.bridge.example;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
|
@ -10,7 +10,7 @@ android {
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ dependencies {
|
||||
implementation rootProject.ext.deps["appcompat-v7"]
|
||||
testImplementation rootProject.ext.deps["junit"]
|
||||
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.neoterm;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -22,21 +22,14 @@ freely, subject to the following restrictions:
|
||||
|
||||
package io.neoterm;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.os.Vibrator;
|
||||
import android.hardware.SensorManager;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorManager;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
import android.widget.TextView;
|
||||
import android.os.Build;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
@ -294,12 +287,12 @@ class AccelerometerReader implements SensorEventListener
|
||||
public void onAccuracyChanged(Sensor s, int a)
|
||||
{
|
||||
}
|
||||
public boolean available(Activity context)
|
||||
public boolean available(AppCompatActivity context)
|
||||
{
|
||||
SensorManager manager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||
return ( manager != null && manager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null );
|
||||
}
|
||||
public void registerListener(Activity context, SensorEventListener l)
|
||||
public void registerListener(AppCompatActivity context, SensorEventListener l)
|
||||
{
|
||||
SensorManager manager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||
if ( manager == null && manager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) == null )
|
||||
@ -308,7 +301,7 @@ class AccelerometerReader implements SensorEventListener
|
||||
Globals.AppUsesOrientationSensor ? Sensor.TYPE_GAME_ROTATION_VECTOR : Sensor.TYPE_GYROSCOPE),
|
||||
SensorManager.SENSOR_DELAY_GAME);
|
||||
}
|
||||
public void unregisterListener(Activity context,SensorEventListener l)
|
||||
public void unregisterListener(AppCompatActivity context, SensorEventListener l)
|
||||
{
|
||||
SensorManager manager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||
if ( manager == null )
|
||||
|
@ -24,7 +24,6 @@ package io.neoterm;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.KeyguardManager;
|
||||
import android.app.ProgressDialog;
|
||||
import android.app.UiModeManager;
|
||||
@ -40,6 +39,7 @@ import android.inputmethodservice.Keyboard;
|
||||
import android.inputmethodservice.KeyboardView;
|
||||
import android.os.Bundle;
|
||||
import android.os.SystemClock;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.text.InputType;
|
||||
import android.text.SpannedString;
|
||||
import android.util.DisplayMetrics;
|
||||
@ -72,7 +72,7 @@ import io.neoterm.xorg.NeoXorgViewClient;
|
||||
import io.neoterm.xorg.R;
|
||||
|
||||
|
||||
public class MainActivity extends Activity implements NeoXorgViewClient {
|
||||
public class MainActivity extends AppCompatActivity implements NeoXorgViewClient {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -22,57 +22,10 @@ freely, subject to the following restrictions:
|
||||
|
||||
package io.neoterm;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
import android.util.Log;
|
||||
import java.io.*;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Environment;
|
||||
import android.os.StatFs;
|
||||
import java.util.Locale;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.Collections;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import java.lang.String;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.RectF;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Bitmap;
|
||||
import android.widget.TextView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Button;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.text.Editable;
|
||||
import android.text.SpannedString;
|
||||
import android.content.Intent;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.AlarmManager;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.net.Uri;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.Arrays;
|
||||
import android.graphics.Color;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.Sensor;
|
||||
import android.widget.Toast;
|
||||
|
||||
import io.neoterm.xorg.R;
|
||||
|
||||
|
@ -22,57 +22,21 @@ freely, subject to the following restrictions:
|
||||
|
||||
package io.neoterm;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
import android.util.Log;
|
||||
import java.io.*;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Environment;
|
||||
import android.os.StatFs;
|
||||
import java.util.Locale;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.Collections;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import java.lang.String;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.RectF;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Bitmap;
|
||||
import android.widget.TextView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Button;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.text.Editable;
|
||||
import android.text.SpannedString;
|
||||
import android.content.Intent;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.AlarmManager;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.net.Uri;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import java.util.Arrays;
|
||||
import android.graphics.Color;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.Sensor;
|
||||
import android.widget.Toast;
|
||||
|
||||
import io.neoterm.xorg.R;
|
||||
|
||||
|
@ -22,60 +22,24 @@ freely, subject to the following restrictions:
|
||||
|
||||
package io.neoterm;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
import android.util.Log;
|
||||
import java.io.*;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Environment;
|
||||
import android.os.StatFs;
|
||||
import java.util.Locale;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.Collections;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import java.lang.String;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.RectF;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Bitmap;
|
||||
import android.widget.TextView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Button;
|
||||
import android.widget.Scroller;
|
||||
import android.view.View;
|
||||
import android.view.Gravity;
|
||||
import android.widget.LinearLayout;
|
||||
import android.text.Editable;
|
||||
import android.text.SpannedString;
|
||||
import android.content.Intent;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.AlarmManager;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.net.Uri;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.Arrays;
|
||||
import android.graphics.Color;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.Sensor;
|
||||
import android.widget.Toast;
|
||||
import android.os.StatFs;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.text.InputType;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import io.neoterm.xorg.R;
|
||||
|
||||
|
@ -22,57 +22,20 @@ freely, subject to the following restrictions:
|
||||
|
||||
package io.neoterm;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
import android.util.Log;
|
||||
import java.io.*;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Environment;
|
||||
import android.os.StatFs;
|
||||
import java.util.Locale;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.Collections;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import java.lang.String;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.RectF;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Bitmap;
|
||||
import android.widget.TextView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Button;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.text.Editable;
|
||||
import android.text.SpannedString;
|
||||
import android.content.Intent;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.AlarmManager;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.net.Uri;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.Arrays;
|
||||
import android.graphics.Color;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.Sensor;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import io.neoterm.xorg.R;
|
||||
|
||||
|
@ -12,7 +12,7 @@ android {
|
||||
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
|
||||
versionCode 37
|
||||
versionName "2.1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
resConfigs "zh-rCN", "zh-rTW"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
@ -56,16 +56,10 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
testImplementation rootProject.ext.deps["junit"]
|
||||
androidTestImplementation project(path: ':NeoLang')
|
||||
|
||||
implementation rootProject.ext.deps["kotlin-stdlib"]
|
||||
implementation rootProject.ext.deps["design"]
|
||||
implementation rootProject.ext.deps["cardview-v7"]
|
||||
implementation rootProject.ext.deps["appcompat-v7"]
|
||||
|
||||
implementation 'org.greenrobot:eventbus:3.0.0'
|
||||
implementation 'com.github.wrdlbrnft:modular-adapter:0.2.0.6'
|
||||
@ -73,6 +67,10 @@ dependencies {
|
||||
implementation 'com.simplecityapps:recyclerview-fastscroll:1.0.16'
|
||||
implementation 'de.psdev.licensesdialog:licensesdialog:1.8.3'
|
||||
implementation 'com.github.GrenderG:Color-O-Matic:1.1.5'
|
||||
implementation 'androidx.annotation:annotation:1.2.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat-resources:1.2.0'
|
||||
|
||||
implementation project(':chrome-tabs')
|
||||
implementation project(':NeoLang')
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.neoterm
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.AlertDialog
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.neoterm.component.session
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.content.Context
|
||||
import io.neoterm.Globals
|
||||
import io.neoterm.frontend.component.NeoComponent
|
||||
@ -85,7 +85,7 @@ class SessionComponent : NeoComponent {
|
||||
}
|
||||
|
||||
fun createSession(context: Context, parameter: XParameter): XSession {
|
||||
if (context is Activity) {
|
||||
if (context is AppCompatActivity) {
|
||||
if (!checkLibrariesLoaded()) {
|
||||
throw RuntimeException("Cannot load libraries!")
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
package io.neoterm.frontend.config
|
||||
|
||||
import android.Manifest
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.DialogInterface
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.support.v4.app.ActivityCompat
|
||||
import android.support.v4.content.ContextCompat
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
|
||||
/**
|
||||
* @author kiva
|
||||
@ -16,7 +16,7 @@ import android.support.v4.content.ContextCompat
|
||||
object NeoPermission {
|
||||
const val REQUEST_APP_PERMISSION = 10086
|
||||
|
||||
fun initAppPermission(context: Activity, requestCode: Int) {
|
||||
fun initAppPermission(context: AppCompatActivity, requestCode: Int) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
return
|
||||
}
|
||||
@ -39,7 +39,7 @@ object NeoPermission {
|
||||
}
|
||||
}
|
||||
|
||||
private fun doRequestPermission(context: Activity, requestCode: Int) {
|
||||
private fun doRequestPermission(context: AppCompatActivity, requestCode: Int) {
|
||||
try {
|
||||
ActivityCompat.requestPermissions(context,
|
||||
arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE),
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.neoterm.frontend.floating
|
||||
|
||||
import android.app.AlertDialog
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.content.Context
|
||||
import android.content.DialogInterface
|
||||
import io.neoterm.R
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.neoterm.frontend.logging
|
||||
|
||||
import android.content.Context
|
||||
import android.support.annotation.IntDef
|
||||
import androidx.annotation.IntDef
|
||||
import android.util.Log
|
||||
import java.io.*
|
||||
import java.text.SimpleDateFormat
|
||||
@ -21,7 +21,7 @@ object NLog {
|
||||
const val E = Log.ERROR
|
||||
const val A = Log.ASSERT
|
||||
|
||||
@IntDef(V.toLong(), D.toLong(), I.toLong(), W.toLong(), E.toLong(), A.toLong())
|
||||
@IntDef(V.toLong().toInt(), D.toLong().toInt(), I.toLong().toInt(), W.toLong().toInt(), E.toLong().toInt(), A.toLong().toInt())
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
private annotation class TYPE
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.neoterm.frontend.session.xorg
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.app.UiModeManager
|
||||
import android.content.Context
|
||||
import android.content.pm.ActivityInfo
|
||||
@ -24,7 +24,7 @@ import java.util.*
|
||||
* @author kiva
|
||||
*/
|
||||
|
||||
class XSession constructor(private val mActivity: Activity, val mSessionData: XSessionData) : NeoXorgViewClient {
|
||||
class XSession constructor(private val mActivity: AppCompatActivity, val mSessionData: XSessionData) : NeoXorgViewClient {
|
||||
var mSessionName = "";
|
||||
|
||||
init {
|
||||
|
@ -3,6 +3,7 @@ package io.neoterm.frontend.terminal.extrakey.button
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import androidx.appcompat.widget.AppCompatButton
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.widget.Button
|
||||
@ -18,7 +19,7 @@ open class RepeatableButton(buttonText: String) : ControlButton(buttonText) {
|
||||
}
|
||||
|
||||
private class RepeatableButtonWidget(context: Context?, attrs: AttributeSet?, defStyleAttr: Int)
|
||||
: Button(context, attrs, defStyleAttr) {
|
||||
: AppCompatButton(context!!, attrs, defStyleAttr) {
|
||||
|
||||
/**
|
||||
* Milliseconds how long we trigger an action
|
||||
|
@ -9,7 +9,8 @@ import android.os.Binder
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import android.os.PowerManager
|
||||
import android.support.v4.app.NotificationCompat
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import io.neoterm.R
|
||||
import io.neoterm.backend.EmulatorDebug
|
||||
import io.neoterm.backend.TerminalSession
|
||||
@ -92,7 +93,7 @@ class NeoTermService : Service() {
|
||||
return indexOfRemoved
|
||||
}
|
||||
|
||||
fun createXSession(activity: Activity, parameter: XParameter): XSession {
|
||||
fun createXSession(activity: AppCompatActivity, parameter: XParameter): XSession {
|
||||
val session = TerminalUtils.createSession(activity, parameter)
|
||||
mXSessions.add(session)
|
||||
updateNotification()
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.neoterm.setup
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.app.ProgressDialog
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
@ -20,7 +20,7 @@ object SetupHelper {
|
||||
return !PREFIX_FILE.isDirectory
|
||||
}
|
||||
|
||||
fun setup(activity: Activity, connection: SourceConnection,
|
||||
fun setup(activity: AppCompatActivity, connection: SourceConnection,
|
||||
resultListener: ResultListener) {
|
||||
if (!needSetup()) {
|
||||
resultListener.onResult(null)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.neoterm.setup;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.system.Os;
|
||||
import android.util.Pair;
|
||||
|
||||
@ -26,11 +26,11 @@ import io.neoterm.frontend.logging.NLog;
|
||||
final class SetupThread extends Thread {
|
||||
private final SourceConnection sourceConnection;
|
||||
private final File prefixPath;
|
||||
private final Activity activity;
|
||||
private final AppCompatActivity activity;
|
||||
private final ResultListener resultListener;
|
||||
private final ProgressDialog progressDialog;
|
||||
|
||||
public SetupThread(Activity activity, SourceConnection sourceConnection,
|
||||
public SetupThread(AppCompatActivity activity, SourceConnection sourceConnection,
|
||||
File prefixPath, ResultListener resultListener,
|
||||
ProgressDialog progressDialog) {
|
||||
this.activity = activity;
|
||||
|
@ -12,7 +12,7 @@ import android.graphics.drawable.RippleDrawable
|
||||
import android.graphics.drawable.ShapeDrawable
|
||||
import android.graphics.drawable.shapes.OvalShape
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.view.*
|
||||
import android.view.animation.PathInterpolator
|
||||
import android.widget.FrameLayout
|
||||
|
@ -2,7 +2,7 @@ package io.neoterm.ui.crash
|
||||
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.widget.TextView
|
||||
import io.neoterm.R
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.neoterm.ui.customize
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
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.MenuItem
|
||||
import io.neoterm.R
|
||||
import io.neoterm.backend.TerminalSession
|
||||
|
@ -1,9 +1,9 @@
|
||||
package io.neoterm.ui.customize
|
||||
|
||||
import android.app.AlertDialog
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
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 android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.KeyEvent
|
||||
@ -59,7 +59,7 @@ class ColorSchemeActivity : BaseCustomizeActivity() {
|
||||
showItemEditor(model)
|
||||
}
|
||||
})
|
||||
val recyclerView = findViewById<RecyclerView>(R.id.custom_color_color_list)
|
||||
val recyclerView = findViewById<androidx.recyclerview.widget.RecyclerView>(R.id.custom_color_color_list)
|
||||
recyclerView.setHasFixedSize(true)
|
||||
recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
recyclerView.adapter = adapter
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.neoterm.ui.customize
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
@ -104,7 +104,7 @@ class CustomizeActivity : BaseCustomizeActivity() {
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
if (resultCode == AppCompatActivity.RESULT_OK && data != null) {
|
||||
val selected = MediaUtils.getPath(this, data.data)
|
||||
if (selected != null && selected.isNotEmpty()) {
|
||||
when (requestCode) {
|
||||
|
@ -2,13 +2,13 @@ package io.neoterm.ui.pm
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.support.v4.view.MenuItemCompat
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.LinearLayoutManager
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.support.v7.widget.SearchView
|
||||
import android.support.v7.widget.Toolbar
|
||||
import androidx.core.view.MenuItemCompat
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.appcompat.widget.SearchView
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import android.view.LayoutInflater
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
@ -39,7 +39,7 @@ class PackageManagerActivity : AppCompatActivity(), SearchView.OnQueryTextListen
|
||||
}
|
||||
.build()
|
||||
|
||||
lateinit var recyclerView: RecyclerView
|
||||
lateinit var recyclerView: androidx.recyclerview.widget.RecyclerView
|
||||
lateinit var adapter: PackageAdapter
|
||||
lateinit var models: ArrayList<PackageModel>
|
||||
|
||||
|
@ -22,12 +22,12 @@ import android.content.res.ColorStateList;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.content.res.AppCompatResources;
|
||||
import android.support.v7.widget.AppCompatTextView;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
|
@ -18,9 +18,9 @@ package io.neoterm.ui.settings
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import android.preference.PreferenceActivity
|
||||
import android.support.annotation.LayoutRes
|
||||
import android.support.v7.app.ActionBar
|
||||
import android.support.v7.app.AppCompatDelegate
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.appcompat.app.ActionBar
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import android.view.MenuInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.neoterm.ui.settings
|
||||
|
||||
import android.app.AlertDialog
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import io.neoterm.R
|
||||
|
@ -1,11 +1,11 @@
|
||||
package io.neoterm.ui.setup
|
||||
|
||||
import android.app.AlertDialog
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.content.ActivityNotFoundException
|
||||
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.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
|
@ -4,8 +4,8 @@ import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.neoterm.ui.support
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.Intent
|
||||
import java.net.URISyntaxException
|
||||
@ -12,11 +12,11 @@ object Donation {
|
||||
"%3Dweb-other&_t=1472443966571#Intent;" +
|
||||
"scheme=alipayqr;package=com.eg.android.AlipayGphone;end"
|
||||
|
||||
fun donateByAlipay(activity: Activity, payCode: String): Boolean {
|
||||
fun donateByAlipay(activity: AppCompatActivity, payCode: String): Boolean {
|
||||
return startIntentUrl(activity, INTENT_URL_FORMAT.replace("{payCode}", payCode))
|
||||
}
|
||||
|
||||
private fun startIntentUrl(activity: Activity, intentFullUrl: String): Boolean {
|
||||
private fun startIntentUrl(activity: AppCompatActivity, intentFullUrl: String): Boolean {
|
||||
return try {
|
||||
val intent = Intent.parseUri(
|
||||
intentFullUrl,
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.neoterm.ui.support
|
||||
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.view.MenuItem
|
||||
import io.neoterm.R
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package io.neoterm.ui.term
|
||||
|
||||
import android.Manifest
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.content.*
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.Configuration
|
||||
@ -10,12 +10,11 @@ import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.IBinder
|
||||
import android.preference.PreferenceManager
|
||||
import android.support.v4.app.ActivityCompat
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.support.v4.view.OnApplyWindowInsetsListener
|
||||
import android.support.v4.view.ViewCompat
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.Toolbar
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.OnApplyWindowInsetsListener
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import android.view.*
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.ImageButton
|
||||
@ -354,8 +353,8 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
||||
when (requestCode) {
|
||||
REQUEST_SETUP -> {
|
||||
when (resultCode) {
|
||||
Activity.RESULT_OK -> enterMain()
|
||||
Activity.RESULT_CANCELED -> {
|
||||
AppCompatActivity.RESULT_OK -> enterMain()
|
||||
AppCompatActivity.RESULT_CANCELED -> {
|
||||
setSystemShellMode(true)
|
||||
forceAddSystemSession()
|
||||
}
|
||||
@ -365,7 +364,7 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration?) {
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
if (newConfig == null) {
|
||||
return
|
||||
|
@ -1,14 +1,13 @@
|
||||
package io.neoterm.ui.term
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.content.ComponentName
|
||||
import android.content.Intent
|
||||
import android.content.ServiceConnection
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.os.IBinder
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.ListView
|
||||
import io.neoterm.App
|
||||
@ -200,7 +199,7 @@ class NeoTermRemoteInterface : AppCompatActivity(), ServiceConnection {
|
||||
|
||||
val data = Intent()
|
||||
data.putExtra(EXTRA_SESSION_ID, session.mHandle)
|
||||
setResult(Activity.RESULT_OK, data)
|
||||
setResult(AppCompatActivity.RESULT_OK, data)
|
||||
|
||||
if (foreground) {
|
||||
// Set current session to our new one
|
||||
|
@ -1,7 +1,7 @@
|
||||
package io.neoterm.ui.term.tab
|
||||
|
||||
import android.content.Context
|
||||
import android.support.v7.widget.Toolbar
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import io.neoterm.component.colorscheme.ColorSchemeComponent
|
||||
import io.neoterm.frontend.component.ComponentManager
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.neoterm.utils
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.graphics.Rect
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
@ -9,7 +9,7 @@ import android.widget.FrameLayout
|
||||
* Helper class to "adjustResize" Activity when we are in full screen mode and check IME status.
|
||||
* Android Bug 5497: https://code.google.com/p/android/issues/detail?id=5497
|
||||
*/
|
||||
class FullScreenHelper private constructor(activity: Activity, var fullScreen: Boolean, private var shouldSkipFirst: Boolean) {
|
||||
class FullScreenHelper private constructor(activity: AppCompatActivity, var fullScreen: Boolean, private var shouldSkipFirst: Boolean) {
|
||||
|
||||
interface KeyBoardListener {
|
||||
/**
|
||||
@ -111,7 +111,7 @@ class FullScreenHelper private constructor(activity: Activity, var fullScreen: B
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun injectActivity(activity: Activity, fullScreen: Boolean, recreate: Boolean): FullScreenHelper {
|
||||
fun injectActivity(activity: AppCompatActivity, fullScreen: Boolean, recreate: Boolean): FullScreenHelper {
|
||||
return FullScreenHelper(activity, fullScreen, recreate)
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.neoterm.utils
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.content.Context
|
||||
import io.neoterm.backend.TerminalSession
|
||||
import io.neoterm.component.font.FontComponent
|
||||
@ -40,7 +40,7 @@ object TerminalUtils {
|
||||
return sessionComponent.createSession(context, parameter)
|
||||
}
|
||||
|
||||
fun createSession(activity: Activity, parameter: XParameter) : XSession {
|
||||
fun createSession(activity: AppCompatActivity, parameter: XParameter) : XSession {
|
||||
val sessionComponent = ComponentManager.getComponent<SessionComponent>()
|
||||
return sessionComponent.createSession(activity, parameter)
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
android:orientation="vertical"
|
||||
tools:ignore="UseCompoundDrawables,ContentDescription">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/about_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
@ -26,7 +26,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
@ -51,7 +51,7 @@
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/about_logo" />
|
||||
app:srcCompat="@mipmap/about_logo" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -67,7 +67,7 @@
|
||||
android:id="@+id/about_version_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -79,7 +79,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_info" />
|
||||
app:srcCompat="@drawable/ic_info" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
@ -109,7 +109,7 @@
|
||||
android:id="@+id/about_developers_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -121,7 +121,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_person" />
|
||||
app:srcCompat="@drawable/ic_person" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
@ -146,7 +146,7 @@
|
||||
android:id="@+id/about_show_help_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -158,7 +158,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_description" />
|
||||
app:srcCompat="@drawable/ic_description" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
@ -183,7 +183,7 @@
|
||||
android:id="@+id/about_licenses_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -195,7 +195,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_description" />
|
||||
app:srcCompat="@drawable/ic_description" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -213,7 +213,7 @@
|
||||
android:id="@+id/about_source_code_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -225,7 +225,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_github" />
|
||||
app:srcCompat="@drawable/ic_github" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
@ -250,7 +250,7 @@
|
||||
android:id="@+id/about_donate_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -262,7 +262,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_donate" />
|
||||
app:srcCompat="@drawable/ic_donate" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
@ -291,9 +291,9 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
@ -318,7 +318,7 @@
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_danger" />
|
||||
app:srcCompat="@mipmap/ic_danger" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -334,7 +334,7 @@
|
||||
android:id="@+id/about_reset_app_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -346,7 +346,7 @@
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_info" />
|
||||
app:srcCompat="@drawable/ic_info" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
@ -374,7 +374,7 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/custom_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:background="@color/terminal_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/crash_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/custom_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
@ -36,7 +36,7 @@
|
||||
android:layout_width="@dimen/custom_install_icon_width"
|
||||
android:layout_height="@dimen/custom_editor_line_height"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/ic_install_white_36" />
|
||||
app:srcCompat="@drawable/ic_install_white_36" />
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
@ -69,7 +69,7 @@
|
||||
android:layout_width="@dimen/custom_install_icon_width"
|
||||
android:layout_height="@dimen/custom_editor_line_height"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/ic_install_white_36" />
|
||||
app:srcCompat="@drawable/ic_install_white_36" />
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
|
@ -7,7 +7,7 @@
|
||||
android:orientation="vertical"
|
||||
tools:ignore="UseCompoundDrawables,ContentDescription">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/faq_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
@ -26,7 +26,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
<androidx.appcompat.widget.CardView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
@ -43,7 +43,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -73,7 +73,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
@ -102,7 +102,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</androidx.appcompat.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:background="@color/terminal_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/terminal_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -12,7 +12,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/pm_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
@ -27,7 +27,7 @@
|
||||
android:background="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pm_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:background="@color/terminal_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/pm_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@drawable/ic_search"
|
||||
android:title="@android:string/search_go"
|
||||
app:actionViewClass="android.support.v7.widget.SearchView"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||
app:showAsAction="ifRoom|collapseActionView" />
|
||||
|
||||
<item
|
||||
|
10
build.gradle
10
build.gradle
@ -23,15 +23,13 @@ buildscript {
|
||||
|
||||
ext.kotlin_version = '1.3.50'
|
||||
ext.android = [
|
||||
ANDROID_SUPPORT_VERSION: '27.0.2',
|
||||
|
||||
KOTLIN_VERSION : '1.3.50',
|
||||
|
||||
MIN_SDK_VERSION : 21,
|
||||
|
||||
COMPILE_SDK_VERSION : 27,
|
||||
COMPILE_SDK_VERSION : 28,
|
||||
|
||||
TARGET_SDK_VERSION : 27,
|
||||
TARGET_SDK_VERSION : 28,
|
||||
|
||||
BUILD_TOOL_VERSION : '28.0.3',
|
||||
|
||||
@ -39,8 +37,8 @@ buildscript {
|
||||
]
|
||||
|
||||
ext.deps = [
|
||||
"annotations" : "com.android.support:support-annotations:${ext.android.ANDROID_SUPPORT_VERSION}",
|
||||
"appcompat-v7" : "com.android.support:appcompat-v7:${ext.android.ANDROID_SUPPORT_VERSION}",
|
||||
"annotations" : "androidx.annotation:annotation:1.0.0",
|
||||
"appcompat-v7" : "androidx.appcompat:appcompat:1.0.0",
|
||||
"design" : "com.android.support:design:${ext.android.ANDROID_SUPPORT_VERSION}",
|
||||
"cardview-v7" : "com.android.support:cardview-v7:${ext.android.ANDROID_SUPPORT_VERSION}",
|
||||
"kotlin-stdlib" : "org.jetbrains.kotlin:kotlin-stdlib:${ext.android.KOTLIN_VERSION}",
|
||||
|
@ -24,6 +24,8 @@ android {
|
||||
dependencies {
|
||||
api 'com.github.michael-rapp:android-util:1.15.0'
|
||||
implementation rootProject.ext.deps["annotations"]
|
||||
implementation rootProject.ext.deps["appcompat-v7"]
|
||||
testImplementation rootProject.ext.deps["junit"]
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat-resources:1.2.0'
|
||||
}
|
||||
|
@ -13,8 +13,8 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import static de.mrapp.android.util.Condition.ensureAtLeast;
|
||||
|
@ -13,8 +13,8 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
/**
|
||||
|
@ -13,8 +13,8 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
/**
|
||||
|
@ -13,8 +13,8 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import static de.mrapp.android.util.Condition.ensureNotNull;
|
||||
|
@ -21,13 +21,13 @@ import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
/**
|
||||
* Defines the interface, a class, which should be notified, when a tab is about to be closed by
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
/**
|
||||
* Defines the interface, a class, which should be notified, when the preview of a tab is about to
|
||||
|
@ -23,19 +23,19 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.AttrRes;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.MenuRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.annotation.StyleRes;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.util.Pair;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
||||
import androidx.annotation.AttrRes;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.MenuRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.annotation.StyleRes;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.util.Pair;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Menu;
|
||||
|
@ -16,8 +16,8 @@ package de.mrapp.android.tabswitcher;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.SparseArray;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -13,8 +13,8 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Defines the interface, a class, which should be notified about a tab switcher's events, must
|
||||
|
@ -24,9 +24,9 @@ import android.graphics.PixelFormat;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import de.mrapp.android.tabswitcher.Animation;
|
||||
import de.mrapp.android.tabswitcher.R;
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher.iterator;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import de.mrapp.android.tabswitcher.model.TabItem;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher.iterator;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import de.mrapp.android.tabswitcher.Tab;
|
||||
import de.mrapp.android.tabswitcher.model.TabItem;
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher.iterator;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import de.mrapp.android.tabswitcher.TabSwitcher;
|
||||
import de.mrapp.android.tabswitcher.model.Model;
|
||||
|
@ -14,8 +14,8 @@
|
||||
package de.mrapp.android.tabswitcher.layout;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.VelocityTracker;
|
||||
import android.view.ViewConfiguration;
|
||||
|
@ -18,13 +18,13 @@ import android.animation.Animator.AnimatorListener;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.CallSuper;
|
||||
import android.support.annotation.MenuRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.util.Pair;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.MenuRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.util.Pair;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||
import android.view.Menu;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
package de.mrapp.android.tabswitcher.layout;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewPropertyAnimator;
|
||||
|
@ -15,8 +15,8 @@ package de.mrapp.android.tabswitcher.layout;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.SparseArray;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -13,8 +13,8 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher.layout;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.Menu;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
package de.mrapp.android.tabswitcher.layout.phone;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
@ -14,9 +14,9 @@
|
||||
package de.mrapp.android.tabswitcher.layout.phone;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
|
||||
|
@ -20,12 +20,12 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.MenuRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.util.Pair;
|
||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
||||
import androidx.annotation.MenuRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.util.Pair;
|
||||
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
@ -20,11 +20,11 @@ import android.animation.ValueAnimator;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.util.Pair;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.util.Pair;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
|
@ -15,10 +15,10 @@ package de.mrapp.android.tabswitcher.layout.phone;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.util.LruCache;
|
||||
import android.support.v4.util.Pair;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.collection.LruCache;
|
||||
import androidx.core.util.Pair;
|
||||
import android.view.View;
|
||||
import android.view.View.MeasureSpec;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -17,13 +17,13 @@ import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.MenuRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.MenuRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||
import android.view.View.OnClickListener;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -14,8 +14,8 @@
|
||||
package de.mrapp.android.tabswitcher.model;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Defines the interface, a class, whose state should be stored and restored, must implement.
|
||||
|
@ -13,8 +13,8 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher.model;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.View;
|
||||
|
||||
import de.mrapp.android.tabswitcher.R;
|
||||
|
@ -20,14 +20,14 @@ import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.MenuRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.MenuRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
package de.mrapp.android.tabswitcher.model;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import de.mrapp.android.tabswitcher.TabSwitcher;
|
||||
|
||||
|
@ -14,12 +14,11 @@
|
||||
package de.mrapp.android.tabswitcher.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.AttrRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.AppCompatImageButton;
|
||||
import androidx.annotation.AttrRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatImageButton;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import de.mrapp.android.tabswitcher.Animation;
|
||||
import de.mrapp.android.tabswitcher.R;
|
||||
|
@ -15,6 +15,7 @@ License.
|
||||
-->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
@ -32,7 +33,7 @@ License.
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/phone_close_tab_icon"/>
|
||||
app:srcCompat="@drawable/phone_close_tab_icon"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_title_text_view"
|
||||
|
@ -15,6 +15,7 @@ License.
|
||||
-->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
@ -42,7 +43,7 @@ License.
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/phone_close_tab_icon"/>
|
||||
app:srcCompat="@drawable/phone_close_tab_icon"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -13,7 +13,7 @@ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, e
|
||||
implied. See the License for the specific language governing permissions and limitations under the
|
||||
License.
|
||||
-->
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/primary_toolbar"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
@ -19,7 +19,7 @@ License.
|
||||
<item name="android:drawablePadding">@dimen/tab_title_drawable_padding</item>
|
||||
<item name="android:ellipsize">marquee</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:fontFamily">sans-serif-medium</item>
|
||||
<item name="fontFamily">sans-serif-medium</item>
|
||||
<item name="android:textColor">@color/tab_title_text_color</item>
|
||||
</style>
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
|
Loading…
Reference in New Issue
Block a user