I finally solved my problem in not doing the onTouchEvent on the activity,
but on individual views - thus removed the need to check for Action Bar
height.
Thanks for everybody who helps!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To
OK, this is part of my code, very simple:
public boolean onTouchEvent(MotionEvent event) {
int count = event.getPointerCount();
...
int action = event.getAction();
int x = (int) event.getX();
int y = (int) event.getY() - absize;
...
return t
What you are claiming is happening is... well, you probably need to
explain more.
If you have an action bar, then by default your content is placed below it,
and the coordinate space of events received by the view will be relative to
where it is placed. This is true with all views in the hierarc
No it does not - at least this is the result of my test.
I got an ICS and a Honeycomb devices - the getY() values are exactly 56
pixels too low when the same app run on them. I have to subtract 56 from
the getY() to get the correct position. Same code works fine on 2.x and 1.x
device.
I am the
On Tue, Jul 3, 2012 at 6:53 PM, limtc wrote:
> I am doing a painting program and the MotionEvent getY() returns contains
> the height of action bar. I need to subtract the height away.
Really? I would expect that the MotionEvent getY() would be with
respect to your View that is receiving the touc
I am doing a painting program and the MotionEvent getY() returns contains
the height of action bar. I need to subtract the height away.
Any sample code or help will be appreciated!
在 2012年7月3日星期二UTC+8下午10时58分04秒,Latimerius写道:
>
> On Tue, Jul 3, 2012 at 4:45 PM, limtc wrote:
> > Do you mind sho
On Tue, Jul 3, 2012 at 4:45 PM, limtc wrote:
> Do you mind showing me a sample code on how this is done? (to get the action
> bar size)
I'm afraid you misunderstand - if you are trying to find out the
action bar height just to subtract it from the screen height and see
how much space is left for
Do you mind showing me a sample code on how this is done? (to get the
action bar size)
在 2012年7月3日星期二UTC+8下午9时25分43秒,RichardC写道:
>
> The action bar can also change size with custom (OEM) themes. So I would
> take a different approach and find the size of the usable window left to
> your applic
The action bar can also change size with custom (OEM) themes. So I would
take a different approach and find the size of the usable window left to
your application. This is just a case of calling getWidth and getHeight on
the root object of your view hierarchy.
On Tuesday, July 3, 2012 2:12:26
9 matches
Mail list logo