本文整理了Java中android.widget.ImageView.setOnDragListener()
方法的一些代码示例,展示了ImageView.setOnDragListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setOnDragListener()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:setOnDragListener
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
image=(ImageView)findViewById(R.id.thumbnail_large);
image.setOnDragListener(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
image=(ImageView)findViewById(R.id.thumbnail_large);
image.setOnDragListener(this);
if (state!=null) {
imageUri=state.getParcelable(STATE_IMAGE_URI);
if (imageUri!=null) {
showThumbnail();
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
image=(ImageView)findViewById(R.id.thumbnail_large);
image.setOnDragListener(this);
if (state!=null) {
imageUri=state.getParcelable(STATE_IMAGE_URI);
if (imageUri!=null) {
showThumbnail();
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
image=findViewById(R.id.thumbnail_large);
image.setOnDragListener(this);
if (state!=null) {
imageUri=state.getParcelable(STATE_IMAGE_URI);
if (imageUri!=null) {
showThumbnail();
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.drop);
image=(ImageView)findViewById(R.id.thumbnail_large);
image.setOnDragListener(this);
if (state!=null) {
imageUri=state.getParcelable(STATE_IMAGE_URI);
if (imageUri!=null) {
showThumbnail();
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
player=findViewById(R.id.player);
if (player!=null) {
player.setOnDragListener(this);
}
thumbnailLarge=findViewById(R.id.thumbnail_large);
if (thumbnailLarge!=null) {
thumbnailLarge.setOnDragListener(this);
}
setLayoutManager(new LinearLayoutManager(this));
setAdapter(new VideoAdapter());
if (state!=null) {
isInPermission=
state.getBoolean(STATE_IN_PERMISSION, false);
}
if (hasFilesPermission()) {
loadVideos();
}
else if (!isInPermission) {
isInPermission=true;
ActivityCompat.requestPermissions(this,
new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE},
REQUEST_PERMS);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
image=(ImageView)findViewById(R.id.thumbnail_large);
image.setOnDragListener(this);
findViewById(R.id.outer_container).setOnDragListener(this);
findViewById(R.id.inner_container).setOnDragListener(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
thumbnailLarge.setOnDragListener(this);
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
player=findViewById(R.id.player);
if (player!=null) {
player.setOnDragListener(this);
}
thumbnailLarge=findViewById(R.id.thumbnail_large);
if (thumbnailLarge!=null) {
thumbnailLarge.setOnDragListener(this);
}
setLayoutManager(new LinearLayoutManager(this));
adapter=new VideoAdapter(getRecyclerView());
setAdapter(adapter);
getRecyclerView().requestFocus();
if (state!=null) {
isInPermission=
state.getBoolean(STATE_IN_PERMISSION, false);
}
if (hasFilesPermission()) {
loadVideos();
}
else if (!isInPermission) {
isInPermission=true;
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
REQUEST_PERMS);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
player=findViewById(R.id.player);
if (player!=null) {
player.setOnDragListener(this);
}
thumbnailLarge=findViewById(R.id.thumbnail_large);
if (thumbnailLarge!=null) {
thumbnailLarge.setOnDragListener(this);
}
setLayoutManager(new LinearLayoutManager(this));
adapter=new VideoAdapter(getRecyclerView());
setAdapter(adapter);
getRecyclerView().requestFocus();
if (state!=null) {
isInPermission=
state.getBoolean(STATE_IN_PERMISSION, false);
}
if (hasFilesPermission()) {
loadVideos();
}
else if (!isInPermission) {
isInPermission=true;
ActivityCompat.requestPermissions(this,
new String[] {Manifest.permission.READ_EXTERNAL_STORAGE},
REQUEST_PERMS);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
player=findViewById(R.id.player);
if (player!=null) {
player.setOnDragListener(this);
}
thumbnailLarge=findViewById(R.id.thumbnail_large);
if (thumbnailLarge!=null) {
thumbnailLarge.setOnDragListener(this);
}
setLayoutManager(new LinearLayoutManager(this));
adapter=new VideoAdapter(getRecyclerView());
setAdapter(adapter);
getRecyclerView().requestFocus();
if (state!=null) {
isInPermission=
state.getBoolean(STATE_IN_PERMISSION, false);
}
if (hasFilesPermission()) {
loadVideos();
}
else if (!isInPermission) {
isInPermission=true;
ActivityCompat.requestPermissions(this,
new String[] {Manifest.permission.READ_EXTERNAL_STORAGE},
REQUEST_PERMS);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
player=findViewById(R.id.player);
if (player!=null) {
player.setOnDragListener(this);
}
thumbnailLarge=findViewById(R.id.thumbnail_large);
if (thumbnailLarge!=null) {
thumbnailLarge.setOnDragListener(this);
}
setLayoutManager(new LinearLayoutManager(this));
adapter=new VideoAdapter(getRecyclerView());
setAdapter(adapter);
getRecyclerView().requestFocus();
if (state!=null) {
isInPermission=
state.getBoolean(STATE_IN_PERMISSION, false);
}
if (hasFilesPermission()) {
loadVideos();
}
else if (!isInPermission) {
isInPermission=true;
ActivityCompat.requestPermissions(this,
new String[] {Manifest.permission.READ_EXTERNAL_STORAGE},
REQUEST_PERMS);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
thumbnailLarge.setOnDragListener(this);
thumbnailLarge.setOnHoverListener(this);
thumbnailLarge.setOnLongClickListener(this);
代码示例来源:origin: Neamar/KISS
image = (ImageView) layoutInflater.inflate(R.layout.favorite_item, (ViewGroup) mainActivity.favoritesBar, false);
image.setTag(i);
image.setOnDragListener(this);
image.setOnTouchListener(this);
((ViewGroup) mainActivity.favoritesBar).addView(image);
代码示例来源:origin: SamThompson/BubbleActions
public BubbleView(Context context) {
super(context);
setOrientation(VERTICAL);
LayoutInflater.from(context).inflate(R.layout.bubble_actions_bubble_item, this, true);
textView = (TextView) getChildAt(0);
imageView = (ImageView) getChildAt(1);
imageView.setOnDragListener(dragListener);
imageView.setScaleX(DESELECTED_SCALE);
imageView.setScaleY(DESELECTED_SCALE);
}
代码示例来源:origin: stackoverflow.com
img.setOnDragListener(onDragListener1);
target.setOnDragListener(onDragListener1);
代码示例来源:origin: ianhanniballake/TripleSolitaire
wasteTopView.setOnDragListener(new View.OnDragListener() {
@Override
public boolean onDrag(final View v, final DragEvent event) {
final ImageView foundationLayout = findViewById(foundationId);
foundationLayout.setOnTouchListener(new OnFoundationTouchListener(-1 * (curFoundation + 1)));
foundationLayout.setOnDragListener(new OnFoundationDragListener(-1 * (curFoundation + 1)));
内容来源于网络,如有侵权,请联系作者删除!