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
1
vote
1 answer

Android: Different Java files for each view

I'm building an Android application which contains a fixed header with the application title in it. Right now, when the application changes activities, the header will slide out and slide in as well because both activity's have the same header. I…
Niles11
  • 553
  • 1
  • 6
  • 17
0
votes
1 answer

Back Button works not as Expected with TabGroupActivity and ViewSwitcher

I have some strange effects in my Android App. I use a TabHoster with TabGroupActivities for each Tab. Works pretty good except the behaviour of the Back Button. An Activity is launched and responds to the Back button. Then I start a Child Activity…
Hernd DerBeld
  • 563
  • 1
  • 5
  • 7
0
votes
1 answer

ViewSwitcher and ListView

I have following layout But when I switch ViewSwitcher(by onTouchListener) the onItemClickListener of ListView…
0
votes
1 answer

Unable to switch mapviews using ViewSwitcher

I am trying to use ViewSwitcher to switch between two MapView objects (GIS based). But I get the following exception at magnifyMap (**line xyz**) mapview : java.lang.IllegalStateException: The specified child already has a parent. You must call…
0
votes
1 answer

android ViewSwitcher orientation issues

I have a viewSwitcher containing two views. Is it possible that when I am on a certain view, to block screen orientation changes?
Buda Gavril
  • 21,409
  • 40
  • 127
  • 196
0
votes
1 answer

Just so lost... ViewSwitcher? Create an Activity then add to ViewSwitcher?

I'm new to Android and find it brutal (there seems to be an near infinite number of details and dependencies to remember). Anywho, I got the TextSwitcher1 example app working, which uses ViewSwitcher. I'm assuming ViewSwitcher is the way to go, need…
Gerry
  • 1,031
  • 1
  • 14
  • 30
0
votes
1 answer

ViewSwitcher as a ListView item - how to call .showNext() on correct ViewSwitcher item?

I have a ListView with ViewSwitcher items. The goal is to tap a list item to switch between ViewSwitcher views. Tapping works as expected, but scrolling away from a tapped item and then back sometimes changes which item is displaying the second view…
mjwhitt
  • 63
  • 4
0
votes
3 answers

Switching 2 rows in a tablelayout in android

I have a tablelayout in Android like this: 1) Row == IMAGEVIEW | TEXTVIEW 2) Row == IMAGEVIEW | SPINNER Now what I need to do is switch the TEXTVIEW/SPINNER. The one from row 2 goes to row 1 and the one from 1 goes to 2. Would be awesome to have a…
Christian
  • 6,961
  • 10
  • 54
  • 82
0
votes
1 answer

ViewSwitcher not switching view with .showNext() at initialization, after Livedata change is observed

I have a ViewSwitcher inside a DialogFragment. The switcher holds 2 views, a "1. selection view" and a "2. selected view". The initial view is the defaulted to "1. selection view". When fromType is non-zero from the observing event database, I want…
PhantomCosmos
  • 119
  • 1
  • 7
0
votes
1 answer

Viewswitcher for two layouts

I couldn't able to deal with viewswitcher. I want to have two buttons at the center top and center bottom. when we click the centertop button one view should translate from top to bottom and reverse should possible when we click centerbottom…
user709589
0
votes
1 answer

Use gallery instead of ViewSwitcher

I currently use a ViewSwitcher in my app but now I'm facing a problem because I need more than 2 views to switch between. As ViewSwitcher does not accept more than 2 children, I've read that it's possible to use the Gallery widget to do so. Each…
sergi
  • 969
  • 5
  • 14
  • 22
0
votes
1 answer

ViewFlipper with detail views from a ListActivity?

I feel like I'm missing something basic, and I'm actually kind of embarrassed asking this question. But that's what happens when you start learning a new platform... I have a ListViewActivity that is populated via a CursorAdapter. When a list item…
Kenneth Cummins
  • 407
  • 1
  • 4
  • 13
0
votes
3 answers

Android UI: how to replace one part of the screen while mainting the rest

I'm trying to achieve the effect that is part of the android google talk application on the chat window. The effect is that there is a static top and bottom, but you can swipe between the various open chats that you have. in other words, I'm trying…
ekatz
  • 963
  • 3
  • 18
  • 38
0
votes
0 answers

Using EditText in ViewSwitcher doesn't enable it to be editable at first touch

I am using ViewSwitcher to switch between EditText and TextView. When I click the TextView for the first time, it changes to EditText and then I have to click EditText again so that the keyboard appears and I to be able to edit the text. The…
M.Moustafa
  • 31
  • 1
  • 7
0
votes
1 answer

Android widget imageswitcher?

how do I use an imageswitcher in a widget? my code compiles fine, but when I try to create my widget it gives an error: Error inflating AppWidget AppWidgetProviderInfo(provider=ComponentInfo{test.basic/test.basic.HelloWorldWidget}):…