当前位置: 首页>>代码示例>>Java>>正文


Java FloatingActionMenu类代码示例

本文整理汇总了Java中com.github.clans.fab.FloatingActionMenu的典型用法代码示例。如果您正苦于以下问题:Java FloatingActionMenu类的具体用法?Java FloatingActionMenu怎么用?Java FloatingActionMenu使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FloatingActionMenu类属于com.github.clans.fab包,在下文中一共展示了FloatingActionMenu类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:brianjaustin,项目名称:permitlog-android,代码行数:16,代码来源:HomeFragment.java

示例2: viewSetup

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
/**********************************Setup UI elements and their functionality***********************************/
private void viewSetup() {
    fabPoiDetailsAfterRoute = (android.support.design.widget.FloatingActionButton) findViewById(R.id.fabPoiDetailsAfterRoute);
    floatingActionButton = (FloatingActionMenu) findViewById(R.id.mainFab);
    floatingActionButton.setClosedOnTouchOutside(true);

    navigation = (BottomNavigationViewEx) findViewById(R.id.navigation);
    //setup bottom navigation
    navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
    navigation.setSelectedItemId(R.id.navigation_categories);
    navigation.enableAnimation(false);
    navigation.enableShiftingMode(false);
    navigation.enableItemShiftingMode(false);

    FloatingActionButton fabClearMap = (FloatingActionButton) findViewById(R.id.fabClearMap);
    FloatingActionButton fabLocation = (FloatingActionButton) findViewById(R.id.fabLocation);
    FloatingActionButton fabAdd = (FloatingActionButton) findViewById(R.id.fabAdd);
    FloatingActionButton fabSearch = (FloatingActionButton) findViewById(R.id.fabSearch);
    fabClearMap.setOnClickListener(clickListenerFAB);
    fabLocation.setOnClickListener(clickListenerFAB);
    fabAdd.setOnClickListener(clickListenerFAB);
    fabSearch.setOnClickListener(clickListenerFAB);
    fabPoiDetailsAfterRoute.setOnClickListener(clickListenerFAB);
}
 
开发者ID:CityZenApp,项目名称:Android-Development,代码行数:25,代码来源:MainActivity.java

示例3: 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();
}
 
开发者ID:HueToYou,项目名称:ChatExchange-old,代码行数:27,代码来源:MainActivity.java

示例4: onNestedScroll

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
@Override
public void onNestedScroll(CoordinatorLayout coordinatorLayout, FrameLayout fabContainer, View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) {
    super.onNestedScroll(coordinatorLayout, fabContainer, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed);

    if (fabContainer.getChildAt(0) instanceof FloatingActionMenu) {
        FloatingActionMenu fabMenu = (FloatingActionMenu) fabContainer.getChildAt(0);
        if (dyConsumed > 0) {
            fabMenu.hideMenuButton(true);
        }
        else if (dyConsumed < 0) {
            fabMenu.showMenuButton(true);
        }
    }
    else if (fabContainer.getChildAt(0) instanceof FloatingActionButton) {
        FloatingActionButton fab = (FloatingActionButton) fabContainer.getChildAt(0);
        if (dyConsumed > 0) {
            fab.hide(true);
        }
        else if (dyConsumed < 0) {
            fab.show(true);
        }
    }
}
 
开发者ID:tomatrocho,项目名称:insapp-android,代码行数:24,代码来源:ScrollingFABBehavior.java

示例5: setUIComponents

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
private void setUIComponents() {
    imageView = (ImageView) findViewById(R.id.imageView);
    btntakephoto = (ImageButton) findViewById(R.id.btntakephoto);
    btnselectedphoto = (ImageButton) findViewById(R.id.btnselectedphoto);
    btnGoTo = (Button) findViewById(R.id.btnGoTo);
    texttitle = (TextView) findViewById(R.id.texttitle);
    saveImage = (ImageButton) findViewById(R.id.saveImage);
    floatingBtnRotate = (FloatingActionButton) findViewById(R.id.floatingBtnRotate);
    floatingBtnFacialRecognition = (FloatingActionButton) findViewById(R.id.floatingBtnFacialRecognition);
    floatingBtnPhotoInformation = (FloatingActionButton) findViewById(R.id.floatingBtnPhotoInformation);
    floatingBtnSeeString64 = (FloatingActionButton) findViewById(R.id.floatingBtnSeeString64);
    frame = (FrameLayout) findViewById(R.id.frame);
    principalLayout = findViewById(R.id.principalLayout);
    floatingBtnMenu = (FloatingActionMenu) findViewById(R.id.floatingBtnMenu);
    progressLoadingIndicator = (LinearLayout) findViewById(R.id.progressLoadingIndicator);

    floatingBtnMenu.setVisibility(View.GONE);
    saveImage.setVisibility(View.GONE);
    btnGoTo.setText(getString(R.string.go_to_fragment));
    texttitle.setText(getString(R.string.title_activity));
}
 
