Codota Logo
SnappyLinearLayoutManager
Code IndexAdd Codota to your IDE (free)

How to use
SnappyLinearLayoutManager
in
com.nshmura.snappysmoothscroller

Best Java code snippets using com.nshmura.snappysmoothscroller.SnappyLinearLayoutManager (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: nshmura/SnappySmoothScroller

public SnappyLinearLayoutManager(Context context, int orientation, boolean reverseLayout) {
  super(context, orientation, reverseLayout);
  init();
}
origin: nshmura/SnappySmoothScroller

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_demo);
  imageView = (GLSurfaceView) findViewById(R.id.filtered_image);
  setupActionBar(DemoType.Demo);
  adapter = new DemoAdapter(getApplicationContext());
  adapter.setListener(new DemoAdapter.OnItemClickListener() {
    @Override
    public void onClickItem(DemoAdapter.ViewHolder holder) {
      changeFilter(holder.getAdapterPosition());
    }
  });
  SnappyLinearLayoutManager layoutManager = new SnappyLinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
  layoutManager.setSnapType(SnapType.CENTER);
  layoutManager.setSnapPadding(getResources().getDimensionPixelSize(R.dimen.demo_snap_padding));
  layoutManager.setSnapInterpolator(new OvershootInterpolator());
  recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
  recyclerView.setLayoutManager(layoutManager);
  recyclerView.setAdapter(adapter);
  BitmapFactory.Options opts = new BitmapFactory.Options();
  opts.inSampleSize = 2;
  srcBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.sample, opts);
  gpuImage = new GPUImage(this);
  gpuImage.setImage(srcBitmap);
  gpuImage.setGLSurfaceView(imageView);
}
origin: nshmura/SnappySmoothScroller

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_basic);
  setupActionBar(DemoType.Basic);
  adapter = new BasicAdapter();
  adapter.setListener(new BasicAdapter.OnItemClickListener() {
    @Override
    public void onClickItem(BasicAdapter.ViewHolder holder) {
      moveTo(holder.getAdapterPosition());
    }
  });
  SnappyLinearLayoutManager layoutManager = new SnappyLinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
  layoutManager.setSnapType(SnapType.CENTER);
  recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
  recyclerView.setLayoutManager(layoutManager);
  recyclerView.setAdapter(adapter);
}
origin: nshmura/SnappySmoothScroller

@Override
public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) {
  SnappySmoothScroller scroller = builder
      .setPosition(position)
      .setScrollVectorDetector(new LinearLayoutScrollVectorDetector(this))
      .build(recyclerView.getContext());
  startSmoothScroll(scroller);
}
origin: nshmura/SnappySmoothScroller

switch (demoType) {
  case LinearVertical:
    layoutManager = new SnappyLinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
    adapter.setVertical(true);
    break;
    layoutManager = new SnappyLinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
    adapter.setVertical(false);
    break;
origin: nshmura/SnappySmoothScroller

public SnappyLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
  super(context, attrs, defStyleAttr, defStyleRes);
  init();
}
origin: nshmura/SnappySmoothScroller

public SnappyLinearLayoutManager(Context context) {
  super(context);
  init();
}
com.nshmura.snappysmoothscrollerSnappyLinearLayoutManager

Most used methods

  • <init>
  • init
  • setSnapInterpolator
  • setSnapPadding
  • setSnapType
  • startSmoothScroll

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • JFrame (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Runner (org.openjdk.jmh.runner)
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