Polyfill to allow use on Android 21
This commit is contained in:
parent
9fa4b88784
commit
e65ee62cd3
|
@ -90,7 +90,7 @@ android {
|
|||
compileSdkVersion 29
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 24
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 42024
|
||||
versionName "2.10.3-beta"
|
||||
|
|
|
@ -26,7 +26,7 @@ import eu.siacs.conversations.R;
|
|||
|
||||
public class DialpadView extends ConstraintLayout implements View.OnClickListener {
|
||||
|
||||
protected java.util.function.Consumer<String> clickConsumer = null;
|
||||
protected Consumer<String> clickConsumer = null;
|
||||
|
||||
public DialpadView(Context context) {
|
||||
super(context);
|
||||
|
@ -43,7 +43,7 @@ public class DialpadView extends ConstraintLayout implements View.OnClickListene
|
|||
init();
|
||||
}
|
||||
|
||||
public void setClickConsumer(java.util.function.Consumer<String> clickConsumer) {
|
||||
public void setClickConsumer(Consumer<String> clickConsumer) {
|
||||
this.clickConsumer = clickConsumer;
|
||||
}
|
||||
|
||||
|
@ -72,4 +72,8 @@ public class DialpadView extends ConstraintLayout implements View.OnClickListene
|
|||
clickConsumer.accept(v.getTag().toString());
|
||||
}
|
||||
|
||||
// Based on java.util.function.Consumer to avoid Android 24 dependency
|
||||
public interface Consumer<T> {
|
||||
void accept(T t);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue