use of android.support.design.widget.FloatingActionButton in project AndroidPerformanceMonitor by markzhai.
the class DemoActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_demo);
getSupportFragmentManager().beginTransaction().add(R.id.container, DemoFragment.newInstance()).commit();
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showTipDialog();
}
});
}
use of android.support.design.widget.FloatingActionButton in project material-design-dimens by DmitryMalkovich.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG).setAction("Action", null).show();
}
});
}
use of android.support.design.widget.FloatingActionButton in project ExpandTextView by mugku.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG).setAction("Action", null).show();
}
});
ExpandableTextView expTv1 = (ExpandableTextView) this.findViewById(R.id.expand_text_view);
expTv1.setText(getString(R.string.dummy_text1));
}
use of android.support.design.widget.FloatingActionButton in project react-native-navigation by wix.
the class FloatingActionButtonCoordinator method createFab.
private FloatingActionButton createFab(Drawable icon) {
FloatingActionButton fab = new FloatingActionButton(parent.getContext());
fab.setId(ViewUtils.generateViewId());
fab.setImageDrawable(icon);
return fab;
}
use of android.support.design.widget.FloatingActionButton in project react-native-navigation by wix.
the class FloatingActionButtonCoordinator method showActions.
private void showActions() {
if (actions.size() > 0) {
return;
}
for (int i = 0; i < params.actions.size(); i++) {
FloatingActionButton action = createAction(i);
actions.add(action);
parent.addView(action);
}
}
Aggregations