简体   繁体   中英

How to access FloatingActionMenu and Floating Action Button in Robotium?

FloatingActionMenu fmenu=(FloatingActionMenu) solo.getCurrentActivity().findViewById(R.id.fab_menu);
FloatingActionButton fb1=(FloatingActionButton) solo.getCurrentActivity().findViewById(R.id.fab_compose_mail);

I want to click on these menus and buttons. Please help me with how to do it.

You have to use a clickOnView().

View fab = getActivity().findViewById(R.id.myFloatingActionButton);
solo.clickOnView(fab);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM