Cleanup Databindings declarations + added missing proguard rule
This commit is contained in:
parent
0aca41b927
commit
3334983707
2 changed files with 8 additions and 20 deletions
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
|
@ -22,4 +22,5 @@
|
||||||
|
|
||||||
-keep public class * extends androidx.fragment.app.Fragment { *; }
|
-keep public class * extends androidx.fragment.app.Fragment { *; }
|
||||||
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
||||||
-keep class com.bumptech.glide.GeneratedAppGlideModuleImpl
|
-keep class com.bumptech.glide.GeneratedAppGlideModuleImpl
|
||||||
|
-dontwarn com.google.errorprone.annotations.Immutable
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.utils
|
package org.linphone.utils
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
|
@ -86,16 +87,6 @@ fun TextView.setTypeface(typeface: Int) {
|
||||||
this.setTypeface(null, typeface)
|
this.setTypeface(null, typeface)
|
||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter("android:layout_height")
|
|
||||||
fun View.setLayoutHeight(dimension: Float) {
|
|
||||||
this.layoutParams.height = dimension.toInt()
|
|
||||||
}
|
|
||||||
|
|
||||||
@BindingAdapter("android:maxHeight")
|
|
||||||
fun ImageView.setImageMaxHeight(dimension: Float) {
|
|
||||||
this.maxHeight = dimension.toInt()
|
|
||||||
}
|
|
||||||
|
|
||||||
@BindingAdapter("android:layout_size")
|
@BindingAdapter("android:layout_size")
|
||||||
fun View.setLayoutSize(dimension: Float) {
|
fun View.setLayoutSize(dimension: Float) {
|
||||||
if (dimension == 0f) return
|
if (dimension == 0f) return
|
||||||
|
@ -429,6 +420,7 @@ fun addPrefixEditTextValidation(editText: EditText, enabled: Boolean) {
|
||||||
|
|
||||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
|
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||||
if (s == null || s.isEmpty() || !s.startsWith("+")) {
|
if (s == null || s.isEmpty() || !s.startsWith("+")) {
|
||||||
editText.setText("+$s")
|
editText.setText("+$s")
|
||||||
|
@ -558,7 +550,7 @@ fun setEditTextErrorListener(editText: EditText, attrChange: InverseBindingListe
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter("app:max")
|
@BindingAdapter("max")
|
||||||
fun VoiceRecordProgressBar.setProgressMax(max: Int) {
|
fun VoiceRecordProgressBar.setProgressMax(max: Int) {
|
||||||
setMax(max)
|
setMax(max)
|
||||||
}
|
}
|
||||||
|
@ -573,7 +565,7 @@ fun VoiceRecordProgressBar.setSecProgress(progress: Int) {
|
||||||
setSecondaryProgress(progress)
|
setSecondaryProgress(progress)
|
||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter("app:secondaryProgressTint")
|
@BindingAdapter("secondaryProgressTint")
|
||||||
fun VoiceRecordProgressBar.setSecProgressTint(color: Int) {
|
fun VoiceRecordProgressBar.setSecProgressTint(color: Int) {
|
||||||
setSecondaryProgressTint(color)
|
setSecondaryProgressTint(color)
|
||||||
}
|
}
|
||||||
|
@ -635,17 +627,12 @@ fun setParticipantTextureView(
|
||||||
conferenceParticipantData.setTextureView(textureView)
|
conferenceParticipantData.setTextureView(textureView)
|
||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter("app:dotCount")
|
@BindingAdapter("itemCount")
|
||||||
fun HorizontalScrollDotsView.setDots(count: Int) {
|
|
||||||
setDotCount(count)
|
|
||||||
}
|
|
||||||
|
|
||||||
@BindingAdapter("app:itemCount")
|
|
||||||
fun HorizontalScrollDotsView.setItems(count: Int) {
|
fun HorizontalScrollDotsView.setItems(count: Int) {
|
||||||
setItemCount(count)
|
setItemCount(count)
|
||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter("app:selectedDot")
|
@BindingAdapter("selectedDot")
|
||||||
fun HorizontalScrollDotsView.setSelectedIndex(index: Int) {
|
fun HorizontalScrollDotsView.setSelectedIndex(index: Int) {
|
||||||
setSelectedDot(index)
|
setSelectedDot(index)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue