Search in sources :

Example 66 with FloatingActionButton

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();
        }
    });
}
Also used : FloatingActionButton(android.support.design.widget.FloatingActionButton) View(android.view.View)

Example 67 with FloatingActionButton

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();
        }
    });
}
Also used : FloatingActionButton(android.support.design.widget.FloatingActionButton) View(android.view.View) Toolbar(android.support.v7.widget.Toolbar)

Example 68 with FloatingActionButton

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));
}
Also used : ExpandableTextView(com.github.dubu.expandabletextview.ExpandableTextView) FloatingActionButton(android.support.design.widget.FloatingActionButton) ExpandableTextView(com.github.dubu.expandabletextview.ExpandableTextView) View(android.view.View) Toolbar(android.support.v7.widget.Toolbar)

Example 69 with FloatingActionButton

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;
}
Also used : FloatingActionButton(android.support.design.widget.FloatingActionButton)

Example 70 with FloatingActionButton

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);
    }
}
Also used : FloatingActionButton(android.support.design.widget.FloatingActionButton)

Aggregations

FloatingActionButton (android.support.design.widget.FloatingActionButton)84 View (android.view.View)58 Toolbar (android.support.v7.widget.Toolbar)28 TextView (android.widget.TextView)20 ImageView (android.widget.ImageView)16 Intent (android.content.Intent)13 RecyclerView (android.support.v7.widget.RecyclerView)12 ColorStateList (android.content.res.ColorStateList)9 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)9 Bundle (android.os.Bundle)7 NavigationView (android.support.design.widget.NavigationView)7 TabLayout (android.support.design.widget.TabLayout)7 ViewPager (android.support.v4.view.ViewPager)7 ActionBar (android.support.v7.app.ActionBar)7 UiController (android.support.test.espresso.UiController)6 ViewAction (android.support.test.espresso.ViewAction)6 AdapterView (android.widget.AdapterView)6 ListView (android.widget.ListView)5 DrawerLayout (android.support.v4.widget.DrawerLayout)4 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)4