use of carbon.widget.FrameLayout in project Carbon by ZieIony.
the class WidgetAnimationsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initToolbar();
final FloatingActionButton fab = findViewById(R.id.fab);
Button button = findViewById(R.id.button);
button.setOnClickListener(v -> fab.animateVisibility(fab.isVisible() ? View.INVISIBLE : View.VISIBLE));
final Button button2 = findViewById(R.id.button2);
Button button3 = findViewById(R.id.button3);
button3.setOnClickListener(v -> button2.animateVisibility(button2.isVisible() ? View.INVISIBLE : View.VISIBLE));
FrameLayout frame = findViewById(R.id.frame);
Button reveal = findViewById(R.id.reveal);
reveal.setOnClickListener(v -> {
float radius = (float) Math.sqrt((frame.getWidth() - 20) * (frame.getWidth() - 20) + (frame.getHeight() - 20) * (frame.getHeight() - 20));
frame.createCircularReveal(20, 20, 0, radius).start();
});
}
use of carbon.widget.FrameLayout in project Carbon by ZieIony.
the class DropDownMenu method dismiss.
@Override
public void dismiss() {
FrameLayout content = getContentView().findViewById(R.id.carbon_popupContainer);
content.animateVisibility(View.INVISIBLE).addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
DropDownMenu.super.dismiss();
}
});
}
use of carbon.widget.FrameLayout in project Carbon by ZieIony.
the class DropDownMenu method showImmediate.
public boolean showImmediate(View anchor) {
anchorView = anchor;
super.showAtLocation(anchor, Gravity.START | Gravity.TOP, 0, 0);
update();
FrameLayout content = getContentView().findViewById(R.id.carbon_popupContainer);
content.setVisibility(View.VISIBLE);
return true;
}
use of carbon.widget.FrameLayout in project Carbon by ZieIony.
the class DropDownMenu method show.
public boolean show(View anchor) {
anchorView = anchor;
super.showAtLocation(anchor, Gravity.START | Gravity.TOP, 0, 0);
update();
FrameLayout content = getContentView().findViewById(R.id.carbon_popupContainer);
content.animateVisibility(View.VISIBLE);
return true;
}
Aggregations