requestLayout when set different-size ImageTexture in ImageView
This commit is contained in:
1 parent
453a56aa23
commit
9561fcf662
1 file changed
+7
@@ -208,6 +208,9 @@ public class ImageView extends GLView implements ImageTexture.Callback {
|
||||
mImageTexture.setCallback(null);
|
||||
}
|
||||
|
||||
int oldTextureWidth = mTextureWidth;
|
||||
int oldTextureHeight = mTextureHeight;
|
||||
|
||||
mImageTexture = imageTexture;
|
||||
|
||||
if (imageTexture != null) {
|
||||
@@ -234,6 +237,10 @@ public class ImageView extends GLView implements ImageTexture.Callback {
|
||||
|
||||
mScaleOffsetDirty = true;
|
||||
mPositionInRootDirty = true;
|
||||
|
||||
if (oldTextureWidth != mTextureWidth || oldTextureHeight != mTextureHeight) {
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
public ImageTexture getImageTexture() {
|
||||
|
||||
Reference in new issue
Block a user