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
8b0142db
Commit
8b0142db
authored
Aug 08, 2019
by
Daniel Wolf
Browse files
Design improvements
parent
0428dc56
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/dialog/HostSourceRefreshDialog.kt
View file @
8b0142db
...
...
@@ -2,6 +2,7 @@ package com.frostnerd.smokescreen.dialog
import
android.content.Context
import
android.content.DialogInterface
import
android.widget.ArrayAdapter
import
androidx.annotation.Keep
import
androidx.appcompat.app.AlertDialog
import
com.frostnerd.smokescreen.R
...
...
@@ -46,7 +47,14 @@ class HostSourceRefreshDialog(context:Context,
view
.
refreshWifiOnly
.
isChecked
=
context
.
getPreferences
().
automaticHostRefreshWifiOnly
view
.
timeAmount
.
setText
(
context
.
getPreferences
().
automaticHostRefreshTimeAmount
.
toString
())
view
.
timeUnit
.
setSelection
(
context
.
getPreferences
().
automaticHostRefreshTimeUnit
.
ordinal
)
setButton
(
DialogInterface
.
BUTTON_NEUTRAL
,
context
.
getString
(
R
.
string
.
all_close
))
{
dialog
,
_
->
val
adapter
:
ArrayAdapter
<
CharSequence
>
=
ArrayAdapter
.
createFromResource
(
context
,
R
.
array
.
dialog_hostsourcerefresh_timeunits
,
R
.
layout
.
item_tasker_action_spinner_item
)
adapter
.
setDropDownViewResource
(
R
.
layout
.
item_tasker_action_spinner_dropdown_item
)
view
.
timeUnit
.
adapter
=
adapter
setButton
(
DialogInterface
.
BUTTON_NEUTRAL
,
context
.
getString
(
android
.
R
.
string
.
cancel
))
{
dialog
,
_
->
dialog
.
dismiss
()
}
setButton
(
DialogInterface
.
BUTTON_POSITIVE
,
context
.
getString
(
android
.
R
.
string
.
ok
))
{
dialog
,
_
->
...
...
app/src/main/res/layout/dialog_host_source_refresh.xml
View file @
8b0142db
...
...
@@ -26,6 +26,7 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_marginTop=
"12dp"
android:text=
"@string/dialog_hostsourcerefresh_refresh_every"
android:layout_height=
"wrap_content"
/>
...
...
@@ -55,8 +56,8 @@
android:layout_alignParentEnd=
"true"
android:layout_toEndOf=
"@id/timeAmountTil"
android:id=
"@+id/timeUnit"
android:layout_marginStart=
"8dp"
android:layout_alignBaseline=
"@id/timeAmountTil"
android:entries=
"@array/dialog_hostsourcerefresh_timeunits"
android:layout_height=
"wrap_content"
/>
<Button
...
...
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