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

The following examples show how to use com.nineoldandroids.view.ViewHelper#getAlpha() . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: TestChat   File: MainActivity.java    License: 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 Project: TestChat   File: MainActivity.java    License: 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
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 Project: HollyViewPager   File: HeaderHolder.java    License: Apache License 2.0 4 votes vote down vote up
public boolean isEnabled() {
    return ViewHelper.getAlpha(view) != 0.5f;
}
 
Example 5
Source Project: example   File: CardListView.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public Float get(View object) {
    return ViewHelper.getAlpha(object);
}
 
Example 6
Source Project: example   File: CardGridView.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public Float get(View object) {
    return ViewHelper.getAlpha(object);
}