view.updateLayoutParams { this.width = newWidth}Log.d(TAG, "oldWidth=${view.width}")view.doOnLayout { Log.d(TAG, "newWidth=${view.width}")}
Performs the given action when this view is laid out. If the view has been laid out and it has not requested a layout, the action will be performed straight away, otherwise the action will be performed after the view is next laid out.
Performs the given action when this view is next laid out.