开发者ID:fabian7593,项目名称:MagicalCamera,代码行数:22,代码来源:MainActivity.java

示例6: setUIComponents

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
private void setUIComponents(View rootView) {
    imageView = (ImageView) rootView.findViewById(R.id.imageView);
    btntakephoto = (ImageButton) rootView.findViewById(R.id.btntakephoto);
    btnselectedphoto = (ImageButton) rootView.findViewById(R.id.btnselectedphoto);
    btnGoTo = (Button) rootView.findViewById(R.id.btnGoTo);
    texttitle = (TextView) rootView.findViewById(R.id.texttitle);
    saveImage = (ImageButton) rootView.findViewById(R.id.saveImage);
    floatingBtnRotate = (FloatingActionButton) rootView.findViewById(R.id.floatingBtnRotate);
    floatingBtnFacialRecognition = (FloatingActionButton) rootView.findViewById(R.id.floatingBtnFacialRecognition);
    floatingBtnPhotoInformation = (FloatingActionButton) rootView.findViewById(R.id.floatingBtnPhotoInformation);
    floatingBtnSeeString64 = (FloatingActionButton) rootView.findViewById(R.id.floatingBtnSeeString64);
    frame = (FrameLayout) rootView.findViewById(R.id.frame);
    principalLayout = rootView.findViewById(R.id.principalLayout);
    floatingBtnMenu = (FloatingActionMenu) rootView.findViewById(R.id.floatingBtnMenu);


    floatingBtnMenu.setVisibility(View.GONE);
    saveImage.setVisibility(View.GONE);
    btnGoTo.setText(getString(R.string.go_to_activity));
    texttitle.setText(getString(R.string.title_fragment));
}
 
开发者ID:fabian7593,项目名称:MagicalCamera,代码行数:22,代码来源:FragmentSample.java

示例7: onDependentViewChanged

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
@Override
public boolean onDependentViewChanged(
    final CoordinatorLayout parent, final FloatingActionMenu child, final View dependency) {
    log(TAG, INFO, "onDependentViewChanged: " + dependency);

    final List<View> list = parent.getDependencies(child);
    int bottomMargin = ((ViewGroup.MarginLayoutParams) child.getLayoutParams()).bottomMargin;

    float t = 0;
    boolean result = false;

    for (View dep : list) {
        if (Snackbar.SnackbarLayout.class.isInstance(dep)) {
            t += dep.getTranslationY() - dep.getHeight();
            result = true;
        } else if (BottomNavigation.class.isInstance(dep)) {
            BottomNavigation navigation = (BottomNavigation) dep;
            t += navigation.getTranslationY() - navigation.getHeight() + bottomMargin;
            result = true;
        }
    }

    child.setTranslationY(t);
    return result;
}
 
开发者ID:sephiroth74,项目名称:Material-BottomNavigation,代码行数:26,代码来源:MainActivityCustomBehavior.java

示例8: onViewCreated

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    emptyTextView = new TextView(getContext());
    parentLayout = (LinearLayout) getActivity().findViewById(R.id.rootView);
    emptyTextView.setVisibility(View.VISIBLE);
    parentLayout.addView(emptyTextView);
    textCurrentPath = (TextView) getView().findViewWithTag("textViewCurrentDir");
    textCurrentPath.setVisibility(View.GONE);
    FloatingActionMenu fabMain = (FloatingActionMenu) getActivity().findViewById(R.id.fabMain);
    fabMain.setVisibility(View.GONE);
    recyclerView = (RecyclerView) getView().findViewById(R.id.recycler_view);
    RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getContext());
    recyclerView.setLayoutManager(mLayoutManager);
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    recyclerView.addItemDecoration(new VerticalSpaceRecycler(VERTICAL_ITEM_SPACE));
    recyclerView.addItemDecoration(new DividerItemRecycler(getActivity(), R.drawable.divider));
    searchName = ((MainActivity) getActivity()).getSearchName();
    new SetupSearchResults(recyclerView, Environment.getExternalStorageDirectory().listFiles(), searchName).execute(); // Get an error: No adapter attached; skipping layout


}
 
开发者ID:CosimoSguanci,项目名称:Material-File-Manager,代码行数:22,代码来源:SearchResultsFragment.java

示例9: onCreateView

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_all_rides, container, false);
    ButterKnife.bind(this, view);

    context = getContext();

    coordinatorLayout = (CoordinatorLayout) view.findViewById(R.id.all_rides_coordinator);

    listAllRides(1);

    fab_menu = (FloatingActionMenu) view.findViewById(R.id.fab_menu);
    if(((MainAct)getActivity()).filterText.getText().equals(""))
    {
        ((MainAct)getActivity()).hideFilterCard(context);
    }
    return view;
}
 
开发者ID:caronae,项目名称:caronae-android,代码行数:19,代码来源:AllRidesFrag.java

