android.view.TextureView#setTranslationY ( )源码实例Demo

下面列出了android.view.TextureView#setTranslationY ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: TelePlus-Android   文件: EmbedBottomSheet.java
public void updateTextureViewPosition() {
    View view = videoView.getAspectRatioView();
    view.getLocationInWindow(position);
    position[0] -= getLeftInset();

    if (!videoView.isInline() && !animationInProgress) {
        TextureView textureView = videoView.getTextureView();
        textureView.setTranslationX(position[0]);
        textureView.setTranslationY(position[1]);
        View textureImageView = videoView.getTextureImageView();
        if (textureImageView != null) {
            textureImageView.setTranslationX(position[0]);
            textureImageView.setTranslationY(position[1]);
        }
    }
    View controlsView = videoView.getControlsView();
    if (controlsView.getParent() == container) {
        controlsView.setTranslationY(position[1]);
    } else {
        controlsView.setTranslationY(0);
    }
}
 
源代码2 项目: TelePlus-Android   文件: EmbedBottomSheet.java
public void updateTextureViewPosition() {
    View view = videoView.getAspectRatioView();
    view.getLocationInWindow(position);
    position[0] -= getLeftInset();

    if (!videoView.isInline() && !animationInProgress) {
        TextureView textureView = videoView.getTextureView();
        textureView.setTranslationX(position[0]);
        textureView.setTranslationY(position[1]);
        View textureImageView = videoView.getTextureImageView();
        if (textureImageView != null) {
            textureImageView.setTranslationX(position[0]);
            textureImageView.setTranslationY(position[1]);
        }
    }
    View controlsView = videoView.getControlsView();
    if (controlsView.getParent() == container) {
        controlsView.setTranslationY(position[1]);
    } else {
        controlsView.setTranslationY(0);
    }
}
 
源代码3 项目: Telegram-FOSS   文件: EmbedBottomSheet.java
public void updateTextureViewPosition() {
    View view = videoView.getAspectRatioView();
    view.getLocationInWindow(position);
    position[0] -= getLeftInset();

    if (!videoView.isInline() && !animationInProgress) {
        TextureView textureView = videoView.getTextureView();
        textureView.setTranslationX(position[0]);
        textureView.setTranslationY(position[1]);
        View textureImageView = videoView.getTextureImageView();
        if (textureImageView != null) {
            textureImageView.setTranslationX(position[0]);
            textureImageView.setTranslationY(position[1]);
        }
    }
    View controlsView = videoView.getControlsView();
    if (controlsView.getParent() == container) {
        controlsView.setTranslationY(position[1]);
    } else {
        controlsView.setTranslationY(0);
    }
}
 
源代码4 项目: Telegram   文件: EmbedBottomSheet.java
public void updateTextureViewPosition() {
    View view = videoView.getAspectRatioView();
    view.getLocationInWindow(position);
    position[0] -= getLeftInset();

    if (!videoView.isInline() && !animationInProgress) {
        TextureView textureView = videoView.getTextureView();
        textureView.setTranslationX(position[0]);
        textureView.setTranslationY(position[1]);
        View textureImageView = videoView.getTextureImageView();
        if (textureImageView != null) {
            textureImageView.setTranslationX(position[0]);
            textureImageView.setTranslationY(position[1]);
        }
    }
    View controlsView = videoView.getControlsView();
    if (controlsView.getParent() == container) {
        controlsView.setTranslationY(position[1]);
    } else {
        controlsView.setTranslationY(0);
    }
}