use of io.codetail.animation.ViewRevealManager in project CircularReveal by ozodrukh.
the class MainActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
final ViewRevealManager revealManager = new ViewRevealManager();
final SpringViewAnimatorManager springManager = new SpringViewAnimatorManager();
springManager.setDampingRatio(SpringForce.DAMPING_RATIO_NO_BOUNCY);
springManager.setStiffness(SpringForce.STIFFNESS_LOW);
parent.setViewRevealManager(revealManager);
settingsView.addSwitch("Enable Spring", false, new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
parent.setViewRevealManager(isChecked ? springManager : revealManager);
}
});
settingsView.setAnimatorManager(springManager);
final BottomSheetBehavior behavior = BottomSheetBehavior.from(settingsView);
behavior.setPeekHeight(getResources().getDimensionPixelSize(R.dimen.bottom_peek_height));
behavior.setSkipCollapsed(false);
behavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
}
use of io.codetail.animation.ViewRevealManager in project CircularReveal by ozodrukh.
the class RadialTransformationActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sample_2);
ButterKnife.bind(this);
Picasso.with(this).load("http://camp-campbell.com/wp-content/uploads/2014/09/847187872-san-francisco.jpg").resizeDimen(R.dimen.radial_card_width, R.dimen.radial_card_height).centerCrop().into(sanFranciscoView);
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
videoView.setVideoURI(Uri.parse(VIDEO_URL));
videoView.start();
final GestureDetector detector = new GestureDetector(this, tapDetector);
for (int i = 0; i < stack.getChildCount(); i++) {
View view = stack.getChildAt(i);
view.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return detector.onTouchEvent(event);
}
});
}
final ViewRevealManager revealManager = new ViewRevealManager();
final SpringViewAnimatorManager springManager = new SpringViewAnimatorManager();
springManager.setDampingRatio(SpringForce.DAMPING_RATIO_NO_BOUNCY);
springManager.setStiffness(SpringForce.STIFFNESS_LOW);
stack.setViewRevealManager(revealManager);
settingsView.addSwitch("Enable Spring", false, new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
stack.setViewRevealManager(isChecked ? springManager : revealManager);
}
});
settingsView.setAnimatorManager(springManager);
final BottomSheetBehavior behavior = BottomSheetBehavior.from(settingsView);
behavior.setPeekHeight(getResources().getDimensionPixelSize(R.dimen.bottom_peek_height));
behavior.setSkipCollapsed(false);
behavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
}
Aggregations