prettify the samples.
This commit is contained in:
parent
19079c76cb
commit
9ca31ac50f
|
|
@ -59,6 +59,17 @@ public class MyActivity extends Activity {
|
|||
}
|
||||
});
|
||||
|
||||
sample1.addRevealListener(R.id.starbott, new SwipeLayout.OnRevealListener() {
|
||||
@Override
|
||||
public void onReveal(View child, SwipeLayout.DragEdge edge, float fraction, int distance) {
|
||||
View star = child.findViewById(R.id.star);
|
||||
float d = child.getHeight() / 2 - star.getHeight() / 2;
|
||||
ViewHelper.setTranslationY(star, d * fraction);
|
||||
ViewHelper.setScaleX(star, fraction + 0.6f);
|
||||
ViewHelper.setScaleY(star, fraction + 0.6f);
|
||||
}
|
||||
});
|
||||
|
||||
//sample2
|
||||
|
||||
sample2 = (SwipeLayout) findViewById(R.id.sample2);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
android:layout_height="match_parent">
|
||||
<RelativeLayout
|
||||
android:id="@+id/bottom_wrapper_child1"
|
||||
android:background="#BDBEC2"
|
||||
android:background="#4C535B"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ImageView
|
||||
|
|
|
|||
Loading…
Reference in New Issue