Floating Action Button

前端 未结 4 1601
猫巷女王i
猫巷女王i 2020-12-04 02:42

I have been trying to use Floating Action Button. I tried to use some of the resources suggested on here and the links were great; however, I couldn\'t use alot of them beca

4条回答
  •  北海茫月
    2020-12-04 03:20

    Just put compile 'com.android.support:design:22.2.1' in your module app dependencies.

    In your xml:

    
    

    In you java:

    FloatingActionButton fab = (FloatingActionButton)findViewById(R.id.fab);
            fab.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
    
                }
            });
    

提交回复
热议问题