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
2
votes
0 answers

ViewSwitcher vs ImageSwitcher Android

I need to display different images(in the same place on the screen)on some event, they should have a smooth transition. For the transition, I am using animation. But, for the actual loading of a different image, I want to understand the performance…
Namratha
  • 16,630
  • 27
  • 90
  • 125
2
votes
1 answer

Android ViewSwitcher multiple views

I use ViewSwitcher like this:
Roman
  • 2,079
  • 4
  • 35
  • 53
2
votes
2 answers

ViewSwitcher with EditText leaves extra padding

I'm using a ViewSwitcher to allow switching from a TextView to an EditText element. What I've noticed is that the EditText element generates extra padding at the bottom of the view (i.e. if I remove the EditText everything looks as expected, but…
Sachin K
  • 339
  • 4
  • 14
2
votes
1 answer

Android ViewSwitcher cell in TableLayout moved and hidden magically

I have a ViewSwitcher layout which used as a cell inside a TableLayout. The ViewSwitcher contains two views and I have implemented an OnClickListener on the first child in order to switch views on click. The problem is that when one cell of a…
Arnaud
  • 1,121
  • 1
  • 11
  • 26
2
votes
1 answer

ViewSwitcher in a PopupWindow

I'm trying to add a ViewSwitcher inside a Customized PopupWindow, the problem comes up when the showNext() method is executed It happens nothing, the same first view is showed. This is the xml layout:
2
votes
1 answer

Getting Bitmap of MapView fails if it has never been visible

I have an app with a ViewSwitcher which holds a MapView and another View and I want to save the MapView's bitmap as an image. This works well, if the MapView has been visible at least once by doing something like…
Ridcully
  • 23,362
  • 7
  • 71
  • 86
1
vote
1 answer

Dynamic use of viewswitcher / viewflipper

I have a file toto.xml with a layout that contains a TextView and a ImageView. and I have another file main.xml that contains a ViewSwitcher. the question: How to integrate toto.xml in ViewSwitcher dynamically with different content and editable in…
Zombie_Colonel
  • 227
  • 1
  • 7
  • 17
1
vote
3 answers

Using ViewSwitcher with Eclipse IDE

I am new to android programming, and I am using eclipse. I am using ViewSwitcher, and able to switch back and forth between views. My question is with eclipse. In eclipse, how can I edit the different layouts graphically? Only the first layout is…
Karthik
  • 11
  • 2
1
vote
1 answer

View.addView() throws IllegalStateException (ViewSwitcher)`

I have a ViewSwitcher and want to add views to it: // initialize views final ViewSwitcher switcher = new ViewSwitcher(this); layMenu = (LinearLayout)findViewById(R.id.menu_main_view); final LevelPicker levelPicker = new…
user717572
  • 3,626
  • 7
  • 35
  • 60
1
vote
0 answers

Android Focus issue at start using ViewSwitcher

So I'm developing an Android App, it's a very simple app right now just 2 views which are switch using a ViewSwitcher. On each page there is a button to switch the views. For whatever reason the using the ViewSwitcher with an transition (smooth…
watcher278
  • 65
  • 6
1
vote
1 answer

Get value of selected View in ViewSwitcher

I'm using a ViewSwitcher to switch between two Views (as it is supposed to be used). Here's the ViewSwitcher code : final ViewSwitcher viewSwitcher = new ViewSwitcher(getApplicationContext()); TextView t = new TextView(this); …
Reaperino
  • 145
  • 8
1
vote
1 answer

Second view of ViewSwitcher doesn't show up

I'm trying to add a simple ViewSwitcher with two ImageViews as children. But no matter what I try, the second child remains invisible. In the XML layout preview in Android Studio it looks like the second child has a size 0x0 pixels. The first child…
Incinerator
  • 2,589
  • 3
  • 23
  • 30
1
vote
1 answer

Screen orientation in only one child of a ViewSwitcher in Android

I've got a ViewSwitcher containing a LinearLayout in position 0, and an ImageView in position 1. Now I want the LinearLayout only to be shown as Portrait, and, when the ImageView is shown, give the user the chance to rotate the device and see that…
Aitor Gómez
  • 7,317
  • 3
  • 20
  • 28
1
vote
1 answer

How to save the last view set by viewSwitcher and restore it when relaunching activity?

I have an Activity that uses a ViewSwitcher to switch between two views. The onCreate() method uses setContentview() to set the view to one of the two views. When leaving the Activity and going back to it again later, I want the view that was shown…
1
vote
2 answers

ViewSwitcher not going to previous view

Hello I am trying to use a viewswitcher to go back and forth between and TextView and an EditText. My view switches to an edittext from a textview. But does not switch back. Here is my xml:
Dreamers Org
  • 1,151
  • 3
  • 12
  • 30