Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit 968c08f

Browse files
committed
fix: bugs and improve ui
1 parent 28716f5 commit 968c08f

33 files changed

Lines changed: 511 additions & 246 deletions

V2rayNG/app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ android {
3434
minSdkVersion 21
3535
targetSdkVersion Integer.parseInt("$targetSdkVer")
3636
multiDexEnabled true
37-
versionCode 5100600 //hiddify when comes to version 5 change it
38-
versionName "6.0.0" //hiddify
37+
versionCode 5100601 //hiddify when comes to version 5 change it
38+
versionName "6.0.1" //hiddify
3939
}
4040

4141
signingConfigs {
@@ -245,6 +245,8 @@ dependencies {
245245
// implementation 'com.github.dmytrodanylyk:circular-progress-button:1.3'
246246
// compile 'com.github.dmytrodanylyk:android-morphing-button:1.0'
247247
implementation 'com.github.anastr:speedviewlib:1.6.0'
248+
implementation("com.mikepenz:materialdrawer:9.0.1")
249+
implementation 'androidx.core:core-splashscreen:1.0.0+'
248250

249251

250252

V2rayNG/app/src/main/AndroidManifest.xml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
android:icon="@mipmap/ic_launcher"
3232
android:label="@string/app_name"
3333
android:supportsRtl="true"
34-
android:theme="@style/AppTheme"
34+
android:theme="@style/AppTheme.ActionBar"
3535
android:usesCleartextTraffic="true"
3636
tools:targetApi="m">
3737
<provider
@@ -52,17 +52,13 @@
5252
<activity
5353
android:name=".ui.SplashScreenActivity"
5454
android:exported="true">
55-
<intent-filter>
56-
<action android:name="android.intent.action.MAIN" />
5755

58-
<category android:name="android.intent.category.LAUNCHER" />
59-
</intent-filter>
6056
</activity>
6157
<activity
6258
android:name="com.hiddify.ang.speedtest.SpeedTestActivity"
6359
android:exported="true"
6460
android:launchMode="singleTask"
65-
android:theme="@style/AppTheme">
61+
>
6662

6763

6864
</activity>
@@ -72,13 +68,38 @@
7268
android:name=".ui.HomeActivity"
7369
android:exported="true"
7470
android:launchMode="singleTask"
75-
android:theme="@style/AppTheme">
71+
android:theme="@style/Theme.App.Starting">
7672

7773
<meta-data
7874
android:name="android.app.shortcuts"
7975
android:resource="@xml/shortcuts" />
8076
<intent-filter>
8177
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
78+
79+
<action android:name="android.intent.action.MAIN" />
80+
81+
<category android:name="android.intent.category.LAUNCHER" />
82+
83+
</intent-filter>
84+
<intent-filter>
85+
<action android:name="android.intent.action.SEND" />
86+
87+
<category android:name="android.intent.category.DEFAULT" />
88+
89+
<data android:mimeType="text/plain" />
90+
</intent-filter>
91+
<intent-filter>
92+
<action android:name="android.intent.action.VIEW" />
93+
94+
<category android:name="android.intent.category.BROWSABLE" />
95+
<category android:name="android.intent.category.DEFAULT" />
96+
97+
<data android:scheme="v2rayng" />
98+
<data android:scheme="hiddify" />
99+
<data android:scheme="vmess" />
100+
<data android:scheme="ss" />
101+
<data android:scheme="vless" />
102+
<data android:scheme="trojan" />
82103
</intent-filter>
83104
</activity>
84105
<activity
@@ -126,26 +147,7 @@
126147
<activity
127148
android:name=".ui.UrlSchemeActivity"
128149
android:exported="true">
129-
<intent-filter>
130-
<action android:name="android.intent.action.SEND" />
131-
132-
<category android:name="android.intent.category.DEFAULT" />
133-
134-
<data android:mimeType="text/plain" />
135-
</intent-filter>
136-
<intent-filter>
137-
<action android:name="android.intent.action.VIEW" />
138-
139-
<category android:name="android.intent.category.BROWSABLE" />
140-
<category android:name="android.intent.category.DEFAULT" />
141150

142-
<data android:scheme="v2rayng" />
143-
<data android:scheme="hiddify" />
144-
<data android:scheme="vmess" />
145-
<data android:scheme="ss" />
146-
<data android:scheme="vless" />
147-
<data android:scheme="trojan" />
148-
</intent-filter>
149151
</activity>
150152
<service
151153
android:name="com.hiddify.ang.MyFirebaseMessagingService"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.hiddify.ang
2+
3+
import android.content.Intent
4+
import androidx.fragment.app.Fragment
5+
import androidx.fragment.app.FragmentActivity
6+
import com.v2ray.ang.ui.BaseActivity
7+
import com.v2ray.ang.ui.HomeActivity
8+
import com.v2ray.ang.util.Utils
9+
import java.nio.charset.Charset
10+
11+
open class BaseFragment: Fragment() {
12+
13+
fun setTitle(title:CharSequence){
14+
(requireActivity() as BaseActivity)?.supportActionBar?.title=title
15+
}
16+
17+
open fun onTitleClick(){
18+
Utils.openUri(requireActivity(),"https://play.google.com/store/apps/details?id=ang.hiddify.com")
19+
}
20+
21+
open fun handleDeepLink(shareUrl:String?) {
22+
23+
}
24+
25+
fun homeActivity(): HomeActivity {
26+
return super.requireActivity() as HomeActivity
27+
}
28+
29+
}

V2rayNG/app/src/main/kotlin/com/hiddify/ang/MyFirebaseMessagingService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import com.google.firebase.messaging.RemoteMessage
1717
import com.v2ray.ang.R
1818

1919
import com.v2ray.ang.ui.HiddifyMainActivity
20+
import com.v2ray.ang.ui.HomeActivity
2021

2122
class MyFirebaseMessagingService : FirebaseMessagingService() {
2223

@@ -121,7 +122,7 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
121122
*/
122123
private fun sendNotification(messageBody: String) {
123124
val requestCode = 0
124-
val intent = Intent(this, HiddifyMainActivity::class.java)
125+
val intent = Intent(this, HomeActivity::class.java)
125126
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
126127
val pendingIntent = PendingIntent.getActivity(
127128
this,

V2rayNG/app/src/main/kotlin/com/v2ray/ang/extension/_HiddifyExt.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@ fun Context?.toast(s: String?, length : Int = Toast.LENGTH_SHORT) {
201201
// .setTitle("Alert Title")
202202
.setText(s)
203203
.show()
204-
val inflater = LayoutInflater.from(this)
205-
val layout = inflater.inflate(R.layout.custom_toast, null)
206-
val text = layout.findViewById<TextView>(R.id.text)
207-
text.text = s
208-
209-
val toast = Toast(this)
210-
toast.duration = length
211-
toast.view = layout
212-
toast.show()
204+
// val inflater = LayoutInflater.from(this)
205+
// val layout = inflater.inflate(R.layout.custom_toast, null)
206+
// val text = layout.findViewById<TextView>(R.id.text)
207+
// text.text = s
208+
//
209+
// val toast = Toast(this)
210+
// toast.duration = length
211+
// toast.view = layout
212+
// toast.show()
213213
}
214214

215215
fun Context?.toast(i: Int?, length : Int = Toast.LENGTH_LONG) {

V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayProxyOnlyService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import androidx.core.app.NotificationCompat
1111
import com.v2ray.ang.AppConfig
1212
import com.v2ray.ang.R
1313
import com.v2ray.ang.ui.HiddifyMainActivity
14+
import com.v2ray.ang.ui.HomeActivity
1415
import com.v2ray.ang.util.MyContextWrapper
1516
import com.v2ray.ang.util.Utils
1617
import java.lang.ref.SoftReference
@@ -26,7 +27,7 @@ class V2RayProxyOnlyService : Service(), ServiceControl {
2627
}
2728

2829
fun quickNotification(){
29-
val startMainIntent = Intent(this, HiddifyMainActivity::class.java) //todo: check to open main or hiddifyMain
30+
val startMainIntent = Intent(this, HomeActivity::class.java) //todo: check to open main or hiddifyMain
3031
val contentPendingIntent = PendingIntent.getActivity(this,
3132
0, startMainIntent,
3233
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {

V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayServiceManager.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import com.v2ray.ang.dto.ServerConfig
2222
import com.v2ray.ang.extension.toSpeedString
2323
import com.v2ray.ang.extension.toast
2424
import com.v2ray.ang.ui.HiddifyMainActivity
25+
import com.v2ray.ang.ui.HomeActivity
2526
import com.v2ray.ang.ui.MainActivity
2627
import com.v2ray.ang.util.*
2728
import go.Seq
@@ -267,7 +268,7 @@ object V2RayServiceManager {
267268
fun showNotification(service:Service? = serviceControl?.get()?.getService()) {
268269
if (service==null) return
269270
//todo @hiddify1
270-
val startMainIntent = Intent(service, HiddifyMainActivity::class.java) //todo: check to open main or hiddifyMain
271+
val startMainIntent = Intent(service, HomeActivity::class.java) //todo: check to open main or hiddifyMain
271272
val contentPendingIntent = PendingIntent.getActivity(service,
272273
NOTIFICATION_PENDING_INTENT_CONTENT, startMainIntent,
273274
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {

V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayVpnService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import com.v2ray.ang.BuildConfig
1919
import com.v2ray.ang.R
2020
import com.v2ray.ang.dto.ERoutingMode
2121
import com.v2ray.ang.ui.HiddifyMainActivity
22+
import com.v2ray.ang.ui.HomeActivity
2223
import com.v2ray.ang.util.MmkvManager
2324
import com.v2ray.ang.util.MyContextWrapper
2425
import com.v2ray.ang.util.Utils
@@ -98,7 +99,7 @@ class V2RayVpnService : VpnService(), ServiceControl {
9899

99100
}
100101
fun quickNotification(){
101-
val startMainIntent = Intent(this, HiddifyMainActivity::class.java) //todo: check to open main or hiddifyMain
102+
val startMainIntent = Intent(this, HomeActivity::class.java) //todo: check to open main or hiddifyMain
102103
val contentPendingIntent = PendingIntent.getActivity(this,
103104
0, startMainIntent,
104105
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {

V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/HiddifyAdvancedFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import android.view.View
77
import android.view.ViewGroup
88
//import androidx.fragment.app.dialogFragment
99
import androidx.fragment.app.Fragment
10+
import com.hiddify.ang.BaseFragment
1011

1112
import com.hiddify.ang.speedtest.SpeedTestActivity
1213
import com.v2ray.ang.R
@@ -17,7 +18,7 @@ import com.v2ray.ang.util.CallbackUtil
1718
import com.v2ray.ang.util.HiddifyUtils
1819
import com.v2ray.ang.util.Utils
1920

20-
class HiddifyAdvancedFragment() : Fragment() {
21+
class HiddifyAdvancedFragment() : BaseFragment() {
2122
public lateinit var binding: BottomsheetSettingBinding
2223

2324
interface Callback {

0 commit comments

Comments
 (0)