Java Code Examples for android.view.View.OnLayoutChangeListener

The following are Jave code examples for showing how to use OnLayoutChangeListener of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: chromium-for-android-56-debug-video   File: SwipableOverlayView.java   Source Code and License Vote up 6 votes
/**
 * Creates a listener that is used only to animate the View coming onto the screen.
 * @return The SimpleOnGestureListener that will monitor the View.
 */
private View.OnLayoutChangeListener createLayoutChangeListener() {
    return new View.OnLayoutChangeListener() {
        @Override
        public void onLayoutChange(View v, int left, int top, int right, int bottom,
                int oldLeft, int oldTop, int oldRight, int oldBottom) {
            removeOnLayoutChangeListener(mLayoutChangeListener);

            // Animate the View coming in from the bottom of the screen.
            setTranslationY(mTotalHeight);
            mIsBeingDisplayedForFirstTime = true;
            createVerticalSnapAnimation(true);
            mCurrentAnimation.start();
        }
    };
}
 
Example 2
Project: leoapp-sources   File: InfoButton.java   Source Code and License Vote up 2 votes
/**
 * Delegiert von android.widget.Button
 *
 * @param listener siehe {@link Button}
 */
public void addOnLayoutChangeListener(View.OnLayoutChangeListener listener) {
    b.addOnLayoutChangeListener(listener);
}
 
Example 3
Project: leoapp-sources   File: InfoButton.java   Source Code and License Vote up 2 votes
/**
 * Delegiert von android.widget.Button
 *
 * @param listener siehe {@link Button}
 */
public void removeOnLayoutChangeListener(View.OnLayoutChangeListener listener) {
    b.removeOnLayoutChangeListener(listener);
}