This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bmutinda.com.androidutils.libs; | |
import android.view.MotionEvent; | |
import android.view.View; | |
/** | |
* Created by Mutinda Boniface on 7/5/2015. | |
*/ | |
public class SwipeEvents implements View.OnTouchListener { | |
private SwipeCallback swipeCallback; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.cnii.layoutloader.ui; | |
import android.content.Context; | |
import android.support.v4.view.ViewPager; | |
import android.util.AttributeSet; | |
import android.view.View; | |
/** | |
* Special thanks to Daniel López Lacalle for his response | |
* (http://stackoverflow.com/questions/8394681/android-i-am-unable-to-have-viewpager-wrap-content/20784791#20784791) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FragmentObserver extends Observable { | |
@Override | |
public void notifyObservers() { | |
setChanged(); // Set the changed flag to true, otherwise observers won't be notified. | |
super.notifyObservers(); | |
} | |
} |