2016-05-16 16 views
0

フローティングボタンをクリックした後、カスタムフッタメニューを表示するためにマテリアルデザインのアニメーションを適用する方法はありますか?ファーストクラスを作成フローティングボタンをクリックした後、カスタムフッターメニューが表示されます

Components – Buttons: Floating Action Button

+0

あなたは正確にあなたは私が必要 –

+0

を達成したいかについて、もう少し詳細を投稿することができますボタンをクリックすると消滅し、パネルやフッタなどの別の要素がトリガされ、センタインアニメーションで表示されます –

+0

このhttps://android-arsenal.com/details/1/3495 @war_Heroを使用して解決策を見つけました –

答えて

0

はBottomSheetDialogFragmentを拡張

public class FooterSheetDialogFragment extends BottomSheetDialogFragment { 


    public static FooterSheetDialogFragment newInstance() { 
     return new FooterSheetDialogFragment(); 
    } 

    @Override 
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 
     View v = inflater.inflate(R.layout.footer_al_dia, container, false); 
     return v; 
    } 
} 

第二: `

mFloatingButton = (FloatingActionButton) view.findViewById(R.id.floatingButtonAlDia);` 
     mFloatingButton.setOnClickListener(new View.OnClickListener() { 
       @Override 
       public void onClick(View v) { 
        BottomSheetDialogFragment bsdFragment = FooterSheetDialogFragment.newInstance(); 
        bsdFragment.show(FragmentAlDia.this.getFragmentManager(), "BSDialog"); 
       } 
      } 
     ); 
関連する問題