Added iOS colours for user customisation, "No internet available" snackbar now tinted red

This commit is contained in:
Deniz Düzgören
2019-08-06 11:56:44 +02:00
parent 6ed3257ca1
commit f9cac0b123
7 changed files with 187 additions and 8 deletions
@@ -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