use of carbon.widget.Button 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.Button in project Carbon by ZieIony.
the class ZOrderActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initToolbar();
final FrameLayout layout = findViewById(R.id.layout);
Button button = findViewById(R.id.button);
button.setOnClickListener(view -> {
((ShadowView) layout.getChildAt(0)).setElevation(getResources().getDimension(R.dimen.carbon_1dip) * (flag ? 2 : 3));
((ShadowView) layout.getChildAt(1)).setElevation(getResources().getDimension(R.dimen.carbon_1dip) * (flag ? 3 : 2));
flag = !flag;
layout.postInvalidate();
});
}
use of carbon.widget.Button in project Carbon by ZieIony.
the class EditTextMenu method initCopy.
public void initCopy(final MenuItem item) {
Button button = getContentView().findViewById(R.id.carbon_copy);
initMenuItem(item, button);
}
use of carbon.widget.Button in project Carbon by ZieIony.
the class EditTextMenu method initCut.
public void initCut(final MenuItem item) {
Button button = getContentView().findViewById(R.id.carbon_cut);
initMenuItem(item, button);
}
use of carbon.widget.Button in project Carbon by ZieIony.
the class EditTextMenu method initPaste.
public void initPaste(final MenuItem item) {
Button button = getContentView().findViewById(R.id.carbon_paste);
initMenuItem(item, button);
}
Aggregations