示例10: onCreate

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mMenu = (FloatingActionMenu) findViewById(R.id.menu);
    initDrawer(getString(R.string.app_name));
    initContactGrid();
    initPermissionRequests();

    // When the activity is created start the LocationProviderService so it can be ready to
    // get locations ASAP.
    Intent intent = new Intent(this, LocationProviderService.class);
    this.startService(intent);

    mReloadContactsReceiver = new ReloadContactsReceiver();
    mReloadContactsFilter = new IntentFilter(Constants.RELOAD_CONTACTS_BROADCAST);
}
 
开发者ID:whereuat,项目名称:whereuat-android,代码行数:19,代码来源:MainActivity.java

示例11: onCreate

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    initView();
    Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); }

    mFloatingActionMenu = (FloatingActionMenu)findViewById(R.id.menu);
    mLoadingFab = (FloatingActionButton)findViewById(R.id.fab_loading);
    mEmptyFab = (FloatingActionButton)findViewById(R.id.fab_empty);
    mErrorFab = (FloatingActionButton)findViewById(R.id.fab_error);
    mNoNetworkFab = (FloatingActionButton)findViewById(R.id.fab_no_network);
    mContentFab = (FloatingActionButton)findViewById(R.id.fab_content);
    mLoadingFab.setOnClickListener(this);
    mEmptyFab.setOnClickListener(this);
    mErrorFab.setOnClickListener(this);
    mNoNetworkFab.setOnClickListener(this);
    mContentFab.setOnClickListener(this);
    mMultipleStatusView.setOnRetryClickListener(mRetryClickListener);
}
 
开发者ID:qyxxjd,项目名称:MultipleStatusView,代码行数:22,代码来源:AbsActivity.java

示例12: initViews

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
private void initViews() {
    View mRootLayout = findViewById(R.id.root_layout);
    mMainLayout = (NestedScrollView) findViewById(R.id.main_bg_layout);
    mInputEditText = (EditText) findViewById(R.id.jot_input_edit_txt);
    mRootLayout.setOnClickListener(onClickListener);
    mMenuBtn = (FloatingActionMenu) findViewById(R.id.main_menu_btn);
    mMenuBtn.setClosedOnTouchOutside(true);
    mMenuBtn.hideMenuButton(false);
    mMenuBtn.setOnMenuButtonClickListener(mMenuClickListener);
    mMenuBtn.setOnMenuButtonLongClickListener(mMenuLongClickListener);
    mMenuBtn.setOnMenuToggleListener(mMenuToggleListener);
    mMainMainMenuHelper.initBasicMenu(mMenuBtn);
    mUiHandler.postDelayed(new Runnable() {
        @Override
        public void run() {
            mMenuBtn.showMenuButton(true);
        }
    }, 600);
    onConfigColor();
}
 
开发者ID:xiongwei-git,项目名称:OneNote,代码行数:21,代码来源:MainActivity.java

示例13: MakiListener

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
public MakiListener(MainActivity activity, WebView view) {
    fActivity = activity;
    mCoordinatorLayoutView = activity.mCoordinatorLayoutView;
    webView = (AdvancedWebView) view;
    FAB = (FloatingActionMenu) activity.findViewById(R.id.fab);
    bottomNavigation = (AHBottomNavigation) activity.findViewById(R.id.bottom_navigation);
    preferences = PreferenceManager.getDefaultSharedPreferences(activity);
    mScrollThreshold = activity.getResources().getDimensionPixelOffset(R.dimen.fab_scroll_threshold);
    mDownloadManager = (DownloadManager) fActivity.getSystemService(Context.DOWNLOAD_SERVICE);
    context = MakiApplication.getContextOfApplication();
}
 
开发者ID:sfilmak,项目名称:MakiLite,代码行数:12,代码来源:MakiListener.java

示例14: hide

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
private void hide(View view) {
    if (view instanceof FloatingActionButton) {
        ((FloatingActionButton)view).hide(true);
    } else if (view instanceof FloatingActionMenu) {
        ((FloatingActionMenu)view).hideMenu(true);
    } else {
        view.setVisibility(View.GONE);
    }
}
 
开发者ID:djuelg,项目名称:Neuronizer,代码行数:10,代码来源:RecyclerViewScrollListener.java

示例15: show

import com.github.clans.fab.FloatingActionMenu; //导入依赖的package包/类
private void show(View view) {
    if (view instanceof FloatingActionButton) {
        ((FloatingActionButton)view).show(true);
    } else if (view instanceof FloatingActionMenu) {
        ((FloatingActionMenu)view).showMenu(true);
    } else {
        view.setVisibility(View.VISIBLE);
    }
}
 
开发者ID:djuelg,项目名称:Neuronizer,代码行数:10,代码来源:RecyclerViewScrollListener.java


注:本文中的com.github.clans.fab.FloatingActionMenu类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。