Java Code Examples for android.view.View.getZ()

The following are Jave code examples for showing how to use getZ() 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: Bigbang   File: TouchEventHandler.java   Source Code and License Vote up 7 votes
@Override
public int compare(View lhs, View rhs) {
    final float lz;
    if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
        lz = lhs.getZ();
    }else {
        lz = 0;
    }
    final float rz;
    if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
        rz = rhs.getZ();
    }else {
        rz = 0;
    }
    if (lz > rz) {
        return -1;
    } else if (lz < rz) {
        return 1;
    }
    return 0;
}
 
Example 2
Project: morphos   File: ViewDefault.java   Source Code and License Vote up 6 votes
public void updateView(View v) {
    if (v != null) {
        this.alpha = v.getAlpha();
        this.x = v.getX();
        this.y = v.getY();
        this.z = atLeastLollipop ? v.getZ() : 0;
        this.width = v.getWidth();
        this.height = v.getHeight();
        this.expansionScaleX = v.getScaleX();
        this.expansionScaleY = v.getScaleY();
        this.dispositionAngle = v.getRotation();
        this.dispositionAngleX = v.getRotationX();
        this.dispositionAngleY = v.getRotationY();
    }
}
 
Example 3
Project: letv   File: ViewCompatLollipop.java   Source Code and License Vote up 5 votes
public static float getZ(View view) {
    return view.getZ();
}
 
Example 4
Project: boohee_v5.6   File: ViewCompatLollipop.java   Source Code and License Vote up 5 votes
public static float getZ(View view) {
    return view.getZ();
}