I just want a flashing screen!!!

Put your problem here if it does not fit any of the other categories.

I just want a flashing screen!!!

Postby Wardog1368 » Sun Mar 06, 2011 5:47 am

Hey guys, I've been trying to do this way too long. All I want the screen to do is switch from one background color to another. Of course you might know this is more difficult than it sounds because setContent View can only be called once in an activity and actually be expected to change the background.

For more specific info on my troubles, check out these two stack Overflow Questions.



As you can see I've tried a bunch of different things and I'm sure I've gone waaaaaaaaay to far.
I'm willing to go back to square one at this point. So if anyone would like to point to the three lines
of code that will get this done I'd appreciate it.

I just know when I get the answer I'm going to feel really dumb so let me have it.
Once Poster
Once Poster
Posts: 1
Joined: Sun Mar 06, 2011 5:40 am


Re: I just want a flashing screen!!!

Postby strider2023 » Mon Mar 07, 2011 5:40 am

You can try a custom animation...
Senior Developer
Senior Developer
Posts: 126
Joined: Tue Mar 02, 2010 6:34 am
Location: Chennai, India

Re: I just want a flashing screen!!!

Postby jonbonazza » Wed Mar 09, 2011 10:19 pm

Try something like this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. LinearLayout layout = (LinearLayout)findViewById(R.id.LinearLayoutsID);
  2. layout.setBackgroundResource(R.color.ColorName);
  3. layout.invalidate();
Parsed in 0.031 seconds, using GeSHi
Master Developer
Master Developer
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: I just want a flashing screen!!!

Postby vhalexxs » Wed Mar 16, 2011 3:58 am


You can use OpenGL ES to switch background into different color, check this article http://www.droidnova.com/android-3d-gam ... i,312.html. The article shows how to change into different background color using opengl.

Alex Escobar
Senior Android Engineer
Airpush.com: The Push Notification Ad Network
User avatar
Posts: 28
Joined: Mon Mar 14, 2011 3:19 am


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 21 guests