Finalize TV support
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
android:name=".App"
|
||||
android:allowBackup="false"
|
||||
android:label="@string/app_name"
|
||||
android:banner="@mipmap/ic_launcher"
|
||||
android:banner="@mipmap/banner"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package be.mygod.vpnhotspot
|
||||
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.ComponentName
|
||||
import android.content.Intent
|
||||
import android.content.ServiceConnection
|
||||
@@ -19,9 +20,9 @@ import be.mygod.vpnhotspot.databinding.ActivityMainBinding
|
||||
import be.mygod.vpnhotspot.manage.TetheringFragment
|
||||
import be.mygod.vpnhotspot.util.ServiceForegroundConnector
|
||||
import be.mygod.vpnhotspot.widget.SmartSnackbar
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationMenuView
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import q.rorbin.badgeview.QBadgeView
|
||||
|
||||
class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemSelectedListener, ServiceConnection {
|
||||
@@ -37,7 +38,17 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
|
||||
.setToolbarColor(ContextCompat.getColor(this, R.color.colorPrimary))
|
||||
.build()
|
||||
}
|
||||
fun launchUrl(url: Uri) = customTabsIntent.launchUrl(this, url)
|
||||
fun launchUrl(url: Uri) = try {
|
||||
customTabsIntent.launchUrl(this, url)
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
e.printStackTrace()
|
||||
Crashlytics.logException(e)
|
||||
SmartSnackbar.make(url.toString()).show()
|
||||
} catch (e: SecurityException) {
|
||||
e.printStackTrace()
|
||||
Crashlytics.logException(e)
|
||||
SmartSnackbar.make(url.toString()).show()
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
60
mobile/src/main/res/mipmap-anydpi-v24/banner.xml
Normal file
60
mobile/src/main/res/mipmap-anydpi-v24/banner.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="160dp"
|
||||
android:height="90dp"
|
||||
android:viewportWidth="160"
|
||||
android:viewportHeight="90">
|
||||
<path
|
||||
android:pathData="M0,0h160v90h-160z"
|
||||
android:fillColor="#4caf50"/>
|
||||
<path
|
||||
android:pathData="M44,41a4,4 0,1 0,4 4A4,4 0,0 0,44 41ZM56,45A12,12 0,1 0,38 55.38l2,-3.48a8,8 0,1 1,8 0l2,3.48A12,12 0,0 0,56 45ZM44,25A20,20 0,0 0,34 62.3l2,-3.46a16,16 0,1 1,16 0l2,3.46A20,20 0,0 0,44 25Z"
|
||||
android:fillColor="#66bb6a"/>
|
||||
<path
|
||||
android:pathData="M84.52,30.81h1.32l2.47,7.27 0.34,1h0.06l0.35,-1 2.59,-7.27H93l-3.67,10H88.06Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M94.26,30.81h3.38a3.26,3.26 0,0 1,1.55 0.38,2.84 2.84,0 0,1 1.14,1.06 2.94,2.94 0,0 1,0 3.06,2.91 2.91,0 0,1 -1.14,1.06 3.26,3.26 0,0 1,-1.55 0.38h-2.2v4.08L94.26,40.83ZM97.67,35.61a1.86,1.86 0,0 0,1 -0.26,1.92 1.92,0 0,0 0.67,-0.69 1.73,1.73 0,0 0,0 -1.76,1.92 1.92,0 0,0 -0.67,-0.69 1.78,1.78 0,0 0,-1 -0.27L95.44,31.94v3.67Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M102.33,30.81h1.45l5,8h0.06l-0.06,-1.93V30.81H110v10h-1.23l-5.27,-8.35h0l0,1.93v6.42h-1.17Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M85.44,47.61h1.18V52H91.8V47.61H93v10H91.8V53.07H86.62v4.56H85.44Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M96.38,57.35A3.45,3.45 0,0 1,95.07 56a4.14,4.14 0,0 1,0 -3.83,3.55 3.55,0 0,1 1.31,-1.38 3.64,3.64 0,0 1,5.09 1.38,4.14 4.14,0 0,1 0,3.83 3.52,3.52 0,0 1,-1.31 1.37,3.76 3.76,0 0,1 -3.78,0ZM99.49,56.45a2.42,2.42 0,0 0,0.91 -0.94,3.16 3.16,0 0,0 0,-2.89 2.42,2.42 0,0 0,-0.91 -0.94,2.38 2.38,0 0,0 -1.22,-0.33 2.41,2.41 0,0 0,-1.23 0.33,2.38 2.38,0 0,0 -0.92,0.94 3.24,3.24 0,0 0,0 2.89,2.38 2.38,0 0,0 0.92,0.94 2.41,2.41 0,0 0,1.23 0.33A2.38,2.38 0,0 0,99.49 56.45Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M105.05,57.61a1.91,1.91 0,0 1,-0.62 -0.38,1.63 1.63,0 0,1 -0.42,-0.62 2.36,2.36 0,0 1,-0.14 -0.85V51.57h-1.25V50.5h1.25v-2h1.19v2h1.73v1.07h-1.73v3.89a1.36,1.36 0,0 0,0.22 0.87,1 1,0 0,0 0.77,0.31 1.48,1.48 0,0 0,0.79 -0.24v1.16a1.84,1.84 0,0 1,-0.43 0.15,4 4,0 0,1 -0.55,0A2.38,2.38 0,0 1,105.05 57.61Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M109,57.32a2.94,2.94 0,0 1,-1.09 -1.38l1.06,-0.48a2.15,2.15 0,0 0,0.79 1,2.08 2.08,0 0,0 1.16,0.35 2.3,2.3 0,0 0,1.15 -0.27,0.88 0.88,0 0,0 0.47,-0.78 0.83,0.83 0,0 0,-0.38 -0.72,3.52 3.52,0 0,0 -1.19,-0.47l-0.86,-0.23a3,3 0,0 1,-1.4 -0.71,1.68 1.68,0 0,1 -0.55,-1.3 1.71,1.71 0,0 1,0.37 -1.09,2.45 2.45,0 0,1 1,-0.72 3.63,3.63 0,0 1,3 0.16,2.28 2.28,0 0,1 1,1.13l-1,0.48a1.73,1.73 0,0 0,-1.7 -1,2 2,0 0,0 -1,0.28 0.8,0.8 0,0 0,-0.44 0.69,0.81 0.81,0 0,0 0.31,0.64 2.72,2.72 0,0 0,0.93 0.4l1,0.26a3.4,3.4 0,0 1,1.58 0.79,1.72 1.72,0 0,1 0.54,1.28 1.88,1.88 0,0 1,-0.38 1.16,2.33 2.33,0 0,1 -1,0.76 3.68,3.68 0,0 1,-1.43 0.27A3.25,3.25 0,0 1,109 57.32Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M114.87,50.5L116,50.5v1.06h0a2.57,2.57 0,0 1,1 -0.92,2.86 2.86,0 0,1 1.46,-0.37 3.17,3.17 0,0 1,1.73 0.49,3.4 3.4,0 0,1 1.24,1.36 4.54,4.54 0,0 1,0 3.9,3.44 3.44,0 0,1 -1.24,1.35 3.17,3.17 0,0 1,-1.73 0.49,2.86 2.86,0 0,1 -1.46,-0.37 2.63,2.63 0,0 1,-1 -0.91h0l0,1v3.1h-1.19ZM119.52,56.44a2.36,2.36 0,0 0,0.87 -0.95,3.24 3.24,0 0,0 0,-2.85 2.45,2.45 0,0 0,-0.87 -1,2.2 2.2,0 0,0 -2.32,0 2.38,2.38 0,0 0,-0.87 1,3.33 3.33,0 0,0 0,2.85 2.29,2.29 0,0 0,0.87 0.95,2.15 2.15,0 0,0 2.32,0Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M124.7,57.35A3.45,3.45 0,0 1,123.39 56a4.14,4.14 0,0 1,0 -3.83,3.55 3.55,0 0,1 1.31,-1.38 3.82,3.82 0,0 1,3.78 0,3.55 3.55,0 0,1 1.31,1.38 4.14,4.14 0,0 1,0 3.83,3.45 3.45,0 0,1 -1.31,1.37 3.76,3.76 0,0 1,-3.78 0ZM127.82,56.45a2.4,2.4 0,0 0,0.9 -0.94,3.16 3.16,0 0,0 0,-2.89 2.43,2.43 0,0 0,-3.36 -0.94,2.45 2.45,0 0,0 -0.92,0.94 3.24,3.24 0,0 0,0 2.89,2.45 2.45,0 0,0 0.92,0.94 2.46,2.46 0,0 0,2.46 0Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M133.37,57.61a2,2 0,0 1,-0.62 -0.38,1.63 1.63,0 0,1 -0.42,-0.62 2.36,2.36 0,0 1,-0.14 -0.85V51.57h-1.25V50.5h1.25v-2h1.19v2h1.74v1.07h-1.74v3.89a1.36,1.36 0,0 0,0.22 0.87,1 1,0 0,0 0.77,0.31 1.46,1.46 0,0 0,0.79 -0.24v1.16a1.69,1.69 0,0 1,-0.43 0.15,3.9 3.9,0 0,1 -0.55,0A2.38,2.38 0,0 1,133.37 57.61Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M76,41l-40.48,12.48l57,57l26.64,-26.39l-43.16,-43.09z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startY="40.22"
|
||||
android:startX="48.78"
|
||||
android:endY="97.35"
|
||||
android:endX="105.9"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#19000000"/>
|
||||
<item android:offset="0.7" android:color="#00000000"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M55.3,41a12,12 0,1 0,0 8H64v8h8V49h4V41ZM44,49a4,4 0,1 1,4 -4A4,4 0,0 1,44 49Z"
|
||||
android:fillColor="#c6ff00"/>
|
||||
</vector>
|
||||
BIN
mobile/src/main/res/mipmap-hdpi/banner.png
Executable file
BIN
mobile/src/main/res/mipmap-hdpi/banner.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
BIN
mobile/src/main/res/mipmap-mdpi/banner.png
Executable file
BIN
mobile/src/main/res/mipmap-mdpi/banner.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
BIN
mobile/src/main/res/mipmap-xhdpi/banner.png
Executable file
BIN
mobile/src/main/res/mipmap-xhdpi/banner.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
BIN
mobile/src/main/res/mipmap-xxhdpi/banner.png
Executable file
BIN
mobile/src/main/res/mipmap-xxhdpi/banner.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
BIN
mobile/src/main/res/mipmap-xxxhdpi/banner.png
Executable file
BIN
mobile/src/main/res/mipmap-xxxhdpi/banner.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in New Issue
Block a user