本文整理匯總了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);
}