Back to project page FMdroid.
The source code is released under:
Apache License
If you think the Android project FMdroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.doodeec.filemanager.UIComponents; /*from w w w . ja v a 2s . com*/ import android.content.Context; import android.util.AttributeSet; import android.widget.LinearLayout; /** * Created by Dusan Doodeec Bartos on 4.10.2014. * <p/> * Component used for animating fragment transactions */ @SuppressWarnings("unused") public class SlidingFrameLayout extends LinearLayout { private static final String TAG = SlidingFrameLayout.class.getName(); public SlidingFrameLayout(Context context) { super(context); } public SlidingFrameLayout(Context context, AttributeSet attrs) { super(context, attrs); } public float getXFraction() { int width = getWidth(); return (width == 0) ? 0 : getX() / (float) width; } public void setXFraction(float xFraction) { int width = getWidth(); setX((width > 0) ? (xFraction * width) : 0); } }