File tree Expand file tree Collapse file tree 3 files changed +24
-7
lines changed
core/src/main/java/io/snabble/sdk
ui/src/main/java/io/snabble/sdk/ui/utils Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 11@file:JvmName(" DatabaseUtils" )
22package io.snabble.sdk
33
4- import androidx.annotation.RestrictTo
5-
64@JvmName(" bindArgs" )
7- @RestrictTo(RestrictTo .Scope .LIBRARY )
8- internal fun String.bindSqlArgs (args : Array <String >? ): String {
5+ /* *
6+ * Binds the strings in args to ocurrences of '?' in a sql string
7+ */
8+ fun String.bindSqlArgs (args : Array <String >? ): String {
99 if (args == null ) {
1010 return this
1111 }
Original file line number Diff line number Diff line change @@ -195,8 +195,10 @@ class UserPreferences internal constructor(context: Context) {
195195 .apply ()
196196 }
197197
198-
199- internal var consentStatus: ConsentStatus
198+ /* *
199+ * The current consent status
200+ */
201+ var consentStatus: ConsentStatus
200202 @RestrictTo(RestrictTo .Scope .LIBRARY )
201203 get() {
202204 val s = sharedPreferences.getString(SHARED_PREFERENCES_BIRTHDAY , null )
@@ -213,7 +215,10 @@ class UserPreferences internal constructor(context: Context) {
213215 .putString(SHARED_PREFERENCES_CONSENT_STATUS , consent.name)
214216 .apply ()
215217
216- internal var consentVersion: String?
218+ /* *
219+ * The current accepted consent version
220+ */
221+ var consentVersion: String?
217222 @RestrictTo(RestrictTo .Scope .LIBRARY )
218223 get() = sharedPreferences.getString(SHARED_PREFERENCES_CONSENT_VERSION , null )
219224 @RestrictTo(RestrictTo .Scope .LIBRARY )
Original file line number Diff line number Diff line change @@ -59,6 +59,18 @@ fun View.setOneShotClickListener(callback: () -> Unit) =
5959 }
6060 )
6161
62+ inline var View .marginTop: Int
63+ get() = (layoutParams as ? ViewGroup .MarginLayoutParams )?.topMargin ? : 0
64+ set(value) {
65+ (layoutParams as ? ViewGroup .MarginLayoutParams )?.topMargin = value
66+ }
67+
68+ inline var View .marginBottom: Int
69+ get() = (layoutParams as ? ViewGroup .MarginLayoutParams )?.bottomMargin ? : 0
70+ set(value) {
71+ (layoutParams as ? ViewGroup .MarginLayoutParams )?.bottomMargin = value
72+ }
73+
6274inline val View .idName: String
6375 get() = if (id == - 1 ) " null" else context.resources.getResourceName(id)
6476
You can’t perform that action at this time.
0 commit comments