Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bde37e38a7 | ||
|
|
c401d63d2f | ||
|
|
52416dd43d | ||
|
|
59bd7128ae | ||
|
|
87f16467bb | ||
|
|
bed0fd00bd | ||
|
|
0672af98f8 |
@@ -17,8 +17,8 @@ android {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion Integer.parseInt("$targetSdkVer")
|
||||
multiDexEnabled true
|
||||
versionCode 522
|
||||
versionName "1.8.8"
|
||||
versionCode 523
|
||||
versionName "1.8.9"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
||||
@@ -2,13 +2,25 @@ package com.v2ray.ang.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.WindowCompat
|
||||
import com.v2ray.ang.util.MyContextWrapper
|
||||
import com.v2ray.ang.util.Utils
|
||||
|
||||
abstract class BaseActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
if (!Utils.getDarkModeStatus(this)) {
|
||||
WindowCompat.getInsetsController(window, window.decorView).apply {
|
||||
isAppearanceLightStatusBars = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
|
||||
android.R.id.home -> {
|
||||
onBackPressed()
|
||||
|
||||
@@ -25,13 +25,12 @@ class LogcatActivity : BaseActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityLogcatBinding.inflate(layoutInflater)
|
||||
val view = binding.root
|
||||
setContentView(view)
|
||||
binding = ActivityLogcatBinding.inflate(layoutInflater)
|
||||
val view = binding.root
|
||||
setContentView(view)
|
||||
|
||||
title = getString(R.string.title_logcat)
|
||||
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
logcat(false)
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.activity.viewModels
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.tencent.mmkv.MMKV
|
||||
import com.v2ray.ang.AppConfig.ANG_PACKAGE
|
||||
@@ -66,11 +65,6 @@ class MainActivity : BaseActivity(), NavigationView.OnNavigationItemSelectedList
|
||||
setContentView(view)
|
||||
title = getString(R.string.title_server)
|
||||
setSupportActionBar(binding.toolbar)
|
||||
if (!Utils.getDarkModeStatus(this)) {
|
||||
WindowCompat.getInsetsController(window, window.decorView).apply {
|
||||
isAppearanceLightStatusBars = true
|
||||
}
|
||||
}
|
||||
|
||||
binding.fab.setOnClickListener {
|
||||
if (mainViewModel.isRunning.value == true) {
|
||||
|
||||
@@ -41,8 +41,6 @@ class PerAppProxyActivity : BaseActivity() {
|
||||
val view = binding.root
|
||||
setContentView(view)
|
||||
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
val dividerItemDecoration = DividerItemDecoration(this, LinearLayoutManager.VERTICAL)
|
||||
binding.recyclerView.addItemDecoration(dividerItemDecoration)
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ class RoutingSettingsActivity : BaseActivity() {
|
||||
setContentView(view)
|
||||
|
||||
title = getString(R.string.title_pref_routing_custom)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
val fragments = ArrayList<Fragment>()
|
||||
fragments.add(RoutingSettingsFragment().newInstance(AppConfig.PREF_V2RAY_ROUTING_AGENT))
|
||||
|
||||
@@ -31,16 +31,6 @@ class ScannerActivity : BaseActivity(){
|
||||
if (settingsStorage?.decodeBool(AppConfig.PREF_START_SCAN_IMMEDIATE) == true) {
|
||||
launchScan()
|
||||
}
|
||||
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
public override fun onResume() {
|
||||
super.onResume()
|
||||
}
|
||||
|
||||
public override fun onPause() {
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
private fun launchScan(){
|
||||
|
||||
@@ -175,7 +175,6 @@ class ServerActivity : BaseActivity() {
|
||||
} else {
|
||||
clearServer()
|
||||
}
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,7 +49,6 @@ class ServerCustomConfigActivity : BaseActivity() {
|
||||
} else {
|
||||
clearServer()
|
||||
}
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,8 +20,6 @@ class SettingsActivity : BaseActivity() {
|
||||
|
||||
title = getString(R.string.title_settings)
|
||||
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
settingsViewModel.startListenPreferenceChange()
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ class SubEditActivity : BaseActivity() {
|
||||
} else {
|
||||
clearServer()
|
||||
}
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,8 +27,6 @@ class SubSettingActivity : BaseActivity() {
|
||||
binding.recyclerView.setHasFixedSize(true)
|
||||
binding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
binding.recyclerView.adapter = adapter
|
||||
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
||||
@@ -49,7 +49,6 @@ class UserAssetActivity : BaseActivity() {
|
||||
val view = binding.root
|
||||
setContentView(view)
|
||||
title = getString(R.string.title_user_asset_setting)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
binding.recyclerView.setHasFixedSize(true)
|
||||
binding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
|
||||
@@ -147,19 +147,19 @@
|
||||
<string name="logcat_copy">نسخ</string>
|
||||
<string name="logcat_clear">مسح</string>
|
||||
<string name="title_service_restart">إعادة تشغيل الخدمة</string>
|
||||
<string name="title_del_all_config">حذف كل التكوين</string>
|
||||
<string name="title_del_duplicate_config">حذف التكوين المكرر</string>
|
||||
<string name="title_del_invalid_config">حذف التكوين غير الصالح (اختبر أولا)</string>
|
||||
<string name="title_del_all_config">حذف الكل (قبل أول خطوة)</string>
|
||||
<string name="title_del_duplicate_config">حذف المكررات (2)</string>
|
||||
<string name="title_del_invalid_config">حذف العناوين العاطلة (بعد الاختبار؛ 4)</string>
|
||||
<string name="title_export_all">تصدير التكوينات غير المخصصة إلى الحافظة</string>
|
||||
<string name="title_sub_setting">إعدادات مجموعة الاشتراك</string>
|
||||
<string name="sub_setting_remarks">ملاحظات</string>
|
||||
<string name="sub_setting_url">URL اختياري</string>
|
||||
<string name="sub_setting_enable">تمكين التحديث</string>
|
||||
<string name="title_sub_update">تحديث الاشتراك</string>
|
||||
<string name="title_sub_update">تحديث الاشتراك (1)</string>
|
||||
<string name="title_ping_all_server">Tcping كل التكوين</string>
|
||||
<string name="title_real_ping_all_server">تأخير الحقيقي لكل التكوين</string>
|
||||
<string name="title_real_ping_all_server">اختبر كل العناوين (3)</string>
|
||||
<string name="title_user_asset_setting">ملفات الأصول الجغرافية</string>
|
||||
<string name="title_sort_by_test_results">الترتيب بناءً على نتائج الاختبار</string>
|
||||
<string name="title_sort_by_test_results">ترتيب العناوين حسب نتائج الاختبار (5)</string>
|
||||
<string name="title_filter_config">تصفية ملف التكوين</string>
|
||||
<string name="filter_config_all">جميع مجموعات الاشتراك</string>
|
||||
<string name="title_del_duplicate_config_count">حذف %d من التكوينات المكررة</string>
|
||||
@@ -192,9 +192,9 @@
|
||||
<item>تصدير إلى الحافظة</item>
|
||||
</string-array>
|
||||
<string-array name="routing_tag">
|
||||
<item>URL الوكيل أو IP</item>
|
||||
<item>URL المباشر أو IP</item>
|
||||
<item>URL المحظور أو IP</item>
|
||||
<item>مسار وكيل أو IP</item>
|
||||
<item>مسار مباشر أو IP</item>
|
||||
<item>مسار محظور أو IP</item>
|
||||
</string-array>
|
||||
<string-array name="routing_mode">
|
||||
<item>وكيل عالمي</item>
|
||||
|
||||
Reference in New Issue
Block a user