Discussion Forums  >  Uncategorized

Replies: 22    Views: 222

Craige
Aspiring developer
Profile
Posts: 22
Reg: Jul 20, 2011
Dayton
220
09/25/11 01:58 AM (14 years ago)

Menu lists won't show until phone is turned from portrait to landscape in Android 1.5

I have an app that uses tabs and menu lists. When I click a tab that has a menu list nothing shows until I flip the phone from portrait to landscape or landscape to portrait. Any ideas why this is happening? Or is it just one of those bugs that are still being worked out for Android v1.5?
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/25/11 05:09 AM (14 years ago)
I'm seeing te same thing. I have completed 2 Apps as far. Well as I can go now with Android 1.5 and both do the same thing. Backig up a screen and going back into it again will also bring back the list menu items. I'm guessing it's beta thing and hoping the next release will correct it. They should be adding the rest of the screen functionalty as they have indicated in the readme files and in other posts over the last few days. Hoping that will be soon.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/25/11 11:10 PM (14 years ago)
Hi guys. Menu list screens should work with the current release. Not heard of the issue with it showing after rotating. @Craige: What's the console show when you tap the tab with the menu list? It should render. If not, something's broken and will need adjusted. BT_screen_menuList.java handles menu list screens. The onCreate method is pretty long (it's a complicated screen) and is the method that puts the list on the screen.
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/26/11 06:44 AM (14 years ago)
@David, I created 3 new applications under Android v1.5 In each case The list menu is blank when you first start the app on all screens. Once you rotate the device the list items will appear and they are good for that level of screen menus. If you drop down a level you need to do it again. I documented this with log files in a prior post. I will do that again here shortly... As I said I created 3 apps and they do it in all cases. Phone or tablet. Does not matter.
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/26/11 06:54 AM (14 years ago)
Here is the Logcat when selecting a Tab(2) that goes to a list Menu Screen that has an image at the top and a list items under that. List Items do not show. When I tirn device(Tablet) and back again they then show up. 09-26 08:34:55.188: WARN/ZZ(10598): BT_screen_menuList:onCreate 09-26 08:34:55.188: WARN/ZZ(10598): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: playbook 09-26 08:34:55.188: WARN/ZZ(10598): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: #223344 09-26 08:34:55.188: WARN/ZZ(10598): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: playbook 09-26 08:34:55.188: WARN/ZZ(10598): BT_viewUtilities:getNavBarForScreen: setting nav-bar color to: #223344 09-26 08:34:55.198: WARN/ZZ(10598): BT_screen_menuList:backgroundWorkerThread this screen does not use a background image 09-26 08:34:55.278: WARN/ZZ(10598): BT_screen_menuList:loading images names for searching...found 362 images in the /assets/BT_Images folder... 09-26 08:34:55.298: WARN/ZZ(10598): BT_screen_menuList:setHeaderImage 09-26 08:34:55.298: WARN/ZZ(10598): BT_screen_menuList: start GPS is set to NO in the applications configuration data, not starting GPS 09-26 08:34:55.298: WARN/ZZ(10598): BT_screen_menuList:onStart downloading screen data from URL 09-26 08:34:55.298: WARN/ZZ(10598): BT_screen_menuList:refreshScreenData 09-26 08:34:55.308: WARN/ZZ(10598): BT_screen_menuList:downloading screen data from http://www.buzztouch.com/appdata/v1.5.php?command=getChildItems&appGuid=EA11B38E2311E6D4349D3331E&apiKey=C28FFDE65B9061E444038CC&screenId=DE5A54F710C9E99A0B09390 09-26 08:34:55.308: WARN/ZZ(10598): BT_downloader:downloadPlainText from URL: http://www.buzztouch.com/appdata/v1.5.php?command=getChildItems&appGuid=EA11B38E2311E6D4349D3331E&apiKey=C28FFDE65B9061E444038CC&screenId=DE5A54F710C9E99A0B09390 09-26 08:34:56.208: WARN/ZZ(10598): BT_fileManager: saveTextFileToCache: DE5A54F710C9E99A0B09390_screenData.txt 09-26 08:34:56.248: WARN/ZZ(10598): BT_screen_menuList:parseScreenData 09-26 08:40:15.938: WARN/ZZ(10598): BT_screen_menuList:onConfigurationChanged to portrait 09-26 08:40:18.328: WARN/ZZ(10598): BT_screen_menuList:onConfigurationChanged to landscape
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/26/11 06:57 AM (14 years ago)
I thne select something from the sub menu. from the screen example above. Same thing. That logcat is below. 09-26 08:41:59.428: WARN/ZZ(10598): BT_screen_menuList:handleItemTap loads screen with itemId: 7DC75BFDD2649212093A051 09-26 08:41:59.428: WARN/ZZ(10598): BT_application:getScreenDataByItemId 7DC75BFDD2649212093A051 09-26 08:41:59.428: WARN/ZZ(10598): BT_application:getScreenDataByItemId screenType is BT_screen_menuList for screen with nickname: Offense 09-26 08:41:59.428: WARN/ZZ(10598): BT_act_controller:loadScreenObject for screen with nickname Offense and type BT_screen_menuList 09-26 08:41:59.488: WARN/ZZ(10598): BT_screen_menuList:onCreate 09-26 08:41:59.488: WARN/ZZ(10598): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: Offense 09-26 08:41:59.488: WARN/ZZ(10598): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: #223344 09-26 08:41:59.488: WARN/ZZ(10598): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: Offense 09-26 08:41:59.488: WARN/ZZ(10598): BT_screen_menuList:backgroundWorkerThread this screen does not use a background image 09-26 08:41:59.488: WARN/ZZ(10598): BT_viewUtilities:getNavBarForScreen: setting nav-bar color to: #223344 09-26 08:41:59.578: WARN/ZZ(10598): BT_screen_menuList:loading images names for searching...found 362 images in the /assets/BT_Images folder... 09-26 08:41:59.598: WARN/ZZ(10598): BT_screen_menuList:setHeaderImage 09-26 08:41:59.598: WARN/ZZ(10598): BT_screen_menuList: start GPS is set to NO in the applications configuration data, not starting GPS 09-26 08:41:59.598: WARN/ZZ(10598): BT_screen_menuList:onStart downloading screen data from URL 09-26 08:41:59.598: WARN/ZZ(10598): BT_screen_menuList:refreshScreenData 09-26 08:41:59.598: WARN/ZZ(10598): BT_screen_menuList:downloading screen data from http://www.buzztouch.com/appdata/v1.5.php?command=getChildItems&appGuid=EA11B38E2311E6D4349D3331E&apiKey=C28FFDE65B9061E444038CC&screenId=7DC75BFDD2649212093A051 09-26 08:41:59.598: WARN/ZZ(10598): BT_downloader:downloadPlainText from URL: http://www.buzztouch.com/appdata/v1.5.php?command=getChildItems&appGuid=EA11B38E2311E6D4349D3331E&apiKey=C28FFDE65B9061E444038CC&screenId=7DC75BFDD2649212093A051 09-26 08:42:03.438: WARN/ZZ(10598): BT_fileManager: saveTextFileToCache: 7DC75BFDD2649212093A051_screenData.txt 09-26 08:42:03.438: WARN/ZZ(10598): BT_screen_menuList:parseScreenData
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/26/11 08:50 AM (14 years ago)
Great post! I'll look into this in a few hours and re-post. Can't be too tough to figure out. And, if you're experiencing it, so are others - we just don't know it!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/26/11 10:00 AM (14 years ago)
Applause in IL. BT_screen_menuList.java has been updated on the download server and should be fine now. Some devices worked, others did not, strange. The fix was to invalidate the view after creating all the necessary parts. If you want to nerd-out... a) Near the end of the onCreate method a baseView.invalidate() line was added. b) Near the end of the parseScreenData method a myListView.invalidate() line was added. Tested on a few devices...works well. I WAS able to reproduce the issue but only after configuring a menu list screen like you had it (literally the same advanced options you chose). Amazing how many different ways there are to setup a darned list! This type of thing is exactly what were looking for in Phase 1...huge thanks.
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/26/11 11:29 AM (14 years ago)
No Cigar yet!! Not working for me. You indicated that the code was moved and on the server. I looked at the code based on what you said and I see it after I downloaded the new source... I think... at least a and b from above.... I tried it on my android LG phone and on a Motorola Xoom. Both are still doing the same thing. I deleted the app from each device. Downloaded the source again into eclipse after 1st deleting the project. Moved it to the phone and tablet. Tested same results.... One of my five tabs was populated with the list items. The others not so. Then when I selected the same tab that was populated and selected a sub-list item on that screen it did the same thing image but no list menu items again. -Greg
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/26/11 12:34 PM (14 years ago)
Hi greg....rats...that sucks. For sure if you see the invalidate() lines in two places you do have the latest code, so no trouble there. The testing devices I have here are Motorola Droid and HTC Aspire. I also use the simulator extensively. Not sure what to advise here. Also havn't heard the same report form anyone else. I wonder if something else is going on? Hmmm... maybe a test: Not sure how much energy you want to put into this but I don't have the same devices to test on so we'll need to balance this I guess? Maybe visit the layout part of the control panel and set the app to use one of your menus as a home screen. No tabs. Download, compile..test. I'm wondering if the trouble could be related to the tabbed layout? Grasping a bit...not sure. This test will put the menu as your launch screen and may or may not change anything. Debug attempt. The onCreate method does all sorts of work to create the layout. When you rotate the device the screen re-paints itself. This re-paint should call the parseScreenData method. The end of that method has the myListView.invalidate() call to make sure the list re-fills itself with the items in the data. This line was one of the additions this morning. Any ideas? I'll keep looking and re-post
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/26/11 12:45 PM (14 years ago)
What's strange is I'm running in the simulator also and it's doing the same thing. So it's not device specific I don't think. I can't imagine the PC has anything to do with it at least not when it's moved to the device. It acts exactly in the sim as it does on the device.
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/26/11 12:56 PM (14 years ago)
Does ths mean anything? 2nd line?? I get that when I run the sim and on the device..... Grasping maybe on my part.... 09-26 14:52:26.910: INFO/ActivityManager(157): Starting: Intent { cmp=com.playbookmanager/.BT_screen_menuList } from pid 17471 09-26 14:52:26.950: DEBUG/PhoneWindow(17471): couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView@4079a8e0 has no id. 09-26 14:52:27.090: DEBUG/dalvikvm(17471): GC_CONCURRENT freed 509K, 13% free 8424K/9607K, paused 2ms+2ms 09-26 14:52:27.110: DEBUG/dalvikvm(17471): GC_FOR_ALLOC freed 0K, 13% free 8424K/9607K, paused 23ms 09-26 14:52:27.110: INFO/dalvikvm-heap(17471): Grow heap (frag case) to 8.502MB for 218416-byte allocation 09-26 14:52:27.140: DEBUG/dalvikvm(17471): GC_FOR_ALLOC freed 4K, 13% free 8633K/9863K, paused 26ms 09-26 14:52:27.200: DEBUG/TabletStatusBar(207): lights on 09-26 14:52:27.480: INFO/ActivityManager(157): Displayed com.playbookmanager/.BT_screen_menuList: +533ms 09-26 14:52:28.040: DEBUG/TabletStatusBar(207): lights on
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/26/11 01:24 PM (14 years ago)
Besides what I mentioned above. I did the following: Test 1 - Changed layout to no tabs and set my home page to one of my screens(list menu) that is an image and 5 list items below. Same thing happened. Test 2 same as above but removed image - same results Both tests tried on the devices and the simulator..... Same results.... I dont think what I'm trying is that advanced or unusual is it? Tabbed layout. Tab 1 screen image only, tab 2 is menu list with image and 5 list items, Tab 3, tab 4 and Tab 5 are all like Tab 2... I have the same design on 2 other apps and all are doing the same thing on the simulator and the devices. Are you able to get into my project called playbookmanager and try it yourself. Maybe it's my eclipse environment for some reason?? I do have another PC with eclipse setup. I can try building on that one and testing it. The pc I;m using is a dell E6410... Ya I'm grasping at everything for a reason. When the next release comes out I was planing to use the button features also.... God help me.... lol
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/26/11 10:54 PM (14 years ago)
@gbakakos: Are you asking the same question in a different post? Like I mentioned earlier, I'm not sure what's going on. I doubt very much that it's the PC or Eclipse. The line in a few posts above that reads: 09-26 14:52:26.950: DEBUG/PhoneWindow(17471): couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView@4079a8e0 has no id. May be a clue. Good that you did the no-tabbed layout test, it confirms that the trouble is NOT related to the tabbed layout. And, because you created a few other tests, it doesn't sound like it's related to this one app. Yes, I was able to re-produce it with your project earlier but 'fixed it' with the additions of the invalidate() lines. It tested fine then. I've also since created a few other apps and had zero trouble on simulator and both devices here. And, to repeat, I've not heard this from anyone else after hundreds of download of Android v1.5. So... maybe we do have something funky going on with your machine / compiled / libraries...Who knows at this point. I made a few more adjustments to YOUR menu list screen from YOUR project (not the source-code download server). I've sent you a new version of the file. Go ahead an overwrite the BT_screen_menuList.java file in your playbook app and see if this changes anything. Like before... works here. Check your email in moment...
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/27/11 03:31 AM (14 years ago)
David, You da man... It works well so far and I just tested it on the tablet and with the simulator. I appreciate sticking with this with me. I’m not sure any info I gave you helped or not. Sorry about the other posts. Inpatients on my part. Thinking if it's at the top you would not forget. How dumb of me… My bad. So what's different with the code? Is this java file good for any project or is it specific to the Playbook project only at this moment. I'm an old ex- mainframe developer now in management for many years. Old habits are hard to lose.... To many long production support nights…. Can’t wait to see the added features soon. Thanks again...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/27/11 11:29 AM (14 years ago)
No sorries needed, this stuff super-duper-sucks sometimes (lots actually, code is strange all to often). The update is not specific to the playbook project. I'll end up updating he download server but have not yet...wanted to make sure something changed ;-) The update this time is the way the 'data adapter' was initialized and associated with 'the list.' Lists in Android use data adapter that tells the list how many items are available and what those itmes are. The adapter was being associated with the list and the screen was created. Then, on rotation, it seems to be getting disconnected from the list so no items showed. In this case it was like the list didn't understand what items to show. I'm not totally sure why this adjustment changed anything (I moved where this connection was made in the lifecyle of the screen). It also doesn't make sense that it only affected certain devices. Could be about a zillion things. The adjustment isn't any problem for the screen and like I mentioned, I'll change the download server now. You for SURE helped and your patience and persistance will help loads of others ;-)
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/27/11 11:58 AM (14 years ago)
You mentioned that the code was not specific to my playbook project so I assumed I could drop that same java file into my other project that was doing the thing and designed the exact same way. When I did that it got errors and would not let me rebuild the project to test in the simulator. The file you gave was that built/generated specific for my project therfore you would need to make the changes on the server so my other project will get a correct BT_screen_menuList,java file when its exported out. Do I have that right. I hope so... :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/27/11 12:05 PM (14 years ago)
Change the package name and delegate name in the java file, everything else is the same.
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/27/11 12:29 PM (14 years ago)
Thanks for the help... Will do...
 
luzifer666
Lost but trying
Profile
Posts: 26
Reg: Mar 04, 2011
España
260
like
09/27/11 04:51 PM (14 years ago)
In my application I get this error also thanks for your work
 
Craige
Aspiring developer
Profile
Posts: 22
Reg: Jul 20, 2011
Dayton
220
like
09/28/11 10:52 AM (14 years ago)
I rebuilt and reinstalled my application and the menu lists still will not show up until a screen rotation. After the rotation the menu list will show up fine until I update the application. Once the app is updated I have to rotate the screen again to make the menu lists appear.
 
theGreek
Aspiring developer
Profile
Posts: 648
Reg: May 25, 2011
Schaumburg, IL
7,830
like
09/28/11 10:54 AM (14 years ago)
David should be releasing the fix shortly from what he said in his comments above. I tested the update that he passed on to me and I'm happy to say it's correcting the issue just fine.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/29/11 01:30 AM (14 years ago)
@ Craige: The download server has been updated, give it another shot. Be sure to re-post if the update didn't fix your device like it did the others. Anything's possible ;-)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.