Archived
Added iOS colours for user customisation, "No internet available" snackbar now tinted red
This commit is contained in:
@@ -11,6 +11,7 @@ import android.preference.PreferenceManager
|
||||
import android.view.View
|
||||
import android.widget.RemoteViews
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import org.jsoup.Jsoup
|
||||
@@ -41,7 +42,7 @@ class DataFetcher(isplan: Boolean, ismenu: Boolean, isjobservice: Boolean, conte
|
||||
private val edit = prefs.edit()
|
||||
private var currentTime = ""
|
||||
private var currentFoodTime = ""
|
||||
private val substUrl = "https://djd4rkn355.github.io/subst.html"
|
||||
private val substUrl = "https://djd4rkn355.github.io/subst_test.html"
|
||||
private val foodUrl = "https://djd4rkn355.github.io/food.html"
|
||||
|
||||
override fun doInBackground(vararg params: Void?): Void? {
|
||||
@@ -224,7 +225,7 @@ class DataFetcher(isplan: Boolean, ismenu: Boolean, isjobservice: Boolean, conte
|
||||
} catch (e: Exception) {
|
||||
mView?.let { v: View ->
|
||||
val snackBarView = v.findViewById<View>(R.id.coordination)
|
||||
Snackbar.make(snackBarView, mContext.getString(R.string.noInternet), Snackbar.LENGTH_LONG).show()
|
||||
Snackbar.make(snackBarView, mContext.getString(R.string.noInternet), Snackbar.LENGTH_LONG).setBackgroundTint(ContextCompat.getColor(mContext, R.color.colorError)).show()
|
||||
}
|
||||
}
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user