:: problem with TextSwitcher

by Imran » Thu, 13 Nov 2008 03:29:40 GMT

Sponsored Links
 Hi All

       This is my code... i am  using  TextSwitcher.... i think  every
thing is fine but it is still throwing ClassCastException

switcher1 = (TextSwitcher) findViewById(R.id.switcher1);
                switcher2 = (TextSwitcher) findViewById(R.id.switcher2);

                switcher1.setFactory(new ViewSwitcher.ViewFactory() {
                        public View makeView() {
                                return score;

                switcher2.setFactory(new ViewSwitcher.ViewFactory() {
                        public View makeView() {
                                return level;

 This is the exception

 11-12 16:54:28.093: ERROR/AndroidRuntime(1609): Caused by:
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams

And it is occuring at

     switcher1.setFactory(new ViewSwitcher.ViewFactory() {
                        public View makeView() {
                                return score;

     can any help me out please.....!!!!



Other Threads

1. How to publish Motorolo Xoom Build to market

Hey Guys,

We have some applications already in android market. We have managed to
support *Motorola Xoom and Galaxy Tab2* for some of them. I was just
wondering how i can publish my applciation as our existing application have
1.6 nd onwards support. So my application is already visible for XOOM and
Tab2. *What should i do to have one build for all Phone Devices and one for
Tablet Devices? But for Tablet i just want to see the Tablet Build*. As two
builds can be confusing to User. How can i achieve this with out changing
Application Name?

I can not find any Threads associate with this problem. Am i the first one
to ask this or i am doing something wrong in Manifest?  HELP !!!!
Thanks in Advance !!!!



2. How to implement a list view same as contacts list in Android 2.2


We need to implement a screen with list in such a way that it has a

Section header / group header / Alphabetical header

followed by the list of items

Example: In contacts list, Names starting with letter "A" are
displayed under the section header with title "A". Similarly for all
other letters. Also while scrolling, the section headers stops in the
top of the screen and child views has to be shrinked. So that user
could again select the header and see the contents under them.

Can anyone help in implementing this?

Thanks in advance.


3. Anchor tag not working in dialog

4. Getting Bitmap from a canvas

5. Theming an Activity as a Dialog

6. [Starting] Help

7. Android on toshiba g810