本文整理汇总了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));
}
示例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));
}
示例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
}
示例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;
}
示例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);
}
}
示例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;
}
});
}
示例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();
}
示例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();
}
示例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();
}