Skip to content

Instantly share code, notes, and snippets.

RUN apt-get update && apt-get install -y --no-install-recommends \
      ssh \
      patch \
      vim
@IvBaranov
IvBaranov / AndroidImageAdapter.java
Last active June 11, 2019 19:44
Android quick image fullscreen slider
public class AndroidImageAdapter extends PagerAdapter {
Context mContext;
AndroidImageAdapter(Context context) {
this.mContext = context;
}
@Override
public int getCount() {
return sliderImagesId.length;
@IvBaranov
IvBaranov / DragAndDropExample.java
Last active October 20, 2017 08:09
Android drag and drop
dropView.setOnDragListener((view, event) -> {
int action = event.getAction();
switch (event.getAction()) {
case DragEvent.ACTION_DRAG_STARTED:
// nothing
break;
case DragEvent.ACTION_DRAG_ENTERED:
// on entered view
break;
case DragEvent.ACTION_DRAG_EXITED: