This file contains hidden or 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
// WidgetApi.java | |
public interface WidgetApi { | |
@GET("/widget/{:id}") | |
void getWidget(@Path("id") int id, Callback<Widget> callback); | |
} | |
// MockRetrofitClient.java | |
public class MockRetrofitClient implements Client { | |
private int statusCode = 200; |
This file contains hidden or 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
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
public class FlipPageViewTransformer implements ViewPager.PageTransformer { | |
@Override | |
public void transformPage(View page, float position) { | |
float percentage = 1 - Math.abs(position); | |
page.setCameraDistance(12000); | |
setVisibility(page, position); | |
setTranslation(page); |