Skip to content

Commit ee49803

Browse files
feat: замена AboutActivity на BottomSheet и исправление портов
- Удалено старое AboutActivity - Создана всплывающая шторка BottomSheet с текстом об обходе ТСПУ и глушилок - Добавлена кликабельная ссылка на профиль kiktor12358 на GitHub - Исправлено выделение портов при пинговании
1 parent 83e3826 commit ee49803

5 files changed

Lines changed: 64 additions & 57 deletions

File tree

V2rayNG/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@
148148
<activity
149149
android:name=".ui.BackupActivity"
150150
android:exported="false" />
151-
<activity
152-
android:name=".ui.AboutActivity"
153-
android:exported="false" />
151+
154152

155153
<service
156154
android:name=".service.V2RayVpnService"

V2rayNG/app/src/main/java/com/kiktor/v2whitelist/handler/SmartConnectManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ object SmartConnectManager {
194194
if (resultsList.any { it.third < 500 }) return@withPermit null
195195

196196
val randomUrl = testUrls[Random.nextInt(testUrls.size)]
197-
val config = V2rayConfigManager.getV2rayConfig(context, guid)
197+
val config = V2rayConfigManager.getV2rayConfig4Speedtest(context, guid)
198198
val delay = if (config.status) {
199199
withTimeoutOrNull(perServerTimeoutMs) {
200200
V2RayNativeManager.measureOutboundDelay(config.content, randomUrl)

V2rayNG/app/src/main/java/com/kiktor/v2whitelist/ui/AboutActivity.kt

Lines changed: 0 additions & 52 deletions
This file was deleted.

V2rayNG/app/src/main/java/com/kiktor/v2whitelist/ui/MainActivity.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,16 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
7070
binding.btnSettingsQuick.setOnClickListener { requestActivityLauncher.launch(Intent(this, SettingsActivity::class.java)) }
7171
binding.btnLogcatQuick.setOnClickListener { startActivity(Intent(this, LogcatActivity::class.java)) }
7272
binding.btnUpdateSubQuick.setOnClickListener { handleUpdateSubscription() }
73-
binding.btnAboutQuick.setOnClickListener { startActivity(Intent(this, AboutActivity::class.java)) }
73+
binding.btnAboutQuick.setOnClickListener {
74+
val bottomSheetDialog = com.google.android.material.bottomsheet.BottomSheetDialog(this)
75+
val bottomSheetView = layoutInflater.inflate(R.layout.layout_about_bottom_sheet, null)
76+
bottomSheetView.findViewById<android.widget.TextView>(R.id.tv_developer_link)?.setOnClickListener {
77+
com.kiktor.v2whitelist.util.Utils.openUri(this, "https://github.com/kiktor12358/v2whitelist")
78+
bottomSheetDialog.dismiss()
79+
}
80+
bottomSheetDialog.setContentView(bottomSheetView)
81+
bottomSheetDialog.show()
82+
}
7483

7584
setupViewModel()
7685
mainViewModel.reloadServerList()
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="wrap_content"
5+
android:orientation="vertical"
6+
android:padding="24dp"
7+
android:background="?android:attr/colorBackground">
8+
9+
<TextView
10+
android:layout_width="match_parent"
11+
android:layout_height="wrap_content"
12+
android:text="@string/btn_label_about"
13+
android:textSize="20sp"
14+
android:textStyle="bold"
15+
android:textColor="?android:attr/textColorPrimary"
16+
android:layout_marginBottom="16dp" />
17+
18+
<TextView
19+
android:layout_width="match_parent"
20+
android:layout_height="wrap_content"
21+
android:text="Приложение представляет собой минималистичный и оптимизированный клиент. Главная цель проекта — обеспечить надежный обход ТСПУ (технических средств противодействия угрозам) и глушилок мобильной связи, предоставляя быстрый и бесперебойный доступ."
22+
android:textSize="14sp"
23+
android:textColor="?android:attr/textColorSecondary"
24+
android:lineSpacingExtra="4dp"
25+
android:layout_marginBottom="16dp" />
26+
27+
<LinearLayout
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:orientation="horizontal">
31+
32+
<TextView
33+
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
android:text="Создатель: "
36+
android:textSize="14sp"
37+
android:textColor="?android:attr/textColorSecondary" />
38+
39+
<TextView
40+
android:id="@+id/tv_developer_link"
41+
android:layout_width="wrap_content"
42+
android:layout_height="wrap_content"
43+
android:text="kiktor12358"
44+
android:textSize="14sp"
45+
android:textColor="?android:attr/textColorLink"
46+
android:textStyle="bold"
47+
android:background="?android:attr/selectableItemBackground"
48+
android:clickable="true"
49+
android:focusable="true" />
50+
</LinearLayout>
51+
52+
</LinearLayout>

0 commit comments

Comments
 (0)