show an explanation toast at clicking a widget
This commit is contained in:
parent
93b46339cc
commit
4964e7a933
3 changed files with 8 additions and 2 deletions
|
@ -43,5 +43,5 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:28e3b108e7'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:28a2a4ad46'
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import android.widget.LinearLayout
|
|||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.simplemobiletools.commons.extensions.getProperTextColor
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.launcher.R
|
||||
import com.simplemobiletools.launcher.activities.SimpleActivity
|
||||
import com.simplemobiletools.launcher.helpers.WIDGET_LIST_ITEMS_HOLDER
|
||||
|
@ -85,6 +86,10 @@ class WidgetsAdapter(
|
|||
.load(widget.widgetPreviewImage)
|
||||
.fitCenter()
|
||||
.into(widgetPreview)
|
||||
|
||||
widgetPreview.setOnClickListener {
|
||||
activity.toast(R.string.touch_hold_widget)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<resources>
|
||||
<string name="app_name">Simple Launcher</string>
|
||||
<string name="app_launcher_name">Launcher</string>
|
||||
<string name="touch_hold_widget">Long press the widget and drag it on your home screen</string>
|
||||
<!--
|
||||
Haven't found some strings? There's more at
|
||||
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res
|
||||
-->
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue