TransitionDrawable doesn't account for padding?
问题 I tried the accepted solution posted here, but it appears to ignore padding. When the second view (in this case a button) displays, it's much smaller than the original which has padding. Is there a workaround for that? Thanks 回答1: Yes, TransitionDrawable extends from LayerDrawable which ignores the padding. This is the getPadding() method in the base Android code, which gets rid of anything you specified: @Override public boolean getPadding(Rect padding) { // Arbitrarily get the padding from