Java Code Examples for com.nineoldandroids.view.ViewHelper#getAlpha()

The following examples show how to use com.nineoldandroids.view.ViewHelper#getAlpha() . 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: MainActivity.java    From TestChat with Apache License 2.0 5 votes vote down vote up
@Override
    public void onCloseMenu() {
//                当侧滑完全关闭的时候调用
        if (ViewHelper.getAlpha(bg) != 0) {
            ViewHelper.setAlpha(bg, 0);
        }
        if (ViewHelper.getAlpha(icon_1) != 1) {
            ViewHelper.setAlpha(icon_1, 1);
        }
    }
 
Example 2
Source File: MainActivity.java    From TestChat with Apache License 2.0 5 votes vote down vote up
@Override
public void onOpenMenu() {
    if (ViewHelper.getAlpha(bg) != 1) {
        ViewHelper.setAlpha(bg, 1);
    }
    if (ViewHelper.getAlpha(icon_1) != 0) {
        ViewHelper.setAlpha(icon_1, 0);
    }
    //                当侧滑完全打开的时候调用
}
 
Example 3
Source File: SlidingUpBaseActivity.java    From Android-ObservableScrollView with Apache License 2.0 5 votes vote down vote up
private void changeToolbarTitleVisibility() {
    if (ViewHelper.getTranslationY(mInterceptionLayout) <= mIntersectionHeight) {
        if (ViewHelper.getAlpha(mToolbarTitle) != 1) {
            ViewPropertyAnimator.animate(mToolbarTitle).cancel();
            ViewPropertyAnimator.animate(mToolbarTitle).alpha(1).setDuration(200).start();
        }
    } else if (ViewHelper.getAlpha(mToolbarTitle) != 0) {
        ViewPropertyAnimator.animate(mToolbarTitle).cancel();
        ViewPropertyAnimator.animate(mToolbarTitle).alpha(0).setDuration(200).start();
    } else {
        ViewHelper.setAlpha(mToolbarTitle, 0);
    }
}
 
Example 4
Source File: HeaderHolder.java    From HollyViewPager with Apache License 2.0 4 votes vote down vote up
public boolean isEnabled() {
    return ViewHelper.getAlpha(view) != 0.5f;
}
 
Example 5
Source File: CardListView.java    From example with Apache License 2.0 4 votes vote down vote up
@Override
public Float get(View object) {
    return ViewHelper.getAlpha(object);
}
 
Example 6
Source File: CardGridView.java    From example with Apache License 2.0 4 votes vote down vote up
@Override
public Float get(View object) {
    return ViewHelper.getAlpha(object);
}