DirectoryViewpublic class DirectoryView extends android.widget.FrameLayout
Fields Summary |
---|
private float | mPosition | private int | mWidth |
Methods Summary |
---|
public float | getPosition()
return mPosition;
| protected void | onSizeChanged(int w, int h, int oldw, int oldh)
super.onSizeChanged(w, h, oldw, oldh);
mWidth = w;
setPosition(mPosition);
| public void | setPosition(float position)
mPosition = position;
setX((mWidth > 0) ? (mPosition * mWidth) : 0);
if (mPosition != 0) {
setTranslationZ(getResources().getDimensionPixelSize(R.dimen.dir_elevation));
} else {
setTranslationZ(0);
}
|
|