import android.widget.FrameLayout;
public class SlidingAroundFrameLayout extends FrameLayout {
private boolean isLeftOut = false;
private boolean isRightOut = false;
public enum TypeEnum {
LEFT,
RIGHT,
}
public SlidingAroundFrameLayout(Context context) {
super(context, null);
}
public SlidingAroundFrameLayout(Context context, AttributeSet attrs) {
super(context, attrs, 0);
}
public SlidingAroundFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public void setTranslateAnimation(TypeEnum type) {
TranslateAnimation ta;
if (type == TypeEnum.LEFT) {
if (isLeftOut){
return;
}
isLeftOut = true;
isRightOut = false;
this.setClickable(true);
ta