• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

odd framelayout/surfaceview problem

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
PegView):


And now the xml...

>
 
Ken Truitt
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)

Thanks

ps if you download it and don't want to keep it, remember to return it within FIFTEEN minutes
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic