mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-21 21:01:43 +08:00
一些代码细节调整
This commit is contained in:
parent
31922af8f2
commit
2cd9394ca4
@ -175,7 +175,6 @@ public class DynamicLayoutInflater {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public View inflate(Node node, @Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View view = doInflation(node, parent, attachToParent);
|
||||
if (view != null && view instanceof ShouldCallOnFinishInflate) {
|
||||
|
||||
@ -73,15 +73,12 @@ public class SpinnerInflater extends BaseViewInflater<Spinner> {
|
||||
@Nullable
|
||||
@Override
|
||||
public ViewCreator<Spinner> getCreator() {
|
||||
return new ViewCreator<Spinner>() {
|
||||
@Override
|
||||
public Spinner create(Context context, Map<String, String> attrs) {
|
||||
String mode = attrs.remove("android:spinnerMode");
|
||||
if (mode == null) {
|
||||
return new Spinner(context);
|
||||
}
|
||||
return new Spinner(context, SPINNER_MODES.get(mode));
|
||||
return (context, attrs) -> {
|
||||
String mode = attrs.remove("android:spinnerMode");
|
||||
if (mode == null) {
|
||||
return new Spinner(context);
|
||||
}
|
||||
return new Spinner(context, SPINNER_MODES.get(mode));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user