Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PublicAndroidApps
Nebulo
Commits
512eff4b
Commit
512eff4b
authored
Jun 18, 2019
by
Daniel Wolf
Browse files
Added a button to the main layout which opens the speed test activity
parent
f75c6347
Pipeline
#4763
passed with stage
in 36 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
app/src/main/AndroidManifest.xml
View file @
512eff4b
...
@@ -170,6 +170,7 @@
...
@@ -170,6 +170,7 @@
<action
android:name=
"com.twofortyfouram.locale.intent.action.EDIT_SETTING"
/>
<action
android:name=
"com.twofortyfouram.locale.intent.action.EDIT_SETTING"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
".activity.SpeedTestActivity"
/>
<service
<service
android:name=
".service.DnsVpnService"
android:name=
".service.DnsVpnService"
...
...
app/src/main/java/com/frostnerd/smokescreen/activity/SpeedTestActivity.kt
0 → 100644
View file @
512eff4b
package
com.frostnerd.smokescreen.activity
import
com.frostnerd.lifecyclemanagement.BaseActivity
/*
* Copyright (C) 2019 Daniel Wolf (Ch4t4r)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* You can contact the developer at daniel.wolf@frostnerd.com.
*/
class
SpeedTestActivity
:
BaseActivity
()
{
override
fun
getConfiguration
():
Configuration
{
return
Configuration
.
withDefaults
()
}
}
\ No newline at end of file
app/src/main/java/com/frostnerd/smokescreen/fragment/MainFragment.kt
View file @
512eff4b
...
@@ -18,6 +18,7 @@ import androidx.fragment.app.Fragment
...
@@ -18,6 +18,7 @@ import androidx.fragment.app.Fragment
import
com.frostnerd.dnstunnelproxy.DnsServerInformation
import
com.frostnerd.dnstunnelproxy.DnsServerInformation
import
com.frostnerd.general.service.isServiceRunning
import
com.frostnerd.general.service.isServiceRunning
import
com.frostnerd.smokescreen.R
import
com.frostnerd.smokescreen.R
import
com.frostnerd.smokescreen.activity.SpeedTestActivity
import
com.frostnerd.smokescreen.dialog.ServerChoosalDialog
import
com.frostnerd.smokescreen.dialog.ServerChoosalDialog
import
com.frostnerd.smokescreen.getPreferences
import
com.frostnerd.smokescreen.getPreferences
import
com.frostnerd.smokescreen.registerLocalReceiver
import
com.frostnerd.smokescreen.registerLocalReceiver
...
@@ -77,6 +78,9 @@ class MainFragment : Fragment() {
...
@@ -77,6 +78,9 @@ class MainFragment : Fragment() {
}
}
updateVpnIndicators
()
updateVpnIndicators
()
}
}
speedTest
.
setOnClickListener
{
startActivity
(
Intent
(
context
!!
,
SpeedTestActivity
::
class
.
java
))
}
vpnStateReceiver
=
requireContext
().
registerLocalReceiver
(
vpnStateReceiver
=
requireContext
().
registerLocalReceiver
(
listOf
(
listOf
(
DnsVpnService
.
BROADCAST_VPN_ACTIVE
,
DnsVpnService
.
BROADCAST_VPN_ACTIVE
,
...
...
app/src/main/res/drawable/ic_wifi.xml
0 → 100644
View file @
512eff4b
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M1,9l2,2c4.97,-4.97 13.03,-4.97 18,0l2,-2C16.93,2.93 7.08,2.93 1,9zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0zM5,13l2,2c2.76,-2.76 7.24,-2.76 10,0l2,-2C15.14,9.14 8.87,9.14 5,13z"
/>
</vector>
app/src/main/res/layout/fragment_main.xml
View file @
512eff4b
...
@@ -54,6 +54,17 @@
...
@@ -54,6 +54,17 @@
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
>
<ImageButton
android:id=
"@+id/speedTest"
android:src=
"@drawable/ic_wifi"
android:background=
"@drawable/main_roundbuttons"
android:tint=
"?android:attr/textColor"
android:layout_width=
"48dp"
android:layout_toStartOf=
"@id/serverButton"
android:layout_marginEnd=
"8dp"
android:contentDescription=
"@string/contentdescription_main_servericon"
android:layout_height=
"48dp"
/>
<ImageButton
<ImageButton
android:id=
"@+id/serverButton"
android:id=
"@+id/serverButton"
android:src=
"@drawable/ic_main_server"
android:src=
"@drawable/ic_main_server"
...
@@ -70,7 +81,7 @@
...
@@ -70,7 +81,7 @@
android:id=
"@+id/startButton"
android:id=
"@+id/startButton"
android:background=
"@drawable/main_roundbuttons"
android:background=
"@drawable/main_roundbuttons"
android:text=
"Start"
android:text=
"Start"
android:layout_toStartOf=
"@id/s
erverButton
"
android:layout_toStartOf=
"@id/s
peedTest
"
android:layout_marginEnd=
"8dp"
android:layout_marginEnd=
"8dp"
style=
"@style/Base.Widget.AppCompat.Button.Borderless.Colored"
style=
"@style/Base.Widget.AppCompat.Button.Borderless.Colored"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment