From 223f44ef8fa8dfc9562dbcf79a44cb5e0b973539 Mon Sep 17 00:00:00 2001 From: xC3FFF0E <78732474+xC3FFF0E@users.noreply.github.com> Date: Fri, 12 Feb 2021 01:43:25 +0800 Subject: Rename SplashActivity.java to SplashActivity.java. --- .../java/com/xc3fff0e/xmanager/SplashActivity.java | 151 --------------------- .../com/xc3fff0e/xmanager/SplashActivity.java. | 151 +++++++++++++++++++++ 2 files changed, 151 insertions(+), 151 deletions(-) delete mode 100644 app/src/main/java/com/xc3fff0e/xmanager/SplashActivity.java create mode 100644 app/src/main/java/com/xc3fff0e/xmanager/SplashActivity.java. diff --git a/app/src/main/java/com/xc3fff0e/xmanager/SplashActivity.java b/app/src/main/java/com/xc3fff0e/xmanager/SplashActivity.java deleted file mode 100644 index 1c6dbbd..0000000 --- a/app/src/main/java/com/xc3fff0e/xmanager/SplashActivity.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.xc3fff0e.xmanager; - -import androidx.appcompat.app.AppCompatActivity; -import android.app.*; -import android.os.*; -import android.view.*; -import android.view.View.*; -import android.widget.*; -import android.content.*; -import android.graphics.*; -import android.media.*; -import android.net.*; -import android.text.*; -import android.util.*; -import android.webkit.*; -import android.animation.*; -import android.view.animation.*; -import java.util.*; -import java.text.*; -import android.widget.LinearLayout; -import android.widget.ImageView; -import java.util.Timer; -import java.util.TimerTask; -import android.content.Intent; -import android.net.Uri; - -public class SplashActivity extends AppCompatActivity { - - private Timer _timer = new Timer(); - - private LinearLayout main_body; - private ImageView icon_manager; - - private TimerTask Timer; - private Intent Switch_Activity = new Intent(); - @Override - protected void onCreate(Bundle _savedInstanceState) { - super.onCreate(_savedInstanceState); - setContentView(R.layout.splash); - com.google.firebase.FirebaseApp.initializeApp(this); - initialize(_savedInstanceState); - initializeLogic(); - } - - private void initialize(Bundle _savedInstanceState) { - - main_body = (LinearLayout) findViewById(R.id.main_body); - icon_manager = (ImageView) findViewById(R.id.icon_manager); - } - private void initializeLogic() { - Timer = new TimerTask() { - @Override - public void run() { - runOnUiThread(new Runnable() { - @Override - public void run() { - Switch_Activity.setClass(getApplicationContext(), MainActivity.class); - startActivity(Switch_Activity); - finish(); - } - }); - } - }; - _timer.schedule(Timer, (int)(1000)); - } - - @Override - protected void onActivityResult(int _requestCode, int _resultCode, Intent _data) { - super.onActivityResult(_requestCode, _resultCode, _data); - - switch (_requestCode) { - - default: - break; - } - } - - @Override - public void onBackPressed() { - - } - - @Override - public void onResume() { - super.onResume(); - _Hide_Navigation(); - } - private void _Hide_Navigation () { - try { - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); - - if (Build.VERSION.SDK_INT >= 21) { Window w = this.getWindow(); w.setNavigationBarColor(Color.parseColor("#212121")); - } - } - catch(Exception e) { - } - } - - - @Deprecated - public void showMessage(String _s) { - Toast.makeText(getApplicationContext(), _s, Toast.LENGTH_SHORT).show(); - } - - @Deprecated - public int getLocationX(View _v) { - int _location[] = new int[2]; - _v.getLocationInWindow(_location); - return _location[0]; - } - - @Deprecated - public int getLocationY(View _v) { - int _location[] = new int[2]; - _v.getLocationInWindow(_location); - return _location[1]; - } - - @Deprecated - public int getRandom(int _min, int _max) { - Random random = new Random(); - return random.nextInt(_max - _min + 1) + _min; - } - - @Deprecated - public ArrayList getCheckedItemPositionsToArray(ListView _list) { - ArrayList _result = new ArrayList(); - SparseBooleanArray _arr = _list.getCheckedItemPositions(); - for (int _iIdx = 0; _iIdx < _arr.size(); _iIdx++) { - if (_arr.valueAt(_iIdx)) - _result.add((double)_arr.keyAt(_iIdx)); - } - return _result; - } - - @Deprecated - public float getDip(int _input){ - return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, _input, getResources().getDisplayMetrics()); - } - - @Deprecated - public int getDisplayWidthPixels(){ - return getResources().getDisplayMetrics().widthPixels; - } - - @Deprecated - public int getDisplayHeightPixels(){ - return getResources().getDisplayMetrics().heightPixels; - } - -} diff --git a/app/src/main/java/com/xc3fff0e/xmanager/SplashActivity.java. b/app/src/main/java/com/xc3fff0e/xmanager/SplashActivity.java. new file mode 100644 index 0000000..06017a1 --- /dev/null +++ b/app/src/main/java/com/xc3fff0e/xmanager/SplashActivity.java. @@ -0,0 +1,151 @@ +package com.xc3fff0e.xmanager; + +import androidx.appcompat.app.AppCompatActivity; +import android.app.*; +import android.os.*; +import android.view.*; +import android.view.View.*; +import android.widget.*; +import android.content.*; +import android.graphics.*; +import android.media.*; +import android.net.*; +import android.text.*; +import android.util.*; +import android.webkit.*; +import android.animation.*; +import android.view.animation.*; +import java.util.*; +import java.text.*; +import android.widget.LinearLayout; +import android.widget.ImageView; +import java.util.Timer; +import java.util.TimerTask; +import android.content.Intent; +import android.net.Uri; + +public class SplashActivity extends AppCompatActivity { + + private Timer _timer = new Timer(); + + private LinearLayout main_body; + private ImageView icon_manager; + + private TimerTask Timer; + private Intent Switch_Activity = new Intent(); + @Override + protected void onCreate(Bundle _savedInstanceState) { + super.onCreate(_savedInstanceState); + setContentView(R.layout.splash); + com.google.firebase.FirebaseApp.initializeApp(this); + initialize(_savedInstanceState); + initializeLogic(); + } + + private void initialize(Bundle _savedInstanceState) { + + main_body = (LinearLayout) findViewById(R.id.main_body); + icon_manager = (ImageView) findViewById(R.id.icon_manager); + } + private void initializeLogic() { + Timer = new TimerTask() { + @Override + public void run() { + runOnUiThread(new Runnable() { + @Override + public void run() { + Switch_Activity.setClass(getApplicationContext(), MainActivity.class); + startActivity(Switch_Activity); + finish(); + } + }); + } + }; + _timer.schedule(Timer, (int)(1000)); + } + + @Override + protected void onActivityResult(int _requestCode, int _resultCode, Intent _data) { + super.onActivityResult(_requestCode, _resultCode, _data); + + switch (_requestCode) { + + default: + break; + } + } + + @Override + public void onBackPressed() { + + } + + @Override + public void onResume() { + super.onResume(); + _Hide_Navigation(); + } + private void _Hide_Navigation () { + try { + getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); + + if (Build.VERSION.SDK_INT >= 21) { Window w = this.getWindow(); w.setNavigationBarColor(Color.parseColor("#212121")); + } + } + catch(Exception e) { + } + } + + + @Deprecated + public void showMessage(String _s) { + Toast.makeText(getApplicationContext(), _s, Toast.LENGTH_SHORT).show(); + } + + @Deprecated + public int getLocationX(View _v) { + int _location[] = new int[2]; + _v.getLocationInWindow(_location); + return _location[0]; + } + + @Deprecated + public int getLocationY(View _v) { + int _location[] = new int[2]; + _v.getLocationInWindow(_location); + return _location[1]; + } + + @Deprecated + public int getRandom(int _min, int _max) { + Random random = new Random(); + return random.nextInt(_max - _min + 1) + _min; + } + + @Deprecated + public ArrayList getCheckedItemPositionsToArray(ListView _list) { + ArrayList _result = new ArrayList(); + SparseBooleanArray _arr = _list.getCheckedItemPositions(); + for (int _iIdx = 0; _iIdx < _arr.size(); _iIdx++) { + if (_arr.valueAt(_iIdx)) + _result.add((double)_arr.keyAt(_iIdx)); + } + return _result; + } + + @Deprecated + public float getDip(int _input){ + return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, _input, getResources().getDisplayMetrics()); + } + + @Deprecated + public int getDisplayWidthPixels(){ + return getResources().getDisplayMetrics().widthPixels; + } + + @Deprecated + public int getDisplayHeightPixels(){ + return getResources().getDisplayMetrics().heightPixels; + } + +} -- cgit v1.2.3