本文整理汇总了Java中com.github.clans.fab.FloatingActionMenu.close方法的典型用法代码示例。如果您正苦于以下问题:Java FloatingActionMenu.close方法的具体用法?Java FloatingActionMenu.close怎么用?Java FloatingActionMenu.close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.clans.fab.FloatingActionMenu
的用法示例。
在下文中一共展示了FloatingActionMenu.close方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClick
import com.github.clans.fab.FloatingActionMenu; //导入方法依赖的package包/类
@Override public void onClick(View view) {
// Check if the user is signed in:
boolean isSignedIn = FirebaseHelper.signInIfNeeded((MainActivity)getActivity());
// Don't do anything if the user isn't signed in:
if (!isSignedIn) return;
// Close the plus button menu
FloatingActionMenu floatingMenu = (FloatingActionMenu) rootView.findViewById(R.id.menu);
floatingMenu.close(false);
// Open the activity (which masquerades as a dialog)
Intent intent = new Intent(view.getContext(), DriverDialog.class);
intent.putExtra("driverId", "");
startActivity(intent);
}
示例2: removeAllChats
import com.github.clans.fab.FloatingActionMenu; //导入方法依赖的package包/类
/**
* Removes all chats on confirmation
*
* @param v the view calling this function
*/
public void removeAllChats(View v)
{
final FloatingActionMenu fam = findViewById(R.id.chat_slide_menu);
fam.close(true);
new AlertDialog.Builder(this)
.setTitle("Are you sure?")
.setMessage("Are you sure you want to remove all chats?")
.setPositiveButton(getResources().getText(R.string.generic_yes), new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialogInterface, int i)
{
fragStuff.removeAllFragmentsFromList();
fragStuff.setFragmentByTag("home");
}
})
.setNegativeButton(getResources().getText(R.string.generic_no), null)
.show();
}
示例3: onOptionsItemSelected
import com.github.clans.fab.FloatingActionMenu; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) { // Menu icon clicked
FloatingActionMenu fabMain = (FloatingActionMenu) findViewById(R.id.fabMain);
fabMain.close(true);
if (drawerToggle.onOptionsItemSelected(item)) {
return true;
}
return super.onOptionsItemSelected(item);
}