Related
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 done a search in both the Leo forums as well as xda in general and can't see a solution for my problem:
I am unable to scroll within excel mobile. Whenever I drag my finger across the screen it selects cells rather than scrolling. This isn't a problem if I wish to move up and down as the vertical scroll bar is visible and can be used. However, the horizontal scroll bar doesn't display even though it is selected in the menu.
Can anyone suggest what I can do to fix this? Thanks in advance.
bump
can anyone help?
When you open Excel, click on the right side of the screen (= scroll bar) and the scroll-button will appear. Use that to scroll up and down. The same goes for the horizontal scroll bar (well, it's on the bottom of the Excel screen and you scroll from left to right ;-)). Should be there, otherwise I wouldn't know.
Thanks for the reply but unfortunately the horizontal scroll bar isn't visible on the screen, even though when I go into view -> show the horizontal scroll bar checkbox is ticked.
The vertical scroll bar also works like a "normal" scroll bar in that the scrolling part is always the same size; it doesn't increase in size when the scroll bar is tapped on. However, I seem to remember that's how it used to work when I first got the phone, so perhaps in all the various tweaks and things I've done since I've unwittingly edited something that is affecting it?!
Oh well.
You're not in full screen mode are you?
And have you tried opening a new document?
No not in full screen mode, and I have opened various different (existing) spreadsheets, and tried creating a new one and the same thing happens in all of them.
I've solved the problem. A little look into HD2Tweak and I spotted an option for horizontal scroll bar which was set to none. I changed it to normal and a quick soft reset later and I was able to see the horizontal scroll bar again; not just in Excel but other apps too.
I don't remember switching it to none, but am just glad it's working again now!
I just wanted to point a few things about the Samsung Vibrant everyone is complaining about how this phone does not have a D-Pad and i just wanted to clear this up.
In fact this phone has a d-pad, select the samsung keyboard if not already in use hold down the key on the keyboard that is use to select numbers and symbols you will see a d-pad appear with copy, past select text options.
Also to easily dim your screen or to brighten your screen, slide your finger across the top of the screen where the notification bar is and you will notice your screen brighten or darken according to which way you slide your finger. (Note you may need to disable auto brightness for this function to be activated.
Heres a pic of the dpad
The Swype keyboard also has a really nice d-pad. Just swype from the tutorial icon right to the SYM key and it will show up.
Sent from my Vibrant, using the XDA app.
Thank you very much for the brightness slide tip!!!
Anyone else accidentally changing the brightness a lot? I swipe the bar with my left thumb, and if it's too angled of a swipe, my screen brightness goes to 11. I never thought I'd complain about a screen being too bright, lol.
can we activate the d-pad when not in a text entry field? I used the trackball on my G1 to select html anchors to get at small links or hovering elements
Wow I did not know this thanks for the info.
Sent from my SGH-T959 using XDA App
cbisquit said:
can we activate the d-pad when not in a text entry field? I used the trackball on my G1 to select html anchors to get at small links or hovering elements
Click to expand...
Click to collapse
It can be used on a web page, but I've only gotten it to come up by hitting a text box first. For that, even the addresses bar works.
-bZj
_____
-sent from my Samsung Vibrant via XDAapp
Awesome. Thanks for sharing this info.
Sent from my SGH-T959 using XDA App
keyboard almost always pulls up with a long press on menu. but in the browser this also pulls up the URL bar so no can do. also what is 'keyboard sweeping' in the samsung keyboad options?
cbisquit said:
can we activate the d-pad when not in a text entry field? I used the trackball on my G1 to select html anchors to get at small links or hovering elements
Click to expand...
Click to collapse
yes all you have to do is hold down the menu key they keyboard will pop up and then you just have to do the process up top..
What about when you need to see text in a menu selection that is truncated to the side?
For example, if you go to Market -> Apps, under Finance and Health, you can see there are text that runs off to the right edge you can't read. In my old phone MyTouch, if I highlight Finance, the text will scroll across so I can read the rest of the line. Can't do this right now with the Vibrant.
jkcheng122 said:
What about when you need to see text in a menu selection that is truncated to the side?
For example, if you go to Market -> Apps, under Finance and Health, you can see there are text that runs off to the right edge you can't read. In my old phone MyTouch, if I highlight Finance, the text will scroll across so I can read the rest of the line. Can't do this right now with the Vibrant.
Click to expand...
Click to collapse
i havent ran across this problem. i am pretty sure when 2.2 comes out it will fix alot of the small issues, like on my nexus
soklean said:
yes all you have to do is hold down the menu key they keyboard will pop up and then you just have to do the process up top..
Click to expand...
Click to collapse
I'm not seeing that option since holding down menu opens the url bar which can't be closed independently of the keyboard.
Sent from my Vibrant using XDA app
Awesome post, thanks.
Anyone figure out a better way to auto-fit text on the browser? I find tilting my phone to change the orientation and tilting it back makes it auto-fit. Phones like the Incredible do it as you're doing pinch to zoom--no need to flip the phone around.
blueman9 said:
The Swype keyboard also has a really nice d-pad. Just swype from the tutorial icon right to the SYM key and it will show up.
Sent from my Vibrant, using the XDA app.
Click to expand...
Click to collapse
excellent! I didn't realize that was a d pad lol.. i always thought of a d pad being like a trackball or flat button like on the blackberry bold 9700
thanks to you and the original poster for the tip. I found out about the swipe for screen brightness by John on droiddog dot com
very nice but in swype you can do the same thing just swype from the swype key at the bottom left to the SYM key right beside it and you get arrows and some other goodies.
Oh wow! This was my biggest complaint about the Vibrant. Thank you very much.
Sent from my SGH-T959 using XDA App
For those saying "o wow", check the sticky. Surely some other things you've missed.
Dougefresh91 said:
Awesome post, thanks.
Anyone figure out a better way to auto-fit text on the browser? I find tilting my phone to change the orientation and tilting it back makes it auto-fit. Phones like the Incredible do it as you're doing pinch to zoom--no need to flip the phone around.
Click to expand...
Click to collapse
I hit the - or + buttons back and forth to get the text to wrap, yeah it's a bummer they don't wrap using the pinch zoom. Also you can double tap the screen to initiate zoom, that method also auto-fits the text.
I am new to Android and loving my Aria so far. The only thing that is really bugging me is the text input. I am having a little separation anxiety from my keyboard and it seems like I must be missing something. First I am using the swype keyboard but I don't think that is related to my question.
When you enter text into any input, say the body of an email in the gmail app, is there an easy way to go back and edit that text? I often find myself tapping 5 or 6 times to try to get the cursor back to the exact place that I need to edit and it gets really frustrating? On the iPhone when you want to edit text a search window pops up where your finger is and you can slide it back and forth to find the exact spot that you are looking for. Is there anything like this for Android?
Thanks for any feedback.
cj
Slide your finger over the little track pad between the menu and back button at the bottom of the phone. (Its the small silver circle). I think some people think that is the microphone but its not.
Ki77erB said:
Slide your finger over the little track pad between the menu and back button at the bottom of the phone. (Its the small silver circle). I think some people think that is the microphone but its not.
Click to expand...
Click to collapse
Aaah. I did know that was an optical input but I did not even think of it. I rarely use it since scrolling and selecting is so easy.
Thanks,
cj
chrisjaffe said:
I am new to Android and loving my Aria so far. The only thing that is really bugging me is the text input. I am having a little separation anxiety from my keyboard and it seems like I must be missing something. First I am using the swype keyboard but I don't think that is related to my question.
When you enter text into any input, say the body of an email in the gmail app, is there an easy way to go back and edit that text? I often find myself tapping 5 or 6 times to try to get the cursor back to the exact place that I need to edit and it gets really frustrating? On the iPhone when you want to edit text a search window pops up where your finger is and you can slide it back and forth to find the exact spot that you are looking for. Is there anything like this for Android?
Thanks for any feedback.
cj
Click to expand...
Click to collapse
Yes i hate trying to get the cursor back to edit a word glad someone asked
never thought about using the trackball sure makes things lot easier
Optical TrackPad FTW!
Sent from my Liberty using XDA App
Even better than the optical trackpad, Smart Keyboard has an arrow layout option that let's you navigate text way faster. The board is real nice too.
I'm working on an app that has about 15-20 questions for the user to answer. Input is handled by EditText and Spinner widgets. I've played around with a number of different XML layout designs (Linear and Table) and can't seem to both make the text input either fit or look well on the phone screen. Here's an example (made up, but similar in length) of some of the text that I'm working with:
I have a relative that has two green eyes. (the blank would be a spinner)
My shoes don't fit to tight after jumping on purple trampolines.
My dog did have flees last year.
If the query sentences are long, it's because the question is long and I can't make it any shorter.
Does any design oriented guru out there have any suggestions as to how I might look at laying this out and have it look decent? If you know of other data intensive apps that you could point me to, I'd be happy to check them out.
Thanks
Are you trying to fit everything in one window?
Sent from my SGH-T959 using XDA App
I'm going for one scrollable screen (scrolling vertically, not horizontally), but I'm willing to consider anything.
Have you messed around with a ScrollView? http://developer.android.com/reference/android/widget/ScrollView.html
What if you put a vertical linear layout inside of a scroll view, then have each child of the linear layout be whatever views you use to handle the questions?
Sent from my SGH-T959 using XDA App
I think it would be easier to have each question on a different screen. Have some kind of counter at the top, like "question 1 of 15", and have next & previous buttons at the bottom.
Chalup said:
Have you messed around with a ScrollView? http://developer.android.com/reference/android/widget/ScrollView.html
What if you put a vertical linear layout inside of a scroll view, then have each child of the linear layout be whatever views you use to handle the questions?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
I do have my table wrapped in ScrollView, but I'm going to try the linear vertical and see how it looks. Thanks.
jgittins said:
I think it would be easier to have each question on a different screen. Have some kind of counter at the top, like "question 1 of 15", and have next & previous buttons at the bottom.
Click to expand...
Click to collapse
I didn't even think of that, which is why I started the thread. Thanks for the idea.
I'm still open to any other design suggestions anyone might have.
jgittins said:
I think it would be easier to have each question on a different screen. Have some kind of counter at the top, like "question 1 of 15", and have next & previous buttons at the bottom.
Click to expand...
Click to collapse
Good idea. You could have it so that upon answering a question the user is brought to the next question. I'm picturing the initial setup activity that opens when you first turn on an android phone