Codota Logo
ViewPager.setVisibility
Code IndexAdd Codota to your IDE (free)

How to use
setVisibility
method
in
androidx.viewpager.widget.ViewPager

Best Java code snippets using androidx.viewpager.widget.ViewPager.setVisibility (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: alexvasilkov/GestureViews

  @Override
  public void onPositionUpdate(float pos, boolean isLeaving) {
    if (pos == 1f && isLeaving && getAnimator().getRequestedId() != null) {
      if (preventExit) {
        skipExit();
      }
      switchToCurrentPage();
    }
    viewPager.setVisibility(pos == 0f && isLeaving ? View.INVISIBLE : View.VISIBLE);
  }
});
origin: termux/termux-app

void toggleShowExtraKeys() {
  final ViewPager viewPager = findViewById(R.id.viewpager);
  final boolean showNow = mSettings.toggleShowExtraKeys(TermuxActivity.this);
  viewPager.setVisibility(showNow ? View.VISIBLE : View.GONE);
  if (showNow && viewPager.getCurrentItem() == 1) {
    // Focus the text input view if just revealed.
    findViewById(R.id.text_input).requestFocus();
  }
}
origin: alexvasilkov/GestureViews

public IntoViewPagerListener(ViewPager viewPager, IntoTracker<ID> tracker) {
  this.viewPager = viewPager;
  this.tracker = tracker;
  viewPager.setVisibility(View.GONE); // We do not need to initialize ViewPager on startup
  viewPager.addOnPageChangeListener(new PagerListener());
  viewPager.setOnHierarchyChangeListener(new ChildStateListener());
}
origin: alexvasilkov/GestureViews

@Override
public void onRequestView(@NonNull ID id) {
  // Requesting ViewPager layout if it was in 'gone' state
  if (viewPager.getVisibility() == View.GONE) {
    viewPager.setVisibility(View.INVISIBLE);
  }
  // Trying to find view for currently shown page.
  // If it is not a selected page then we should scroll to it at first.
  int position = tracker.getPositionById(id);
  if (position == IntoTracker.NO_POSITION) {
    return; // Nothing we can do
  }
  if (viewPager.getCurrentItem() == position) {
    applyCurrentPage();
  } else {
    viewPager.setCurrentItem(position, false);
  }
}
origin: termux/termux-app

if (mSettings.mShowExtraKeys) viewPager.setVisibility(View.VISIBLE);
origin: morogoku/MTweaks-KernelAdiutorMOD

fragment.mViewPager.setVisibility(View.VISIBLE);
fragment.mViewPagerShadow.setVisibility(View.VISIBLE);
origin: morogoku/MTweaks-KernelAdiutorMOD

mViewPager.setVisibility(View.INVISIBLE);
mViewPagerShadow = mRootView.findViewById(R.id.viewpager_shadow);
mViewPagerShadow.setVisibility(View.INVISIBLE);
  adjustScrollPosition();
  mViewPager.setVisibility(View.VISIBLE);
  mViewPagerShadow.setVisibility(View.VISIBLE);
origin: cbeyls/fosdem-companion-android

@Override
public void onChanged(List<Event> schedule) {
  setCustomProgressVisibility(false);
  if (schedule != null) {
    pager.setVisibility(View.VISIBLE);
    adapter.setSchedule(schedule);
    // Delay setting the adapter
    // to ensure the current position is restored properly
    if (pager.getAdapter() == null) {
      pager.setAdapter(adapter);
      if (initialPosition != -1) {
        pager.setCurrentItem(initialPosition, false);
        initialPosition = -1;
      }
      final int currentPosition = pager.getCurrentItem();
      if (currentPosition >= 0) {
        bookmarkStatusViewModel.setEvent(adapter.getEvent(currentPosition));
      }
    }
  }
}
androidx.viewpager.widgetViewPagersetVisibility

Popular methods of ViewPager

  • setAdapter
  • addOnPageChangeListener
  • setCurrentItem
  • getCurrentItem
  • getAdapter
  • setOffscreenPageLimit
  • onInterceptTouchEvent
  • onTouchEvent
  • removeOnPageChangeListener
  • dispatchTouchEvent
  • setOnPageChangeListener
  • setPageMargin
  • setOnPageChangeListener,
  • setPageMargin,
  • addOnAdapterChangeListener,
  • beginFakeDrag,
  • endFakeDrag,
  • getLayoutParams,
  • getResources,
  • getWidth,
  • isFakeDragging

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now