Java Code Examples for android.view.TextureView#setTranslationY()

The following examples show how to use android.view.TextureView#setTranslationY() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EmbedBottomSheet.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example 2
Source File: EmbedBottomSheet.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example 3
Source File: EmbedBottomSheet.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example 4
Source File: EmbedBottomSheet.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}