Wrong scrren height..
3 posters
Page 1 of 1
Wrong scrren height..
Hi
I am getting wrong screen height when using getHeight() on Nokia 6600. I used setFullScreenMode(true) but still it is giving wrong. I also tried sizechanged(int w, int h). But not successful. Can anyone tell me how to use sizechanged properly or any other solution.
Regards
Sukesh
I am getting wrong screen height when using getHeight() on Nokia 6600. I used setFullScreenMode(true) but still it is giving wrong. I also tried sizechanged(int w, int h). But not successful. Can anyone tell me how to use sizechanged properly or any other solution.
Regards
Sukesh
sukesh- Posts : 8
Join date : 2007-09-10
Re: Wrong scrren height..
Sukesh, what are the values that u get in sizeChanged().
I also got the same problem while working with one of my earlier project. Dont use getHeight() and getWidth() because they may be some synchronizatio issues. Do assign height and width that u get in sizeChanged to some global variables. Use these newely assinged values then.
Do let me know for further issue on it.
Guantana
I also got the same problem while working with one of my earlier project. Dont use getHeight() and getWidth() because they may be some synchronizatio issues. Do assign height and width that u get in sizeChanged to some global variables. Use these newely assinged values then.
Do let me know for further issue on it.
Guantana
Re: Wrong scrren height..
Thanks. But I tell you what I did.
int width,height;
constructor()
{
setFullScreenMode(true);
}
protected void sizeChanged(int w, int h)
{
width=w;
height=h;
}
After that when I am using width and height, I am not getting the proper values. Is there any problem in this implementation?
Regards
Sukesh
int width,height;
constructor()
{
setFullScreenMode(true);
}
protected void sizeChanged(int w, int h)
{
width=w;
height=h;
}
After that when I am using width and height, I am not getting the proper values. Is there any problem in this implementation?
Regards
Sukesh
sukesh- Posts : 8
Join date : 2007-09-10
Re: Wrong scrren height..
sukesh wrote:Thanks. But I tell you what I did.
int width,height;
constructor()
{
setFullScreenMode(true);
}
protected void sizeChanged(int w, int h)
{
width=w;
height=h;
}
After that when I am using width and height, I am not getting the proper values. Is there any problem in this
implementation?
Regards
Sukesh
Hi Sukesh ,
I can understand your problem even I have faced same problem. So I m giving you the code that I m sure that will work for you.
public Constuctor() {
setFullScreenMode(true);
canvasWidth = getWidth();
canvasHeight = getHeight();
}
public void sizeChanged(int w, int h) {
canvasWidth = getWidth();
canvasHeight = getHeight();
}
The above program will work for every phone. Basically their is a problem with few phones that they don't make proper callbacks of sizeChanged method. Also their is one more problem that sometimes sizechanged method is called by the phones with wrong value of parameter w and h . But try out the above code I m sure it work for u.
thanks
Nishtha.
Re: Wrong scrren height..
sukesh wrote:Thanks. But I tell you what I did.
int width,height;
constructor()
{
setFullScreenMode(true);
}
protected void sizeChanged(int w, int h)
{
width=w;
height=h;
}
After that when I am using width and height, I am not getting the proper values. Is there any problem in this
implementation?
Regards
Sukesh
Hi Sukesh ,
I can understand your problem even I have faced same problem. So I m giving you the code that I m sure that will work for you.
public Constuctor() {
setFullScreenMode(true);
canvasWidth = getWidth();
canvasHeight = getHeight();
}
public void sizeChanged(int w, int h) {
canvasWidth = getWidth();
canvasHeight = getHeight();
}
The above program will work for every phone. Basically their is a problem with few phones that they don't make proper callbacks of sizeChanged method. Also their is one more problem that sometimes sizechanged method is called by the phones with wrong value of parameter w and h . But try out the above code I m sure it work for u.
thanks
Nishtha.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|