Questions tagged [viewswitcher]

ViewSwitcher is an Android widget that switches between two views only one being visible at a time.

ViewSwitcher is a subclass of ViewAnimator, switching between only two views. The child views can be added manually or by using a ViewFactory. Animations can be set to animate both the entrance and the exit of a child view from the screen.

87 questions
18
votes
3 answers

Preview ViewSwitcher in AndroidStudio

Is there an easy way to switch between the displayed view in a ViewSwitcher in the Android Studio preview, or is the only way to swap out the XML for the sub-views one at a time?
JustinHK
  • 758
  • 1
  • 6
  • 19
17
votes
4 answers

How to use Android ViewSwitcher?

I'm trying to use the ViewSwitcher to perform switches between two views. One is an ImageView and the other is a MapView. I have a button which the user clicks to perform this switch but my codes are causing an error. Do you guys have any idea…
fgs
  • 173
  • 1
  • 1
  • 5
14
votes
3 answers

What is the current, new alternative to ViewAnimator?

Background I have been using ViewAnimator/ViewSwitcher for a long time. The most common use case I had was to switch from loading phase to content phase, or between phases of a wizard, and even having an error phase sometimes. The problem When I…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
5
votes
2 answers

Android - ViewSwitcher is not switching views

It should be easy, right? So - here's how I have ViewSwitcher defined in XML (Id's and layouts omitted for brevity)
Bostone
  • 36,858
  • 39
  • 167
  • 227
4
votes
1 answer

Wrong App icon in iOS multitask view for iOS 13

Our iOS App gives the users “Tenants” the option to change the app icon right from within the app, by entering their ID. Since with iOS 10.3 Apple finally gave developers the ability to change their app’s icon programmatically by using…
4
votes
0 answers

Android ViewSwitcher with Fragments

I have a fragment with a list of items. When an item is clicked I need to show the details of that item in another fragment. Basically I am looking for something similar to calling a new activity from another activity. Since I am using fragments, I…
Zach
  • 9,989
  • 19
  • 70
  • 107
3
votes
0 answers

Scroll action for ScrollView not working when unit-testing

I have the following problem. I'm making unit-tests for a custom DialogFragment. This dialog has a Scrollview. when reaching the end of which, a ViewSwitcher has to switch a view. Here is the scroll listener: ViewSwitcher vs =…
3
votes
2 answers

Current Image in a ViewSwitcher

is there a possibility to get the name/reference/id of the current displayed image in a ViewSwitcher? switcher = (ViewSwitcher) findViewById(R.id.viewSwitcher); [...] @Override public boolean onSingleTapUp(MotionEvent e) { Log.d(TAG, "tell…
CoUnt3r
  • 119
  • 1
  • 2
  • 8
3
votes
0 answers

Get ViewSwitcher to match parent so that content can be centred

I am trying to make a layout containing a ViewSwitcher where the first view displayed is a spinning progress indicator in the centre of the screen, which then switches to a linear layout that will have content added to it once it is loaded. The…
Jimbali
  • 2,065
  • 1
  • 20
  • 24
3
votes
3 answers

Set animation for ViewSwitcher programmatically

I set the animation in the layout like this:
selva_pollachi
  • 4,147
  • 4
  • 29
  • 42
3
votes
0 answers

Android - RealViewSwitcher EXACTLY mode

i'm using the RealViewSwitcher component in my Android app. It is inside a RelativeLayout and i set its height to 200dp. But every time i try to run the app this error occurred : ViewSwitcher can only be used in EXACTLY mode. How can i do to solve…
Andrea Mario Lufino
  • 7,921
  • 12
  • 47
  • 78
2
votes
0 answers

Animate TextSwitcher, ViewFlipper or ViewSwitcher with children of different heights

I want to use a TextSwitcher (or some other switcher with TextViews inside) to animate changing Text. It should have a sliding animation to slide the old text out to the left and the new one in from the right. My problem is that when a long text…
2
votes
1 answer

Android ImageSwitcher

I'm building an ImageSwitcher to fit in a mobile app as a banner switcher. Currently we have rotating banners using a Handler and delaying a runnable by 7 seconds(7000ms, to be exact), but we want a more fancy transition effect between two images.…
Spencer Cole
  • 1,122
  • 1
  • 10
  • 20
2
votes
1 answer

Android - switching between listviews without changing the layout?

I'm not looking for exact code here, just a direction on what to look for and what I should be reading about so I can figure this out. I have a layout that I would like to remain static, with only the listview changing depending on what's selected…
Jorsher
  • 3,683
  • 3
  • 17
  • 14
2
votes
1 answer

ViewFlipper/ViewSwitcher 2nd View Empty

I am a newbie to Android programming and now I want to create a ViewFlipper or ViewSwitcher for 2 views which will switch view between 1 and 2 columns. The problem is that the 1st view is ok, but when I use showNext() or showPrevious(), the 2nd view…
Zia Shams
  • 21
  • 4
1
2 3 4 5 6