Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Anti-censorship
Pluggable Transports
Snowflake Mobile
Commits
3ad64196
Verified
Commit
3ad64196
authored
Aug 06, 2020
by
HashikD
Browse files
Renamed start_button to snowflake_switch
parent
d7df7f3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java
View file @
3ad64196
...
@@ -52,7 +52,7 @@ public class MainFragment extends Fragment {
...
@@ -52,7 +52,7 @@ public class MainFragment extends Fragment {
Bundle
savedInstanceState
)
{
Bundle
savedInstanceState
)
{
View
rootView
=
inflater
.
inflate
(
R
.
layout
.
fragment_main
,
container
,
false
);
View
rootView
=
inflater
.
inflate
(
R
.
layout
.
fragment_main
,
container
,
false
);
usersServedTV
=
rootView
.
findViewById
(
R
.
id
.
users_served
);
usersServedTV
=
rootView
.
findViewById
(
R
.
id
.
users_served
);
Switch
startButton
=
rootView
.
findViewById
(
R
.
id
.
s
tart_button
);
Switch
startButton
=
rootView
.
findViewById
(
R
.
id
.
s
nowflake_switch
);
startButton
.
setOnCheckedChangeListener
((
buttonView
,
isChecked
)
->
{
startButton
.
setOnCheckedChangeListener
((
buttonView
,
isChecked
)
->
{
if
(
callback
.
isServiceRunning
()
&&
!
isChecked
)
{
//Toggling the service.
if
(
callback
.
isServiceRunning
()
&&
!
isChecked
)
{
//Toggling the service.
...
...
app/src/main/res/layout/fragment_main.xml
View file @
3ad64196
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
tools:context=
".fragments.MainFragment"
>
tools:context=
".fragments.MainFragment"
>
<Switch
<Switch
android:id=
"@+id/s
tart_button
"
android:id=
"@+id/s
nowflake_switch
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentStart=
"true"
android:layout_alignParentStart=
"true"
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
android:id=
"@+id/users_served"
android:id=
"@+id/users_served"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/s
tart_button
"
android:layout_below=
"@id/s
nowflake_switch
"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:fontFamily=
"@font/source_code_pro"
android:fontFamily=
"@font/source_code_pro"
android:gravity=
"center"
android:gravity=
"center"
...
...
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