Merge pull request #59 from PWN-Hunter/master
OPTIONAL: Add support for Android studio 4.1.3 and included some fixes
This commit is contained in:
commit
5ccae87292
@ -13,7 +13,7 @@ android {
|
|||||||
versionCode libraryVersionCode
|
versionCode libraryVersionCode
|
||||||
versionName libraryVersionName
|
versionName libraryVersionName
|
||||||
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,7 +27,8 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
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'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
testImplementation rootProject.ext.deps["junit"]
|
testImplementation rootProject.ext.deps["junit"]
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.neoterm.bridge;
|
package io.neoterm.bridge;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.test.InstrumentationRegistry;
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
import android.support.test.runner.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
@ -12,7 +12,7 @@ android {
|
|||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
|
||||||
implementation project(':NeoTermBridge')
|
implementation project(':NeoTermBridge')
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.neoterm.bridge.example;
|
package io.neoterm.bridge.example;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.test.InstrumentationRegistry;
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
import android.support.test.runner.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">
|
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ android {
|
|||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
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"]
|
implementation rootProject.ext.deps["appcompat-v7"]
|
||||||
testImplementation rootProject.ext.deps["junit"]
|
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'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.neoterm;
|
package io.neoterm;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.test.InstrumentationRegistry;
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
import android.support.test.runner.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
@ -22,21 +22,14 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
package io.neoterm;
|
package io.neoterm;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
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.Sensor;
|
||||||
import android.hardware.SensorEvent;
|
import android.hardware.SensorEvent;
|
||||||
|
import android.hardware.SensorEventListener;
|
||||||
|
import android.hardware.SensorManager;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.TextView;
|
|
||||||
import android.os.Build;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
|
||||||
@ -294,12 +287,12 @@ class AccelerometerReader implements SensorEventListener
|
|||||||
public void onAccuracyChanged(Sensor s, int a)
|
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);
|
SensorManager manager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||||
return ( manager != null && manager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null );
|
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);
|
SensorManager manager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||||
if ( manager == null && manager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) == null )
|
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),
|
Globals.AppUsesOrientationSensor ? Sensor.TYPE_GAME_ROTATION_VECTOR : Sensor.TYPE_GYROSCOPE),
|
||||||
SensorManager.SENSOR_DELAY_GAME);
|
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);
|
SensorManager manager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||||
if ( manager == null )
|
if ( manager == null )
|
||||||
|
@ -24,7 +24,6 @@ package io.neoterm;
|
|||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.KeyguardManager;
|
import android.app.KeyguardManager;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.app.UiModeManager;
|
import android.app.UiModeManager;
|
||||||
@ -40,6 +39,7 @@ import android.inputmethodservice.Keyboard;
|
|||||||
import android.inputmethodservice.KeyboardView;
|
import android.inputmethodservice.KeyboardView;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.SpannedString;
|
import android.text.SpannedString;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
@ -72,7 +72,7 @@ import io.neoterm.xorg.NeoXorgViewClient;
|
|||||||
import io.neoterm.xorg.R;
|
import io.neoterm.xorg.R;
|
||||||
|
|
||||||
|
|
||||||
public class MainActivity extends Activity implements NeoXorgViewClient {
|
public class MainActivity extends AppCompatActivity implements NeoXorgViewClient {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -22,57 +22,10 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
package io.neoterm;
|
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.content.DialogInterface;
|
||||||
import android.os.Environment;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import android.os.StatFs;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.ArrayList;
|
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;
|
import io.neoterm.xorg.R;
|
||||||
|
|
||||||
|
@ -22,57 +22,21 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
package io.neoterm;
|
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.content.DialogInterface;
|
||||||
import android.os.Environment;
|
import android.graphics.Bitmap;
|
||||||
import android.os.StatFs;
|
import android.graphics.BitmapFactory;
|
||||||
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.Matrix;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
import android.view.ViewGroup;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
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.util.DisplayMetrics;
|
||||||
import android.net.Uri;
|
import android.view.KeyEvent;
|
||||||
import java.util.concurrent.Semaphore;
|
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 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;
|
import io.neoterm.xorg.R;
|
||||||
|
|
||||||
|
@ -22,60 +22,24 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
package io.neoterm;
|
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.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.content.Intent;
|
||||||
import android.app.PendingIntent;
|
|
||||||
import android.app.AlarmManager;
|
|
||||||
import android.util.DisplayMetrics;
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import java.util.concurrent.Semaphore;
|
import android.os.StatFs;
|
||||||
import java.util.Arrays;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.hardware.SensorEventListener;
|
|
||||||
import android.hardware.SensorEvent;
|
|
||||||
import android.hardware.Sensor;
|
|
||||||
import android.widget.Toast;
|
|
||||||
import android.text.InputType;
|
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;
|
import io.neoterm.xorg.R;
|
||||||
|
|
||||||
|
@ -22,57 +22,20 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
package io.neoterm;
|
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.content.DialogInterface;
|
||||||
import android.os.Environment;
|
import android.graphics.Bitmap;
|
||||||
import android.os.StatFs;
|
import android.graphics.BitmapFactory;
|
||||||
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.Matrix;
|
||||||
import android.graphics.RectF;
|
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.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import java.util.ArrayList;
|
||||||
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;
|
import io.neoterm.xorg.R;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
apply plugin: 'kotlin-android-extensions'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.android.COMPILE_SDK_VERSION
|
compileSdkVersion rootProject.ext.android.COMPILE_SDK_VERSION
|
||||||
@ -11,7 +12,7 @@ android {
|
|||||||
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
|
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
|
||||||
versionCode 37
|
versionCode 37
|
||||||
versionName "2.1.0"
|
versionName "2.1.0"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
resConfigs "zh-rCN", "zh-rTW"
|
resConfigs "zh-rCN", "zh-rTW"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
@ -55,16 +56,10 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
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"]
|
testImplementation rootProject.ext.deps["junit"]
|
||||||
androidTestImplementation project(path: ':NeoLang')
|
androidTestImplementation project(path: ':NeoLang')
|
||||||
|
|
||||||
implementation rootProject.ext.deps["kotlin-stdlib"]
|
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 'org.greenrobot:eventbus:3.0.0'
|
||||||
implementation 'com.github.wrdlbrnft:modular-adapter:0.2.0.6'
|
implementation 'com.github.wrdlbrnft:modular-adapter:0.2.0.6'
|
||||||
@ -72,6 +67,10 @@ dependencies {
|
|||||||
implementation 'com.simplecityapps:recyclerview-fastscroll:1.0.16'
|
implementation 'com.simplecityapps:recyclerview-fastscroll:1.0.16'
|
||||||
implementation 'de.psdev.licensesdialog:licensesdialog:1.8.3'
|
implementation 'de.psdev.licensesdialog:licensesdialog:1.8.3'
|
||||||
implementation 'com.github.GrenderG:Color-O-Matic:1.1.5'
|
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(':chrome-tabs')
|
||||||
implementation project(':NeoLang')
|
implementation project(':NeoLang')
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
android:fullBackupContent="@xml/backup_config"
|
android:fullBackupContent="@xml/backup_config"
|
||||||
android:icon="@mipmap/ic_launcher_neoterm_round"
|
android:icon="@mipmap/ic_launcher_neoterm_round"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
android:usesCleartextTraffic="true"
|
||||||
android:resizeableActivity="true"
|
android:resizeableActivity="true"
|
||||||
android:roundIcon="@mipmap/ic_launcher_neoterm_round"
|
android:roundIcon="@mipmap/ic_launcher_neoterm_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.neoterm
|
package io.neoterm
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.neoterm.component.session
|
package io.neoterm.component.session
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import io.neoterm.Globals
|
import io.neoterm.Globals
|
||||||
import io.neoterm.frontend.component.NeoComponent
|
import io.neoterm.frontend.component.NeoComponent
|
||||||
@ -85,7 +85,7 @@ class SessionComponent : NeoComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun createSession(context: Context, parameter: XParameter): XSession {
|
fun createSession(context: Context, parameter: XParameter): XSession {
|
||||||
if (context is Activity) {
|
if (context is AppCompatActivity) {
|
||||||
if (!checkLibrariesLoaded()) {
|
if (!checkLibrariesLoaded()) {
|
||||||
throw RuntimeException("Cannot load libraries!")
|
throw RuntimeException("Cannot load libraries!")
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
package io.neoterm.frontend.config
|
package io.neoterm.frontend.config
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.content.ActivityNotFoundException
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.support.v4.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import android.support.v4.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
||||||
@ -16,7 +16,7 @@ import android.support.v4.content.ContextCompat
|
|||||||
object NeoPermission {
|
object NeoPermission {
|
||||||
const val REQUEST_APP_PERMISSION = 10086
|
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) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ object NeoPermission {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun doRequestPermission(context: Activity, requestCode: Int) {
|
private fun doRequestPermission(context: AppCompatActivity, requestCode: Int) {
|
||||||
try {
|
try {
|
||||||
ActivityCompat.requestPermissions(context,
|
ActivityCompat.requestPermissions(context,
|
||||||
arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE),
|
arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE),
|
||||||
|
@ -25,7 +25,7 @@ object NeoTermPath {
|
|||||||
const val SOURCE_FILE = "$USR_PATH/etc/apt/sources.list"
|
const val SOURCE_FILE = "$USR_PATH/etc/apt/sources.list"
|
||||||
const val PACKAGE_LIST_DIR = "$USR_PATH/var/lib/apt/lists"
|
const val PACKAGE_LIST_DIR = "$USR_PATH/var/lib/apt/lists"
|
||||||
|
|
||||||
private const val SOURCE = "http://120.79.193.152"
|
private const val SOURCE = "http://120.79.193.152/neoterm"
|
||||||
|
|
||||||
val DEFAULT_MAIN_PACKAGE_SOURCE: String
|
val DEFAULT_MAIN_PACKAGE_SOURCE: String
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.neoterm.frontend.floating
|
package io.neoterm.frontend.floating
|
||||||
|
|
||||||
import android.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import io.neoterm.R
|
import io.neoterm.R
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.neoterm.frontend.logging
|
package io.neoterm.frontend.logging
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.support.annotation.IntDef
|
import androidx.annotation.IntDef
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import java.io.*
|
import java.io.*
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
@ -21,7 +21,7 @@ object NLog {
|
|||||||
const val E = Log.ERROR
|
const val E = Log.ERROR
|
||||||
const val A = Log.ASSERT
|
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)
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
private annotation class TYPE
|
private annotation class TYPE
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.neoterm.frontend.session.xorg
|
package io.neoterm.frontend.session.xorg
|
||||||
|
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.app.UiModeManager
|
import android.app.UiModeManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.pm.ActivityInfo
|
import android.content.pm.ActivityInfo
|
||||||
@ -24,7 +24,7 @@ import java.util.*
|
|||||||
* @author kiva
|
* @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 = "";
|
var mSessionName = "";
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -3,6 +3,7 @@ package io.neoterm.frontend.terminal.extrakey.button
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
|
import androidx.appcompat.widget.AppCompatButton
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -18,7 +19,7 @@ open class RepeatableButton(buttonText: String) : ControlButton(buttonText) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class RepeatableButtonWidget(context: Context?, attrs: AttributeSet?, defStyleAttr: Int)
|
private class RepeatableButtonWidget(context: Context?, attrs: AttributeSet?, defStyleAttr: Int)
|
||||||
: Button(context, attrs, defStyleAttr) {
|
: AppCompatButton(context!!, attrs, defStyleAttr) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Milliseconds how long we trigger an action
|
* Milliseconds how long we trigger an action
|
||||||
|
@ -9,7 +9,8 @@ import android.os.Binder
|
|||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.os.PowerManager
|
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.R
|
||||||
import io.neoterm.backend.EmulatorDebug
|
import io.neoterm.backend.EmulatorDebug
|
||||||
import io.neoterm.backend.TerminalSession
|
import io.neoterm.backend.TerminalSession
|
||||||
@ -92,7 +93,7 @@ class NeoTermService : Service() {
|
|||||||
return indexOfRemoved
|
return indexOfRemoved
|
||||||
}
|
}
|
||||||
|
|
||||||
fun createXSession(activity: Activity, parameter: XParameter): XSession {
|
fun createXSession(activity: AppCompatActivity, parameter: XParameter): XSession {
|
||||||
val session = TerminalUtils.createSession(activity, parameter)
|
val session = TerminalUtils.createSession(activity, parameter)
|
||||||
mXSessions.add(session)
|
mXSessions.add(session)
|
||||||
updateNotification()
|
updateNotification()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.neoterm.setup
|
package io.neoterm.setup
|
||||||
|
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.app.ProgressDialog
|
import android.app.ProgressDialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
@ -20,7 +20,7 @@ object SetupHelper {
|
|||||||
return !PREFIX_FILE.isDirectory
|
return !PREFIX_FILE.isDirectory
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setup(activity: Activity, connection: SourceConnection,
|
fun setup(activity: AppCompatActivity, connection: SourceConnection,
|
||||||
resultListener: ResultListener) {
|
resultListener: ResultListener) {
|
||||||
if (!needSetup()) {
|
if (!needSetup()) {
|
||||||
resultListener.onResult(null)
|
resultListener.onResult(null)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.neoterm.setup;
|
package io.neoterm.setup;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.system.Os;
|
import android.system.Os;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
|
|
||||||
@ -26,11 +26,11 @@ import io.neoterm.frontend.logging.NLog;
|
|||||||
final class SetupThread extends Thread {
|
final class SetupThread extends Thread {
|
||||||
private final SourceConnection sourceConnection;
|
private final SourceConnection sourceConnection;
|
||||||
private final File prefixPath;
|
private final File prefixPath;
|
||||||
private final Activity activity;
|
private final AppCompatActivity activity;
|
||||||
private final ResultListener resultListener;
|
private final ResultListener resultListener;
|
||||||
private final ProgressDialog progressDialog;
|
private final ProgressDialog progressDialog;
|
||||||
|
|
||||||
public SetupThread(Activity activity, SourceConnection sourceConnection,
|
public SetupThread(AppCompatActivity activity, SourceConnection sourceConnection,
|
||||||
File prefixPath, ResultListener resultListener,
|
File prefixPath, ResultListener resultListener,
|
||||||
ProgressDialog progressDialog) {
|
ProgressDialog progressDialog) {
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
|
@ -12,7 +12,7 @@ import android.graphics.drawable.RippleDrawable
|
|||||||
import android.graphics.drawable.ShapeDrawable
|
import android.graphics.drawable.ShapeDrawable
|
||||||
import android.graphics.drawable.shapes.OvalShape
|
import android.graphics.drawable.shapes.OvalShape
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.animation.PathInterpolator
|
import android.view.animation.PathInterpolator
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
|
@ -2,7 +2,7 @@ package io.neoterm.ui.crash
|
|||||||
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import io.neoterm.R
|
import io.neoterm.R
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.neoterm.ui.customize
|
package io.neoterm.ui.customize
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.support.v7.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import io.neoterm.R
|
import io.neoterm.R
|
||||||
import io.neoterm.backend.TerminalSession
|
import io.neoterm.backend.TerminalSession
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package io.neoterm.ui.customize
|
package io.neoterm.ui.customize
|
||||||
|
|
||||||
import android.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import android.support.v7.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import android.text.Editable
|
import android.text.Editable
|
||||||
import android.text.TextWatcher
|
import android.text.TextWatcher
|
||||||
import android.view.KeyEvent
|
import android.view.KeyEvent
|
||||||
@ -59,7 +59,7 @@ class ColorSchemeActivity : BaseCustomizeActivity() {
|
|||||||
showItemEditor(model)
|
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.setHasFixedSize(true)
|
||||||
recyclerView.layoutManager = LinearLayoutManager(this)
|
recyclerView.layoutManager = LinearLayoutManager(this)
|
||||||
recyclerView.adapter = adapter
|
recyclerView.adapter = adapter
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.neoterm.ui.customize
|
package io.neoterm.ui.customize
|
||||||
|
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
@ -104,7 +104,7 @@ class CustomizeActivity : BaseCustomizeActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
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)
|
val selected = MediaUtils.getPath(this, data.data)
|
||||||
if (selected != null && selected.isNotEmpty()) {
|
if (selected != null && selected.isNotEmpty()) {
|
||||||
when (requestCode) {
|
when (requestCode) {
|
||||||
|
@ -2,13 +2,13 @@ package io.neoterm.ui.pm
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v4.view.MenuItemCompat
|
import androidx.core.view.MenuItemCompat
|
||||||
import android.support.v7.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.support.v7.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import android.support.v7.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import android.support.v7.widget.SearchView
|
import androidx.appcompat.widget.SearchView
|
||||||
import android.support.v7.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
@ -39,7 +39,7 @@ class PackageManagerActivity : AppCompatActivity(), SearchView.OnQueryTextListen
|
|||||||
}
|
}
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
lateinit var recyclerView: RecyclerView
|
lateinit var recyclerView: androidx.recyclerview.widget.RecyclerView
|
||||||
lateinit var adapter: PackageAdapter
|
lateinit var adapter: PackageAdapter
|
||||||
lateinit var models: ArrayList<PackageModel>
|
lateinit var models: ArrayList<PackageModel>
|
||||||
|
|
||||||
|
@ -22,12 +22,12 @@ import android.content.res.ColorStateList;
|
|||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.support.v4.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import android.support.v4.view.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
import android.support.v7.content.res.AppCompatResources;
|
import androidx.appcompat.content.res.AppCompatResources;
|
||||||
import android.support.v7.widget.AppCompatTextView;
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
|
@ -18,9 +18,9 @@ package io.neoterm.ui.settings
|
|||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.preference.PreferenceActivity
|
import android.preference.PreferenceActivity
|
||||||
import android.support.annotation.LayoutRes
|
import androidx.annotation.LayoutRes
|
||||||
import android.support.v7.app.ActionBar
|
import androidx.appcompat.app.ActionBar
|
||||||
import android.support.v7.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import android.view.MenuInflater
|
import android.view.MenuInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.neoterm.ui.settings
|
package io.neoterm.ui.settings
|
||||||
|
|
||||||
import android.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import io.neoterm.R
|
import io.neoterm.R
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package io.neoterm.ui.setup
|
package io.neoterm.ui.setup
|
||||||
|
|
||||||
import android.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.content.ActivityNotFoundException
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
|
@ -4,8 +4,8 @@ import android.content.Intent
|
|||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.neoterm.ui.support
|
package io.neoterm.ui.support
|
||||||
|
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.content.ActivityNotFoundException
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import java.net.URISyntaxException
|
import java.net.URISyntaxException
|
||||||
@ -12,11 +12,11 @@ object Donation {
|
|||||||
"%3Dweb-other&_t=1472443966571#Intent;" +
|
"%3Dweb-other&_t=1472443966571#Intent;" +
|
||||||
"scheme=alipayqr;package=com.eg.android.AlipayGphone;end"
|
"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))
|
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 {
|
return try {
|
||||||
val intent = Intent.parseUri(
|
val intent = Intent.parseUri(
|
||||||
intentFullUrl,
|
intentFullUrl,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.neoterm.ui.support
|
package io.neoterm.ui.support
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import io.neoterm.R
|
import io.neoterm.R
|
||||||
|
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
package io.neoterm.ui.term
|
package io.neoterm.ui.term
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.os.Handler
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.preference.PreferenceManager
|
import android.preference.PreferenceManager
|
||||||
import android.support.v4.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import android.support.v4.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import android.support.v4.view.OnApplyWindowInsetsListener
|
import androidx.core.view.OnApplyWindowInsetsListener
|
||||||
import android.support.v4.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.widget.Toolbar
|
||||||
import android.support.v7.widget.Toolbar
|
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.ImageButton
|
import android.widget.ImageButton
|
||||||
@ -353,8 +353,8 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
|||||||
when (requestCode) {
|
when (requestCode) {
|
||||||
REQUEST_SETUP -> {
|
REQUEST_SETUP -> {
|
||||||
when (resultCode) {
|
when (resultCode) {
|
||||||
Activity.RESULT_OK -> enterMain()
|
AppCompatActivity.RESULT_OK -> enterMain()
|
||||||
Activity.RESULT_CANCELED -> {
|
AppCompatActivity.RESULT_CANCELED -> {
|
||||||
setSystemShellMode(true)
|
setSystemShellMode(true)
|
||||||
forceAddSystemSession()
|
forceAddSystemSession()
|
||||||
}
|
}
|
||||||
@ -364,7 +364,7 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
|||||||
super.onActivityResult(requestCode, resultCode, data)
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onConfigurationChanged(newConfig: Configuration?) {
|
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||||
super.onConfigurationChanged(newConfig)
|
super.onConfigurationChanged(newConfig)
|
||||||
if (newConfig == null) {
|
if (newConfig == null) {
|
||||||
return
|
return
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
package io.neoterm.ui.term
|
package io.neoterm.ui.term
|
||||||
|
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.content.ComponentName
|
import android.content.ComponentName
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.ServiceConnection
|
import android.content.ServiceConnection
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.support.v7.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.support.v7.app.AppCompatActivity
|
|
||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
import android.widget.ListView
|
import android.widget.ListView
|
||||||
import io.neoterm.App
|
import io.neoterm.App
|
||||||
@ -200,7 +199,7 @@ class NeoTermRemoteInterface : AppCompatActivity(), ServiceConnection {
|
|||||||
|
|
||||||
val data = Intent()
|
val data = Intent()
|
||||||
data.putExtra(EXTRA_SESSION_ID, session.mHandle)
|
data.putExtra(EXTRA_SESSION_ID, session.mHandle)
|
||||||
setResult(Activity.RESULT_OK, data)
|
setResult(AppCompatActivity.RESULT_OK, data)
|
||||||
|
|
||||||
if (foreground) {
|
if (foreground) {
|
||||||
// Set current session to our new one
|
// Set current session to our new one
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.neoterm.ui.term.tab
|
package io.neoterm.ui.term.tab
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.support.v7.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import io.neoterm.component.colorscheme.ColorSchemeComponent
|
import io.neoterm.component.colorscheme.ColorSchemeComponent
|
||||||
import io.neoterm.frontend.component.ComponentManager
|
import io.neoterm.frontend.component.ComponentManager
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.neoterm.utils
|
package io.neoterm.utils
|
||||||
|
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.FrameLayout
|
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.
|
* 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
|
* 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 {
|
interface KeyBoardListener {
|
||||||
/**
|
/**
|
||||||
@ -111,7 +111,7 @@ class FullScreenHelper private constructor(activity: Activity, var fullScreen: B
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
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)
|
return FullScreenHelper(activity, fullScreen, recreate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.neoterm.utils
|
package io.neoterm.utils
|
||||||
|
|
||||||
import android.app.Activity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import io.neoterm.backend.TerminalSession
|
import io.neoterm.backend.TerminalSession
|
||||||
import io.neoterm.component.font.FontComponent
|
import io.neoterm.component.font.FontComponent
|
||||||
@ -40,7 +40,7 @@ object TerminalUtils {
|
|||||||
return sessionComponent.createSession(context, parameter)
|
return sessionComponent.createSession(context, parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun createSession(activity: Activity, parameter: XParameter) : XSession {
|
fun createSession(activity: AppCompatActivity, parameter: XParameter) : XSession {
|
||||||
val sessionComponent = ComponentManager.getComponent<SessionComponent>()
|
val sessionComponent = ComponentManager.getComponent<SessionComponent>()
|
||||||
return sessionComponent.createSession(activity, parameter)
|
return sessionComponent.createSession(activity, parameter)
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:ignore="UseCompoundDrawables,ContentDescription">
|
tools:ignore="UseCompoundDrawables,ContentDescription">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/about_toolbar"
|
android:id="@+id/about_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
@ -26,7 +26,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
@ -51,7 +51,7 @@
|
|||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@mipmap/about_logo" />
|
app:srcCompat="@mipmap/about_logo" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -67,7 +67,7 @@
|
|||||||
android:id="@+id/about_version_view"
|
android:id="@+id/about_version_view"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -79,7 +79,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_info" />
|
app:srcCompat="@drawable/ic_info" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@ -109,7 +109,7 @@
|
|||||||
android:id="@+id/about_developers_view"
|
android:id="@+id/about_developers_view"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -121,7 +121,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_person" />
|
app:srcCompat="@drawable/ic_person" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@ -146,7 +146,7 @@
|
|||||||
android:id="@+id/about_show_help_view"
|
android:id="@+id/about_show_help_view"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -158,7 +158,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_description" />
|
app:srcCompat="@drawable/ic_description" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@ -183,7 +183,7 @@
|
|||||||
android:id="@+id/about_licenses_view"
|
android:id="@+id/about_licenses_view"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -195,7 +195,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_description" />
|
app:srcCompat="@drawable/ic_description" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -213,7 +213,7 @@
|
|||||||
android:id="@+id/about_source_code_view"
|
android:id="@+id/about_source_code_view"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -225,7 +225,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_github" />
|
app:srcCompat="@drawable/ic_github" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@ -250,7 +250,7 @@
|
|||||||
android:id="@+id/about_donate_view"
|
android:id="@+id/about_donate_view"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -262,7 +262,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_donate" />
|
app:srcCompat="@drawable/ic_donate" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@ -291,9 +291,9 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</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_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
@ -318,7 +318,7 @@
|
|||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@mipmap/ic_danger" />
|
app:srcCompat="@mipmap/ic_danger" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -334,7 +334,7 @@
|
|||||||
android:id="@+id/about_reset_app_view"
|
android:id="@+id/about_reset_app_view"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -346,7 +346,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_info" />
|
app:srcCompat="@drawable/ic_info" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@ -374,7 +374,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.v7.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/custom_toolbar"
|
android:id="@+id/custom_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
android:background="@color/terminal_background"
|
android:background="@color/terminal_background"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/crash_toolbar"
|
android:id="@+id/crash_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/custom_toolbar"
|
android:id="@+id/custom_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
@ -36,7 +36,7 @@
|
|||||||
android:layout_width="@dimen/custom_install_icon_width"
|
android:layout_width="@dimen/custom_install_icon_width"
|
||||||
android:layout_height="@dimen/custom_editor_line_height"
|
android:layout_height="@dimen/custom_editor_line_height"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:src="@drawable/ic_install_white_36" />
|
app:srcCompat="@drawable/ic_install_white_36" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@ -69,7 +69,7 @@
|
|||||||
android:layout_width="@dimen/custom_install_icon_width"
|
android:layout_width="@dimen/custom_install_icon_width"
|
||||||
android:layout_height="@dimen/custom_editor_line_height"
|
android:layout_height="@dimen/custom_editor_line_height"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:src="@drawable/ic_install_white_36" />
|
app:srcCompat="@drawable/ic_install_white_36" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:ignore="UseCompoundDrawables,ContentDescription">
|
tools:ignore="UseCompoundDrawables,ContentDescription">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/faq_toolbar"
|
android:id="@+id/faq_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
@ -26,7 +26,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.CardView
|
<androidx.appcompat.widget.CardView
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -73,7 +73,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.v7.widget.CardView>
|
</androidx.appcompat.widget.CardView>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
android:background="@color/terminal_background"
|
android:background="@color/terminal_background"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/terminal_toolbar"
|
android:id="@+id/terminal_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/pm_toolbar"
|
android:id="@+id/pm_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
@ -27,7 +27,7 @@
|
|||||||
android:background="@color/colorPrimary" />
|
android:background="@color/colorPrimary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<android.support.v4.view.ViewPager
|
<androidx.viewpager.widget.ViewPager
|
||||||
android:id="@+id/pm_view_pager"
|
android:id="@+id/pm_view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
android:background="@color/terminal_background"
|
android:background="@color/terminal_background"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/pm_toolbar"
|
android:id="@+id/pm_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
android:id="@+id/action_search"
|
android:id="@+id/action_search"
|
||||||
android:icon="@drawable/ic_search"
|
android:icon="@drawable/ic_search"
|
||||||
android:title="@android:string/search_go"
|
android:title="@android:string/search_go"
|
||||||
app:actionViewClass="android.support.v7.widget.SearchView"
|
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||||
app:showAsAction="ifRoom|collapseActionView" />
|
app:showAsAction="ifRoom|collapseActionView" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
|
@ -168,7 +168,7 @@
|
|||||||
<string name="dangerous_zone">Dangerous Zone</string>
|
<string name="dangerous_zone">Dangerous Zone</string>
|
||||||
<string name="reset_app_warning">You will have to re-setup later, confirm?</string>
|
<string name="reset_app_warning">You will have to re-setup later, confirm?</string>
|
||||||
|
|
||||||
<string name="default_source_url" translatable="false">http://120.79.193.152</string>
|
<string name="default_source_url" translatable="false">http://120.79.193.152/neoterm</string>
|
||||||
|
|
||||||
<string-array name="pref_general_shell_entries" translatable="false">
|
<string-array name="pref_general_shell_entries" translatable="false">
|
||||||
<item>sh</item>
|
<item>sh</item>
|
||||||
|
19
build.gradle
19
build.gradle
@ -21,16 +21,15 @@ buildscript {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.kotlin_version = '1.3.50'
|
||||||
ext.android = [
|
ext.android = [
|
||||||
ANDROID_SUPPORT_VERSION: '27.0.2',
|
KOTLIN_VERSION : '1.3.50',
|
||||||
|
|
||||||
KOTLIN_VERSION : '1.2.51',
|
|
||||||
|
|
||||||
MIN_SDK_VERSION : 21,
|
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',
|
BUILD_TOOL_VERSION : '28.0.3',
|
||||||
|
|
||||||
@ -38,11 +37,11 @@ buildscript {
|
|||||||
]
|
]
|
||||||
|
|
||||||
ext.deps = [
|
ext.deps = [
|
||||||
"annotations" : "com.android.support:support-annotations:${ext.android.ANDROID_SUPPORT_VERSION}",
|
"annotations" : "androidx.annotation:annotation:1.0.0",
|
||||||
"appcompat-v7" : "com.android.support:appcompat-v7:${ext.android.ANDROID_SUPPORT_VERSION}",
|
"appcompat-v7" : "androidx.appcompat:appcompat:1.0.0",
|
||||||
"design" : "com.android.support:design:${ext.android.ANDROID_SUPPORT_VERSION}",
|
"design" : "com.android.support:design:${ext.android.ANDROID_SUPPORT_VERSION}",
|
||||||
"cardview-v7" : "com.android.support:cardview-v7:${ext.android.ANDROID_SUPPORT_VERSION}",
|
"cardview-v7" : "com.android.support:cardview-v7:${ext.android.ANDROID_SUPPORT_VERSION}",
|
||||||
"kotlin-stdlib" : "org.jetbrains.kotlin:kotlin-stdlib-jre7:${ext.android.KOTLIN_VERSION}",
|
"kotlin-stdlib" : "org.jetbrains.kotlin:kotlin-stdlib:${ext.android.KOTLIN_VERSION}",
|
||||||
"kotlin-gradle-plugin": "org.jetbrains.kotlin:kotlin-gradle-plugin:${ext.android.KOTLIN_VERSION}",
|
"kotlin-gradle-plugin": "org.jetbrains.kotlin:kotlin-gradle-plugin:${ext.android.KOTLIN_VERSION}",
|
||||||
"junit" : "junit:junit:${ext.android.JUNIT_VERSION}"
|
"junit" : "junit:junit:${ext.android.JUNIT_VERSION}"
|
||||||
]
|
]
|
||||||
@ -54,7 +53,8 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
classpath 'com.android.tools.build:gradle:3.5.1'
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath rootProject.ext.deps["kotlin-gradle-plugin"]
|
classpath rootProject.ext.deps["kotlin-gradle-plugin"]
|
||||||
|
|
||||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
|
||||||
@ -71,6 +71,7 @@ allprojects {
|
|||||||
maven { url 'https://dl.google.com/dl/android/maven2/' }
|
maven { url 'https://dl.google.com/dl/android/maven2/' }
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
|
google()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api 'com.github.michael-rapp:android-util:1.15.0'
|
api 'com.github.michael-rapp:android-util:1.15.0'
|
||||||
implementation rootProject.ext.deps["annotations"]
|
implementation rootProject.ext.deps["annotations"]
|
||||||
implementation rootProject.ext.deps["appcompat-v7"]
|
|
||||||
testImplementation rootProject.ext.deps["junit"]
|
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;
|
package de.mrapp.android.tabswitcher;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.view.animation.Interpolator;
|
import android.view.animation.Interpolator;
|
||||||
|
|
||||||
import static de.mrapp.android.util.Condition.ensureAtLeast;
|
import static de.mrapp.android.util.Condition.ensureAtLeast;
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher;
|
package de.mrapp.android.tabswitcher;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.view.animation.Interpolator;
|
import android.view.animation.Interpolator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher;
|
package de.mrapp.android.tabswitcher;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.view.animation.Interpolator;
|
import android.view.animation.Interpolator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher;
|
package de.mrapp.android.tabswitcher;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.view.animation.Interpolator;
|
import android.view.animation.Interpolator;
|
||||||
|
|
||||||
import static de.mrapp.android.util.Condition.ensureNotNull;
|
import static de.mrapp.android.util.Condition.ensureNotNull;
|
||||||
|
@ -21,13 +21,13 @@ import android.graphics.drawable.Drawable;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.support.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
import android.support.annotation.DrawableRes;
|
import androidx.annotation.DrawableRes;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import android.support.v7.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher;
|
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
|
* 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;
|
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
|
* 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.Bundle;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.support.annotation.AttrRes;
|
import androidx.annotation.AttrRes;
|
||||||
import android.support.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
import android.support.annotation.DrawableRes;
|
import androidx.annotation.DrawableRes;
|
||||||
import android.support.annotation.MenuRes;
|
import androidx.annotation.MenuRes;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import android.support.annotation.StyleRes;
|
import androidx.annotation.StyleRes;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import android.support.v4.util.Pair;
|
import androidx.core.util.Pair;
|
||||||
import android.support.v4.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import android.support.v7.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -16,8 +16,8 @@ package de.mrapp.android.tabswitcher;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher;
|
package de.mrapp.android.tabswitcher;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the interface, a class, which should be notified about a tab switcher's events, must
|
* 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.PorterDuff;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import de.mrapp.android.tabswitcher.Animation;
|
import de.mrapp.android.tabswitcher.Animation;
|
||||||
import de.mrapp.android.tabswitcher.R;
|
import de.mrapp.android.tabswitcher.R;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher.iterator;
|
package de.mrapp.android.tabswitcher.iterator;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import de.mrapp.android.tabswitcher.model.TabItem;
|
import de.mrapp.android.tabswitcher.model.TabItem;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher.iterator;
|
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.Tab;
|
||||||
import de.mrapp.android.tabswitcher.model.TabItem;
|
import de.mrapp.android.tabswitcher.model.TabItem;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher.iterator;
|
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.TabSwitcher;
|
||||||
import de.mrapp.android.tabswitcher.model.Model;
|
import de.mrapp.android.tabswitcher.model.Model;
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
package de.mrapp.android.tabswitcher.layout;
|
package de.mrapp.android.tabswitcher.layout;
|
||||||
|
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.VelocityTracker;
|
import android.view.VelocityTracker;
|
||||||
import android.view.ViewConfiguration;
|
import android.view.ViewConfiguration;
|
||||||
|
@ -18,13 +18,13 @@ import android.animation.Animator.AnimatorListener;
|
|||||||
import android.animation.AnimatorListenerAdapter;
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.annotation.CallSuper;
|
import androidx.annotation.CallSuper;
|
||||||
import android.support.annotation.MenuRes;
|
import androidx.annotation.MenuRes;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v4.util.Pair;
|
import androidx.core.util.Pair;
|
||||||
import android.support.v7.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
package de.mrapp.android.tabswitcher.layout;
|
package de.mrapp.android.tabswitcher.layout;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewPropertyAnimator;
|
import android.view.ViewPropertyAnimator;
|
||||||
|
@ -15,8 +15,8 @@ package de.mrapp.android.tabswitcher.layout;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher.layout;
|
package de.mrapp.android.tabswitcher.layout;
|
||||||
|
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v7.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
package de.mrapp.android.tabswitcher.layout.phone;
|
package de.mrapp.android.tabswitcher.layout.phone;
|
||||||
|
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.v7.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
package de.mrapp.android.tabswitcher.layout.phone;
|
package de.mrapp.android.tabswitcher.layout.phone;
|
||||||
|
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v7.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
@ -20,12 +20,12 @@ import android.graphics.Bitmap;
|
|||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.annotation.MenuRes;
|
import androidx.annotation.MenuRes;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import android.support.v4.util.Pair;
|
import androidx.core.util.Pair;
|
||||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
@ -20,11 +20,11 @@ import android.animation.ValueAnimator;
|
|||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v4.util.Pair;
|
import androidx.core.util.Pair;
|
||||||
import android.support.v4.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import android.support.v7.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
@ -15,10 +15,10 @@ package de.mrapp.android.tabswitcher.layout.phone;
|
|||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v4.util.LruCache;
|
import androidx.collection.LruCache;
|
||||||
import android.support.v4.util.Pair;
|
import androidx.core.util.Pair;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.MeasureSpec;
|
import android.view.View.MeasureSpec;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -17,13 +17,13 @@ import android.content.Context;
|
|||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
import android.support.annotation.DrawableRes;
|
import androidx.annotation.DrawableRes;
|
||||||
import android.support.annotation.MenuRes;
|
import androidx.annotation.MenuRes;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
package de.mrapp.android.tabswitcher.model;
|
package de.mrapp.android.tabswitcher.model;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the interface, a class, whose state should be stored and restored, must implement.
|
* Defines the interface, a class, whose state should be stored and restored, must implement.
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher.model;
|
package de.mrapp.android.tabswitcher.model;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import de.mrapp.android.tabswitcher.R;
|
import de.mrapp.android.tabswitcher.R;
|
||||||
|
@ -20,14 +20,14 @@ import android.graphics.drawable.BitmapDrawable;
|
|||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.ColorInt;
|
import androidx.annotation.ColorInt;
|
||||||
import android.support.annotation.DrawableRes;
|
import androidx.annotation.DrawableRes;
|
||||||
import android.support.annotation.MenuRes;
|
import androidx.annotation.MenuRes;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import android.support.v7.widget.Toolbar.OnMenuItemClickListener;
|
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.mrapp.android.tabswitcher.model;
|
package de.mrapp.android.tabswitcher.model;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import de.mrapp.android.tabswitcher.TabSwitcher;
|
import de.mrapp.android.tabswitcher.TabSwitcher;
|
||||||
|
|
||||||
|
@ -14,12 +14,11 @@
|
|||||||
package de.mrapp.android.tabswitcher.view;
|
package de.mrapp.android.tabswitcher.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.AttrRes;
|
import androidx.annotation.AttrRes;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v7.widget.AppCompatImageButton;
|
import androidx.appcompat.widget.AppCompatImageButton;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.View;
|
|
||||||
|
|
||||||
import de.mrapp.android.tabswitcher.Animation;
|
import de.mrapp.android.tabswitcher.Animation;
|
||||||
import de.mrapp.android.tabswitcher.R;
|
import de.mrapp.android.tabswitcher.R;
|
||||||
|
@ -15,6 +15,7 @@ License.
|
|||||||
-->
|
-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@ -32,7 +33,7 @@ License.
|
|||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/phone_close_tab_icon"/>
|
app:srcCompat="@drawable/phone_close_tab_icon"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tab_title_text_view"
|
android:id="@+id/tab_title_text_view"
|
||||||
|
@ -15,6 +15,7 @@ License.
|
|||||||
-->
|
-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@ -42,7 +43,7 @@ License.
|
|||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/phone_close_tab_icon"/>
|
app:srcCompat="@drawable/phone_close_tab_icon"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</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
|
implied. See the License for the specific language governing permissions and limitations under the
|
||||||
License.
|
License.
|
||||||
-->
|
-->
|
||||||
<android.support.v7.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/primary_toolbar"
|
android:id="@+id/primary_toolbar"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
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:drawablePadding">@dimen/tab_title_drawable_padding</item>
|
||||||
<item name="android:ellipsize">marquee</item>
|
<item name="android:ellipsize">marquee</item>
|
||||||
<item name="android:maxLines">1</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>
|
<item name="android:textColor">@color/tab_title_text_color</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
android.enableJetifier=true
|
||||||
|
android.useAndroidX=true
|
||||||
org.gradle.jvmargs=-Xmx1536m
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Thu Nov 08 23:25:07 CST 2018
|
#Tue Apr 20 22:03:06 EEST 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||||
|
Loading…
Reference in New Issue
Block a user