當前位置: 首頁>>代碼示例>>Java>>正文


Java FloatingActionMenu.setVisibility方法代碼示例

本文整理匯總了Java中com.github.clans.fab.FloatingActionMenu.setVisibility方法的典型用法代碼示例。如果您正苦於以下問題:Java FloatingActionMenu.setVisibility方法的具體用法?Java FloatingActionMenu.setVisibility怎麽用?Java FloatingActionMenu.setVisibility使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.github.clans.fab.FloatingActionMenu的用法示例。


在下文中一共展示了FloatingActionMenu.setVisibility方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: 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

示例2: 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

示例3: 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

示例4: onCreateView

import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_expense_list, container, false);

        recyclerViewExpenses = (RecyclerView) rootView.findViewById(R.id.home_recycler_expenses);
        noCCContainer = (RelativeLayout) rootView.findViewById(R.id.home_err_no_cc_container);
        swipeRefreshLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.home_swipe_refresh);
        fabMenu = (FloatingActionMenu) rootView.findViewById(R.id.home_fab_menu);
        fabNewExpense = (FloatingActionButton) rootView.findViewById(R.id.home_fab_new_expense);
        fabNewExpenseCamera = (FloatingActionButton) rootView.findViewById(R.id.home_fab_new_expense_camera);
//        final CollapsingToolbarLayout collapsingToolbarLayout = (CollapsingToolbarLayout) rootView.findViewById(R.id.home_collapsing);
//        AppBarLayout appBarLayout = (AppBarLayout) rootView.findViewById(R.id.home_appbar);
//        toolbar = (Toolbar) rootView.findViewById(R.id.home_toolbar);

        if(activeCreditCard != null) {
            setUpRecyclerView(rootView);
            setUpSwipeRefresh(rootView);
            //setUpToolbar(rootView);
            setUpFab(rootView);
        }
        else {
            noCCContainer.setVisibility(View.VISIBLE);
            swipeRefreshLayout.setVisibility(View.GONE);
            fabMenu.setVisibility(View.GONE);
        }
        return rootView;
    }
 
開發者ID:abicelis,項目名稱:CreditCardExpenseManager,代碼行數:29,代碼來源:ExpenseListFragment.java

示例5: onViewCreated

import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {

    ((MainActivity) getActivity()).setCurrentFragment("First");
    emptyTextView = new TextView(getContext());
    parentLayout = (LinearLayout) getActivity().findViewById(R.id.rootView);
    emptyTextView.setVisibility(View.VISIBLE);
    parentLayout.addView(emptyTextView);
    FloatingActionMenu fabMain = (FloatingActionMenu) getActivity().findViewById(R.id.fabMain);
    fabMain.setVisibility(View.VISIBLE);
    textCurrentPath = (TextView) getView().findViewWithTag("textViewCurrentDir");
    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));
    // Should Hide FAB on Scroll of RecyclerView?
    filesDirs = ContextCompat.getExternalFilesDirs(getContext(), null);
    /**
     * Checking if there is removable sd card available
     */
    if (filesDirs.length > 1) {
        hasExternalSD = true;
        textCurrentPath.setVisibility(View.GONE);
        fabMain.setVisibility(View.GONE);
        setupMultipleStorage(filesDirs);
    } else {

        currentDir = Environment.getExternalStorageDirectory(); // Getting root directory (internal storage)
        textCurrentPath.setText(currentDir.getAbsolutePath());
        setupData(currentDir);
    }

}
 
開發者ID:CosimoSguanci,項目名稱:Material-File-Manager,代碼行數:36,代碼來源:MainFragment.java

示例6: onActivityCreated

import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    FloatingActionMenu fabMain = (FloatingActionMenu) getActivity().findViewById(R.id.fabMain);
    fabMain.setVisibility(View.INVISIBLE);
    getView().setFocusableInTouchMode(true);
    getView().requestFocus();


    getView().setOnKeyListener(new View.OnKeyListener() {
        @Override
        public boolean onKey(View v, int keyCode, KeyEvent event) {
            if (event.getAction() == KeyEvent.ACTION_DOWN) {
                if (keyCode == KeyEvent.KEYCODE_BACK) {


                    if (!pathStack.isEmpty()) {
                        currentDir = new File(pathStack.pop());
                        setupData(currentDir);
                        adapter.notifyDataSetChanged();
                        textCurrentPath.setText(currentDir.getAbsolutePath());
                    } else {
                        FragmentManager fragmentManager = getFragmentManager();
                        FragmentTransaction ft = fragmentManager.beginTransaction().replace(R.id.fragmentContainer, MainFragment.newIstance(), TAG_FRAGMENT);
                        ft.commit();
                    }
                    return true;
                }
            }
            return false;
        }
    });


}
 
開發者ID:CosimoSguanci,項目名稱:Material-File-Manager,代碼行數:36,代碼來源:CopyMoveFragment.java

示例7: onViewCreated

