navigator icon indicating copy to clipboard operation
navigator copied to clipboard

Inflation should have a hook which allows it to be async

Open Zhuinden opened this issue 7 years ago • 6 comments

Zhuinden avatar Mar 19 '17 21:03 Zhuinden

Done, but now Activity callbacks break because ViewController cannot be bound to a non-existent view (and therefore cannot be obtained from it): ViewController must be bound to StateKey inside a service-tree and not to View itself.

Binding controller to StateKey implies service-tree integration.

Zhuinden avatar Mar 21 '17 11:03 Zhuinden

Controllers are killed. This is under consideration.

Zhuinden avatar Mar 25 '17 14:03 Zhuinden

Temporarily, I totally forgot about it.

Maybe? If someone wants it...

Zhuinden avatar Mar 27 '17 21:03 Zhuinden

Do I understand correctly, that this could be used to preload views in the background before they are needed? Or rather just get the inflation off the main thread during navigating?

ehehhh avatar Mar 30 '17 10:03 ehehhh

Or rather just get the inflation off the main thread during navigating?

This, by allowing replacing the LayoutInflater.from(context).inflate(...) call in the DefaultStateChanger with new AsyncLayoutInflater(context).inflate() and make the default also be callback-based, and allow a LayoutInflationStrategy to be set.

Zhuinden avatar Mar 30 '17 10:03 Zhuinden

Would definitely be an interesting addition.

ehehhh avatar Mar 30 '17 10:03 ehehhh