For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fi.matalamaki.util; | |
| import androidx.databinding.InverseMethod; | |
| /** | |
| * Data-binded values that are boxed(such as ones that come from Kotlin, | |
| * as there's no primitive types in Kotlin..) requires safe unboxing, | |
| * so there's no NPE(null pointer exception) when binding data. | |
| * | |
| * Theres a method for this safeUnbox inside Android SDK, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Setup CSRF safety for AJAX: | |
| $.ajaxPrefilter(function(options, originalOptions, jqXHR) { | |
| if (options.type.toUpperCase() === "POST") { | |
| // We need to add the verificationToken to all POSTs | |
| var token = $("input[name^=__RequestVerificationToken]").first(); | |
| if (!token.length) return; | |
| var tokenName = token.attr("name"); | |