import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    SharedPreferences defaultFolder= PreferenceManager.getDefaultSharedPreferences(getActivity());
    emptyTextView = new TextView(getContext());
    parentLayout = (LinearLayout) getActivity().findViewById(R.id.rootView);
    emptyTextView.setVisibility(View.VISIBLE);
    parentLayout.addView(emptyTextView);
    FloatingActionMenu fabMain = (FloatingActionMenu) getActivity().findViewById(R.id.fabMain);
    fabMain.setVisibility(View.VISIBLE);
    textCurrentPath = (TextView) getView().findViewWithTag("textViewCurrentDir");
    recyclerViewDownloads = (RecyclerView) getView().findViewById(R.id.recycler_view);
    if(!(defaultFolderName=defaultFolder.getString("downloads_preference","")).equals("")){
        currentDir=new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+defaultFolderName);
    }
    else
        currentDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); // Setting current directory to Downloads default directory
    textCurrentPath.setText(currentDir.getAbsolutePath());
    RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getContext());
    recyclerViewDownloads.setLayoutManager(mLayoutManager);
    recyclerViewDownloads.setItemAnimator(new DefaultItemAnimator());
    recyclerViewDownloads.addItemDecoration(new VerticalSpaceRecycler(VERTICAL_ITEM_SPACE));
    recyclerViewDownloads.addItemDecoration(new DividerItemRecycler(getActivity(), R.drawable.divider));
    setupData(currentDir);
    setupAdapter();


}
 
開發者ID:CosimoSguanci,項目名稱:Material-File-Manager,代碼行數:28,代碼來源:DownloadDrawerFragment.java

示例8: onViewCreated

import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    SharedPreferences defaultFolder= PreferenceManager.getDefaultSharedPreferences(getActivity());
    emptyTextView = new TextView(getContext());
    parentLayout = (LinearLayout) getActivity().findViewById(R.id.rootView);
    emptyTextView.setVisibility(View.VISIBLE);
    parentLayout.addView(emptyTextView);
    FloatingActionMenu fabMain = (FloatingActionMenu) getActivity().findViewById(R.id.fabMain);
    fabMain.setVisibility(View.VISIBLE);
    textCurrentPath = (TextView) getView().findViewWithTag("textViewCurrentDir");
    recyclerViewMusic = (RecyclerView) getView().findViewById(R.id.recycler_view);
    if(!(defaultFolderName=defaultFolder.getString("music_preference","")).equals("")){
        currentDir=new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+defaultFolderName);
    }
    else
        currentDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC); // Setting current directory to Music default directory
    textCurrentPath.setText(currentDir.getAbsolutePath());
    RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getContext());
    recyclerViewMusic.setLayoutManager(mLayoutManager);
    recyclerViewMusic.setItemAnimator(new DefaultItemAnimator());
    recyclerViewMusic.addItemDecoration(new VerticalSpaceRecycler(VERTICAL_ITEM_SPACE));
    recyclerViewMusic.addItemDecoration(new DividerItemRecycler(getActivity(), R.drawable.divider));
    setupData(currentDir);
    setupAdapter();


}
 
開發者ID:CosimoSguanci,項目名稱:Material-File-Manager,代碼行數:28,代碼來源:MusicDrawerFragment.java

示例9: onViewCreated

import com.github.clans.fab.FloatingActionMenu; //導入方法依賴的package包/類
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {

    SharedPreferences defaultFolder = PreferenceManager.getDefaultSharedPreferences(getActivity());
    emptyTextView = new TextView(getContext());
    parentLayout = (LinearLayout) getActivity().findViewById(R.id.rootView);
    emptyTextView.setVisibility(View.VISIBLE);
    parentLayout.addView(emptyTextView);
    FloatingActionMenu fabMain = (FloatingActionMenu) getActivity().findViewById(R.id.fabMain);
    fabMain.setVisibility(View.VISIBLE);
    textCurrentPath = (TextView) getView().findViewWithTag("textViewCurrentDir");
    recyclerViewImages = (RecyclerView) getView().findViewById(R.id.recycler_view);
    if(!(defaultFolderName=defaultFolder.getString("images_preference","")).equals("")){
        currentDir=new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+defaultFolderName);
    }
    else
        currentDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); // Setting current directory to Pictures default directory
    textCurrentPath.setText(currentDir.getAbsolutePath());
    RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getContext());
    recyclerViewImages.setLayoutManager(mLayoutManager);
    recyclerViewImages.setItemAnimator(new DefaultItemAnimator());
    recyclerViewImages.addItemDecoration(new VerticalSpaceRecycler(VERTICAL_ITEM_SPACE));
    recyclerViewImages.addItemDecoration(new DividerItemRecycler(getActivity(), R.drawable.divider));
    setupData(currentDir);
    setupAdapter();


}
 
開發者ID:CosimoSguanci,項目名稱:Material-File-Manager,代碼行數:29,代碼來源:ImagesDrawerFragment.java


注:本文中的com.github.clans.fab.FloatingActionMenu.setVisibility方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。