• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

odd framelayout/surfaceview problem  RSS feed

Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[actually i'm going to have another go at this myself--sometimes
helps to write it out]
Ken Truitt
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I made some changes, checked on another phone in a store, and still the same problem, which is
described below.


I have a framelayout that has, so far as we're concerned with here, a surfaceview added to it, which
would occupy the entire screen, and then a linearlayout, which would lie over that screen. It has always
worked in the emulators, but when I tried it on some 2.1 phones in a store, the imageviews in the
linearlayout (vertical) didn't show. I know they were there somewhere because they behaved correctly
when I clicked where they should be. I think my clicks would click through the surfaceview. So I'm
guessing somehow, despite being defined in the correct order in the xml, the linearlayout is getting in
the framelayout AFTER the surfaceview, so it's obscurred. This happened 8 out of 10 times when I
was in the store. 2 times it worked just right.

The imageviews are added to the linearlayout programatically shortly after oncreate(). any ideas on
how this could happen? If you have a 2.1 phone and don't mind, it's BrainBuilder on the market. Return
it after you're done for no charge, as you know.

In the xml below, the relevant linearlayout is id=pegLayout. But first is the method that is called (now) at
the end of oncreate() in my one activity to populate the linearlayout with actual imageviews (subclassed to

And now the xml...

Ken Truitt
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey folks it would be great if someone--anyone--could download my app from the market ("BrainBuilder") onto
their 2.1 device and tell me if they're getting this problem that I related in my previous post.

It would get GREATER if someone might suggest some ideas to help me track down the issue. Given that
the imageviews display sometimes, and sometimes they don't, i can only imagine some kind of thread-like
issue. But I haven't spawned any threads.

Does it make sense to imagine that sometimes the linearlayout loads before the surfaceview (or other obscuring
view) and other times it doesn't?

AS I DO NOT HAVE A 2.1 DEVICE, I CANNOT TEST IT MYSELF (and yes, it works fine on the 2.1 emulator)


ps if you download it and don't want to keep it, remember to return it within FIFTEEN minutes
Hold that thought. Tiny ad:
global solutions you can do at home or in your backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!