一些代码细节调整
This commit is contained in:
@@ -175,7 +175,6 @@ public class DynamicLayoutInflater {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public View inflate(Node node, @Nullable ViewGroup parent, boolean attachToParent) {
|
public View inflate(Node node, @Nullable ViewGroup parent, boolean attachToParent) {
|
||||||
View view = doInflation(node, parent, attachToParent);
|
View view = doInflation(node, parent, attachToParent);
|
||||||
if (view != null && view instanceof ShouldCallOnFinishInflate) {
|
if (view != null && view instanceof ShouldCallOnFinishInflate) {
|
||||||
|
|||||||
@@ -73,15 +73,12 @@ public class SpinnerInflater extends BaseViewInflater<Spinner> {
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public ViewCreator<Spinner> getCreator() {
|
public ViewCreator<Spinner> getCreator() {
|
||||||
return new ViewCreator<Spinner>() {
|
return (context, attrs) -> {
|
||||||
@Override
|
String mode = attrs.remove("android:spinnerMode");
|
||||||
public Spinner create(Context context, Map<String, String> attrs) {
|
if (mode == null) {
|
||||||
String mode = attrs.remove("android:spinnerMode");
|
return new Spinner(context);
|
||||||
if (mode == null) {
|
|
||||||
return new Spinner(context);
|
|
||||||
}
|
|
||||||
return new Spinner(context, SPINNER_MODES.get(mode));
|
|
||||||
}
|
}
|
||||||
|
return new Spinner(context, SPINNER_MODES.get(mode));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user