Questions tagged [imageswitcher]

An ImageSwitcher is a built-in Android view widget to select an image from a scrolling list of thumbnails with preview.

96 questions
0
votes
2 answers

Out-of-memory error on ImageSwitcher with small images

I've recently been working in the 2.1 SDK (version 7) and created some images that are to be displayed via an ImageSwitcher and changed through a gallery as in one of the example apps. My images are all around 200Kb and I notice that when I switch…
Shawn
  • 2,406
  • 1
  • 26
  • 31
0
votes
2 answers

Android: ImageSwitcher inside Scrollview places image at bottom of the screen

So I created a simple little app that contains rather tall images inside an ImageSwitcher and due to the height of the images, I've wrapped the ImageSwitcher inside a ScrollView (so the entire image is eventually visible). The interesting thing is…
Shawn
  • 2,406
  • 1
  • 26
  • 31
0
votes
1 answer

Android ImageSwitcher not setting initial image when used with ViewPager2.registerOnPageChangeCallback

ImageSwitcher not setting initial Image when used in registerOnPageChangeCallback. But if I wrap it inside Handler.postdelay(), it's working. IntroFragment.kg class IntroFragment : BaseFragment() { override fun onCreateView(inflater:…
Rafael
  • 6,091
  • 5
  • 54
  • 79
0
votes
0 answers

Long If-else statement with hardcoded Strings in Android

I have an issue with if else condition, I have fragments when I choose some options (radioButtons) and then they are pushed to activity to give a result. I'm trying to get some methods like by polymorphism but I still can't get the same result as…
0
votes
1 answer

touch event on image switcher

i have this code with me and it is running successfully but i want to add touch event on it for changing of image and also for zoom in and zoom out effect.... this is my code: package com.conn; import android.app.Activity; import…
sunny
  • 164
  • 4
  • 17
0
votes
0 answers

ImageSwitcher with Glide

I'm using an ImageSwitcher to fade change the background when the screen is touched with a fade effect. The Working Code This is how I used to change them before using Glide: MainActivity: override fun onCreate(savedInstanceState: Bundle?) { …
justHelloWorld
  • 6,478
  • 8
  • 58
  • 138
0
votes
2 answers

ImageSwitcher is not showing outAnimation

I'm using ImageSwitcher widget of android to transition between 2 images like a slide show but it is showing only in animation and out animation is not showing. What is the issue? Code: imageSwitcher.setFactory(new ViewSwitcher.ViewFactory() { …
Usman Rana
  • 2,067
  • 1
  • 21
  • 32
0
votes
1 answer

ImageSwitcher slide animation not work when use glide to load

ImageSwitcher slide animation not work when use glide to load. imageSwitcher.setInAnimation(In); imageSwitcher.setOutAnimation(Out); Glide .with(getActivity()) .load(imageURL) .into((ImageView) imageSwitcher.getCurrentView()); This…
Wahab Khan Jadon
  • 875
  • 13
  • 21
0
votes
0 answers

ImageSwitcher now showing image

I am trying to run a simple app which displays an image with Animation on button click.All I see is a white screen.I am using exact code from the tutorial.Can any one tell me whats the problem? This is the tutorial…
TechieBoy101
  • 284
  • 1
  • 3
  • 16
0
votes
2 answers

How to save ImageResource from ImageSwitcher when rotating screen

I can't find a simple solution to avoid my ImageSwitcher change the ImageResource displayed when I rotate the screen. I tried and tried to write different things in onSaveInstanceState() and onRestoreInstanceState(), but I couldn't find anything…
BROKENCODE
  • 85
  • 1
  • 10
0
votes
2 answers

Change different images on button click android

So, I want to create an Image Switcher which contains two button 'next' and 'previous'. Whenever I click on the 'next' button it will switch to the next image and 'previous' button will switch to the previous image. I am using an array to store all…
CodeX
  • 35
  • 8
0
votes
1 answer

It comes to Log1 then crashes.Whats wrong?

"is" is the ID of Imageswitcher s is images number in array The Array contains 5 images:play stop next previous pause public class MainActivity extends AppCompatActivity { Button btnnext,btnprev; ImageSwitcher is; int s; @Override protected…
Ayoub
  • 13
  • 2
0
votes
1 answer

Unable to invoke instantiateitems method in viewpager pageadapter

I am unable to invoke the instantiateitem method while trying to make an image slider in Android activity. There aren't any errors showing but the images aren't visible, here is the adapter code: public class CustomSwipeAdapter extends…
0
votes
0 answers

Android shared element transition produces image flicker with imageswitcher

Activity A has a small ImageSwitcher that shows a stream with images and information about the current image. When pressing the current image activity B opens with the image in fullscreen. You can continue to watch the image stream here. Pressing…
0
votes
1 answer

How to share Image from imageSwitcher in android

How do I code to share current image that is in view (in the imageSwitcher) from gallery. I have an app that have multiple images in a gallery which after selected is then loaded into an imageSwitcher. So now I want to Share the image currently…