Hi,
I have an application which has been running nicely on Harrier and iMate devices, well any PPC devices really because of their rectangular screen shape.
My client has gone and bought some Palm Treo 700wx devices, and they have a smaller square screen.
In the resource of my project the screens are designed to fit PPC. When it runs on the Treo the Treo automatically pops up a scroll bar to allow the whole view to be seen.
The issue is when I first go into the app I can't see the top of the screen, about 20 odd pixels heigh aren't displayed. The scroll bar still displays and I can scroll down to the bottom of the view, and when I scroll up again the top of the screen is still out of sight.
If I exit the app just by tapping on the x in the top right corner (so the app is still running, not exiting properly via my Exit button which shuts down the app), I exit the app and then when I go back into the app the screens are displayed correctly, there is no missing space at the top of the screen.
If I exit the app via my exit button and then start the app again, the top of the view is missing again.
Does anyone know why the screen isn't displayed correctly when I first enter the app, or why it should come right when reloading the view again? Has anyone else had problems with screen layout when putting PPC apps on the square Treo 700wx?
Thanks
It sounds like you have a 'refresh' problem. I haven't encountered this my self and it is really hard to diagnose when you don't even tell us what language your app is written in, but basically here is what I think happens:
When your app is launched, part of its window doesn't get properly painted (not sure why exactly).
When you click the X the app isn't closed, but minimized.
When you return to it the window is maximized and repainted. Second repaint goes correctly.
The quick solution to this would be to force a window refresh just after the app is fully started.
Sorry I forgot to add the language.. it's written in eVC++ 3.0
I'll give the refresh a go, thanks
Further Questions..
I thought that minimising and then maximising the screen fixed the problem, but only partially..
Because the screen in resource is designed for regular PPC it is bigger than the Treo 700 screen size, so the OS automatically shows a scroll bar.
The new issue I'm seeing is to do with the scroll bar. The steps I take to reproduce the issue are:
1. Go to View1, and I scroll down the view (I'm using CView not CDialog)
2. Go to View2
3. Go back to View1. When I go back to the first view the scrollbar is scrolled down in the position I left it.
4. Scroll up to top of view and some of the controls in the wrong place. Some controls I dynamically create in OnInitialUpdate, and as part of the Create() I pass in CRect to tell it where to create the control.
If I set CRect.top to say 10, it's created 10 down from the top of the visible screen. The problem is that because I've scrolled the view previously the view draws it 10 down on the visible portion of the view.
I had thought that the easiest solution would be to always reset the scroll bar to the top of the view before creating my controls, but I'm not sure how to force the OS scroll bar to the top of the view. I've tried SetScrollPos(0,0) or ScrollWindow(0, y). ScrollWindow moves the actual view up or down, but the OS scrollbar is still in the same position.
Any ideas on how to set my view window to the top and to reset the scrollbar?
Thanks again
How to refresh a view?
I have sorted the issue mentioned just above, by finding the scroll position and factoring in that when I set the value of CRect area of the controls I need to dynamically draw.
I'm now just left with the first issue, of when I first start up the app the top part of the window and scrollbar are covered by the Title/Taskbar at the top of the screen.
If I close the app via the x button and restart the app, the issue resolves itself. Or if I open up any dlg like the About screen or even display an AfxMessageBox, when I close the dialog the original screen is redrawn correctly, in the correct position and scroll bar fully shown.
I have tried calling RecalcLayout(), RefreshWindow(), UpdateWindow(), Sending WM_SIZE messages and a whole range of things, but I can't seem to get the screen refreshing correctly apart from when I open any dialog and close that dialog.
When you close a dialog what messages get sent to the previous view that force it to redraw? Does anyone have any suggestions how I can force a refresh myself?
Thanks again
Did you try InvalidateRect?
I am getting a bit rusty with MFC, since I now try to do things the hard way and use pure win 32, but this should work.
If you can't use it as a class member, call the API directly using you view GetSafeHwnd() function for window handle). Use NULL for lpRect to redraw the whole window and FALSE for bErase to prevent flickering.
Note that UpdateWindow() only triggers repaint if part of the window becomes invalid (the contents needs redrawing).
No I hadn't thought of using InvalidateRect(), so I should give it a go.
In the end I just wanted the issue fixed so opted for a quick 'n dirty solution of displaying a temp CDialog as soon as the app starts and calling EndDialog() immediately in the OnInitDialog() so the dialog disappears before you see it.
It worked and the original screen gets updated to correct size, layout and scroll bar.
Cheers.
I've developed and app that is a slide show of pictures which each play a sound when you tap them. It's like a picture book for ages 2-4.
The problem is, since android won't let you capture a home button press and essentially disable it, when parents give the phone to their child to play with unattended (brave parent), the child can inadvertenly exit the app and then make calls or otherwise tweak the phone.
There are two other apps that currently have a psuedo fix for this issue. The apps are Toddler Lock and ToddlePhone. I've tried contacting the developers of these apps for some guidance but they haven't been willing to disclose anything, which if fine, but does anyone here have any suggestions?
It looks like both of those other apps are acting like a home screen replacement app. When you enable the "childproof mode" on those apps the user is prompted to chose and app for the action and the choices are "Launcher, LauncherPro, etc." plus the toddler app. You then have to make the toddler app the default and voila, the phone is "locked" and can only be "unlocked" using a key combination or touching the four corners of the screen, etc. when you "unlock" the phone. your normal home screen app default restored. You don't even have to make the toddler app the default the next time you enable the "childproof mode".
I have read that these two apps have problems with Samsung phones and they can cause an an infinite crash-and-restart-loop that requires a factory reset to fix. Obviously this is not the ideal solution to the problem but it looks like the only one availiable at this point.
Does anyone have any ideas on how to implement a "childproof mode"?
Could it run on top of the lock screen
So Do you mean making the app a lock screen replacement? I suppose that could work.
Do you have a suggestion on how to accomplish that?
Hi All,
I have got this little application "Super Launcher" fixed at the bottom side without knowing where it comes from and it installed alone. It is represented as an arrow directed to th bottom too and when I click on it, a very small window opens at the center top side of the screen.
Anyway, I would say that I tried almost every thing I know to remove it but could not succeed.
I am calling you for help please.
Many thanks
It is a part of Super Manager and it is a question of settings only.
Cheers
If you're referring to: https://market.android.com/details?id=androidcap.superlauncher.lite
Why can't you uninstall it from the app drawer (unless there is no icon) - OR - from tablet settings under applications management?
Hello,
I am using CyanogenMod nightlies and would like to setup my long-press home option to shut of the screen and lock the device. There is an option to have it run a script from gscript, but I can't find the right commands. I have search the internet and haven't found anything(maybe not looking for the right thing).
I have also tried some programs from the market(didn't try them all), but they have funny side effects. The programs make the arrows that allow you to hide the status bar appear but not function, and won't go away without a reboot. They even show when I'm on the home screen.
Any help, advice, or some direction to where I could find the answer would be great.
Thanks,
Rsotbiemrptson
Been struggling with Touchnooter 1.6.24 and 1.6.22 for several weeks with a fairly new Nook Touch. Some Android system and app buttons on the very bottom don't respond. These are key buttons such as the Android Market accept terms of use, the Add app Finish button, and the SlideMe accept button. I found a work around for the home page bottom buttons that at least lets me access the app drawer. If the status bar is set to hidden the bottom buttons come up a very small amount and then respond. I haven't found a way to hide the status bar in apps though. I'm currently trying to figure out how to get the Nook recognized as a device so I can load the driver thats supposed to let me use adb to install apps. I've found that putting apps on the SD card prior to installing Touchnooter and starting the adk in Root Explorer just gives an error that non Android Market apps are blocked.
The real solution is to get everything on the screen. Presumably all the bottom buttons will work if the height could be shrunk. How do I do this?
Could BN be trying to block rooting by introducing small changes into recent Nooks?
Stumbled on a work around once I figured out how to use adb. All the google hits about using USB for adb had me confused. Once I realized that the SDK adb is made to work over wifi I was able to install Dolphin browser. I discovered that it has a setting for landscape, and that its add-ons are loaded through the Android Market. AM pops up in landscape mode and the accept button is no longer on the bottom. Now I can install software from the AM app and I can start making good use of my Nook.
I'm convinced that this isn't a peculiar fault of my Nook and that the Android window is not set right with Touchnooter for at least some Nooks, maybe the more recent ones. Unless I can find another app that sets landscape for all apps, or that allows the window size to be customized, there are still major problems with the Touchnooter package on my Nook. Can't uninstall, for example, since the prompt button is on the very bottom. Have to rm with adb.