Android :: View Stops Receiving Touch Events When Parent Scrolls / Continue It?

Sep 8, 2010

I have a custom Android view which overrides onTouchEvent(MotionEvent) to handle horizontal scrolling of content within the view. However, when the ScrollView in which this is contained scrolls vertically, the custom view stops receiving touch events. Ideally what I want is for the custom view to continue receiving events so it can handle its own horizontal scrolling, while the containing view hierarchy deals with vertical scrolling.

Is there any way to continue receiving those motion events on scroll? If not, is there any other way to get the touch events I need?

Android :: View stops receiving touch events when parent scrolls / Continue it?


Android :: MapView Stops Generating - Or Receiving? - Events

Oct 2, 2010

I'm working on an Android class that extends MapActivity. I have set the OnTouchListener and everything works okay for the first MotionEvent. After the first MotionEvent, the system stops either generating MotionEvents or receiving them or both.

Does anybody know what I have to do to keep receiving MotionEvents?

CODE:............

View 1 Replies View Related

Android :: Align Ads To Bottom Of Screen Even View Scrolls?

Aug 13, 2010

I previously asked a question that I still have not been able to solve:

http://stackoverflow.com/questions/3126347/android-relativelayout-how-to-alignparentbottom-when-wrapped-in-a-scrollview

What I am trying to do is align a view to the bottom of the screen, using either a RelativeLayout or LinearLayout, and then wrap that layout in a scrollview to permit scrolling when necessary (for changes to landscape orientation or on small screen devices).

To date, what I find is that anything aligned to parent bottom works great as long at the bottom is visible...but if the bottom is below the scroll, the view that is aligned parent bottom jumps up to the top.

This seems like a very common design for ads that appear on the bottom, so I would think that this is possible. Is it?

View 1 Replies View Related

Android :: Adding Child View At Particular Location In Parent View

Mar 20, 2010

I need to draw a child view containing a rectangle and button on top of the content view at particular location on the parent (content view). How can I do this? Did not find an explicit way to set origin of child view?

View 1 Replies View Related

Android :: Droid Background Service Stops Processing Broadcas Events / Solve It?

Nov 6, 2010

I've a problem with my android application.
I'm using a background service (with notification on the status bar) which performs an audio sample every hour. To perform this sample I generate a broadcast event every hour and when I capture the event the audio recording starts. During the day, when I'm using the phone, I've no problems. The strange behavior happens during night, when it seems like if the phone goes to an "idle" state: the broadcast events are no more processed. From the log file I understood that the events are generated and putted in a queue... and when I start using again the phone, all those events are raised in the same moment.
Do u have any idea about how to solve this problem? How can I force the phone to continue processing my events? do I have to set any variable of flag to avoid the phone going in this kind of "idle" state?

View 1 Replies View Related

HTC Incredible :: View SMS Message Again To Refer Back To It / Continue Conversation At Later Time?

Apr 30, 2010

I installed and have been using Google Voice for SMS on my new amazing Incredible. I get a notification when I get a new SMS but after I view the notification and close the threaded message box, I can't find how to view the SMS message again to refer back to it or continue the conversation at a later time. Anyone else know?

View 2 Replies View Related

Android :: Phone State Listener Events Stop Receiving Sometime

Jan 21, 2010

My application process incoming/outgoing calls and shows some UI. So I use PhoneState Listener to listen changes such as CALL_STATE_IDLE , CALL_STATE_RINGING ,CALL_ STATE_ OFFHOOK. on receiving call to my BroacastReceiver for incoming/outgoing call. Most of the time things work properly. But sometimes my application does not receive events of Phone State Listener and hence it is not able to change/clear UI.From user feedback this typically occurs on HTC Hero. But I have came across this issue sometime on other devices also.My first guess is that android is killing my application in midway during call due to memory requirement. If so, is there any way to ensure that android does not my kill application under such situation .

View 1 Replies View Related

Android :: Size A View Based On Its Parent's Dimensions?

Jan 29, 2010

How can I size a view based on the size of its parent layout. For example I have a relativelayout that fills the full screen, and I want a child view, say an imageview, to take up the whole height, and 1/2 the width? I've tried overriding all on onMeasu onLayout onSizeChanged etc and I couldn't get it working....

View 3 Replies View Related

Android :: Back To Parent View When Press On Escape

Dec 29, 2009

I am using ViewFlipper for my application. I trying to make it.when user pressed on escape (back) button, it would be back to parent Layout.

View 3 Replies View Related

Android :: Detect If View's Parent Activity Is Being Destroyed?

Jun 30, 2010

I want to do some cleanup in a view when the activity is being destroyed. Is there any way to get a callback in the View when the activity is being destroyed? I tried using onDetachedFromWindow, but I'm not sure whether it is correct thing to do.

View 1 Replies View Related

Android :: Detect If A View's Parent Activity Is Paused

Jun 20, 2010

In one of my Activities I have a ListView that displays a list of locations. For each list item I want a little arrow icon that points in the direction of the corresponding location. I implemented this icon by extending ImageView. This custom View has a listener that reacts to changes of the device's orientation by rotating the icon image accordingly. I register the listener in the onAttachedToWindow() method and unregister it in onDetachedFromWindow(). This kind of works but the problem is that onDetachedFromWindow() sometimes gets called only a long time after the containing Activity has paused. Also, the whole layout overall seems a little hacky. So my question is: Is there a proper way to unregister the listeners or would you implement this in a completely different way to begin with?

View 1 Replies View Related

Android :: How To Access An Element Present In Parent View

Oct 20, 2010

Full code. how do i access the parent activity's mail layout elements? In this case a button. I have it declared in main.xml. When a button in the listview is clicked, i want to change the text of the button in main.

View 1 Replies View Related

General :: Moto Droid Razr Maxx Under ICS Stops Receiving Synched Emails

Jul 3, 2013

I use the Verizon stock email app that came with my Moto Droid Razr Maxx, upgraded to ICS. Emails are synched with both my laptop and my Droid RM. Today emails stopped being received by my phone although the computer still receives them.

I have changed no settings. I can send emails from my phone just fine. How do I fix this? I want to be sure I lose nothing from my inbox or outbox on the phone.

View 1 Replies View Related

Android :: How Do I Center A Grid View In Its Linear Layout Parent?

Oct 9, 2009

GridView is not behaving like it is supposed to.
This screenshot shows that the GridView (in landscape mode) is flushed left.
I want it centered. This is the XML layout for the GridView.
<Linear Layout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/templatelandscape"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<GridView
android:id="@+id/commandsbarlandscape"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:padding="0dp"
android:verticalSpacing="2dp"
android:horizontalSpacing="2dp"
android:numColumns="auto_fit"
android:columnWidth="52dp"
android:stretchMode="spacingWidth"
android:gravity="fill_horizontal">

View 2 Replies View Related

Android :: How 3D Objects Get Touch Events?

May 31, 2009

I am writing a game using OPENGL, there are several 3D objects in my surface view. My question is: Should each 3D object implement view in order to get touch events? Or there is other way to do this?

View 5 Replies View Related

Android :: Why Are Touch Events Destroying My Framerate?

Apr 27, 2009

I'm developing a game for Android. It's got a lot going on but is running reasonably smoothly. That is, of course, until the user touches the screen.While they're touching it, onTouchEvent is called (with action = ACTION_MOVE, x = 0 and y = 0) roughly once every ten milliseconds at what appears to be a fairly high priority, as it absolutely obliterates the framerate. As soon as the touch ends the framerate returns to its nice state.Has anyone encountered this? Is there a way to reduce the rate at which ACTION_MOVE events are generated, or to ensure that they're only generated when there is actual movement, or use a polling method that just gets the current location of the touch? Or even just a way to disable it entirely?

View 4 Replies View Related

Android :: Possible To Detect Touch Events In Droid

Jul 19, 2010

New to android so please bare with me here

Is it possible to detect all touch events in an Activity and capture it and then in return pass that pass event to another View. For example:

Button 1 and Button 2. When Button 1 is pressed I want to capture that touch/click event and automatically pass that touch event to Button 2, basically with one touch/press you get the click generated and that same click is passed on to the second button automatically.

View 1 Replies View Related

General :: Phone Touch Stops Responding?

Jan 13, 2014

My phone touch stops responding after using it for some time after locking screen .

Micromax A26

View 1 Replies View Related

Android :: Excessive Number Of Touch Events Slows Down App

Feb 26, 2010

I'm writing an Android game that needs to receive touch events. My problem is that, whenever the user drags their finger along the screen, so many touch events get sent to the touch event handler (which I think runs as a separate thread) that my frame rate plummets! What's the best way I can limit the number of touch events that are handled per second? For example, if my game runs at 60 fps, I really shouldn't need more than 1 touch event being handled every second. Can I do this is a way that doesn't lose any information (i.e. important information about where on the screen the user touched last)?

View 2 Replies View Related

Android :: Monkey - Touch Events Being Dispatched To The Screen

Sep 8, 2010

I start monkey like this:

monkey -p <MY PACKAGE> --port 4321

(I have already done a tcp port forwarding).

I then use PuTTY to telnet to 127.0.0.1:4321

I can issue a command like tap 100 100 I get a response OK but I see nothing happening on the UI. I have placed a button at that location but I does not receive the touch event.

When I run monkey like this

monkey -p <MY PACKAGE> --pct-touch 100 -v 10

I see touch events being dispatched to the screen.

View 1 Replies View Related

Android : Send Touch Events To Foreground Activity

Jul 21, 2010

I'm trying to figure out a way to send touch events to the foreground activity. Essentially I want to write something that allows me to run it from the shell and just say "I touched this co-ordinate", so that I can automate some UI tasks for testing. Essentially what Monkey does, but application agnostic.

I think that android.view.MotionEvent holds the key, but I'm not sure how to run something without view so that I don't interfere with what is on the screen. Perhaps with a service, but I'm unclear how that would work.

View 5 Replies View Related

Android :: Triggering Swipe And Touch Events On Mobile Web App - IPhone

Jul 21, 2010

Wondering here if there is a way I could trigger an event, so that any library listening for these events (e.g. jQTouch, Sencha touch, iUI, ... ).

If I could extend or use jQuery for such task e.g. $(...).trigger('event') that would be great to know.

Usage example:

I need to debug a few web apps by simulating multi touch with my mouse. This seems a little complicated, so if I could trigger the multi-touch events using Javascript I could therefore test the app more efficiently.

View 2 Replies View Related

Android :: 2.1 - MotionEvent Multiple Touch Events Get Mixed Up And Influence Each Other

Sep 24, 2010

Purpose of the app:

A simple app that draws a circle for every touch recognised on the screen and follows the touch events. On a 'high pressure reading' getPressure (int pointerIndex) the colour of the circle will change and the radius will increase. Additionally the touch ID with getPointerId (int pointerIndex), x- and y-coordinates and pressure are shown next to the finger touch.

Following a code snipplet of the important part (please forgive me it is not the nicest code ;) I know)

CODE:.............

The problem:

A HTC Desire running Android 2.1 is the test platform. The app works fine and tracks two finger without a problem. But it seems that the two touch points interfere with each other when they get t0o close -- it looks like they circles 'snap'to a shared x and y axle. Sometimes they even swap the input coordinates of the other touch event. Another problem is that even though getPressure (int pointerIndex) refers to an PointerID both touch event have the same pressure reading.

As this is all a bit abstract, find a video here: http://www.youtube.com/watch?v=bFxjFexrclU

My question:

Is my code just simply wrong? Does Android 2.1 not handle the touch events well enough get things mixed up?Is this a hardware problem and has nothing to do with 1) and 2)?

View 1 Replies View Related

Android :: Implement Touch Events On Activity And Button On Droid?

Apr 23, 2010

I have an Android activity with an ImageButton. I would like to execute some logic when the button is clicked and show a different image for the pressed state, but also receive the touch event on the activity.

By default only the button receives the touch event. If I set the clickable attribute of the button to false then only the activity receives the touch event.

What's the best way to implement the touch event in the activity and the click in the button?

View 2 Replies View Related

Android : Disable - Handle WebView Touch Events In Phone?

Oct 4, 2010

How do you disable all touch events in an Android WebView (or scrolling in particular)? I would like the activity to handle all touch events.

View 2 Replies View Related

Android : Disable Scrolling Touch Events In ScrollView Programmatically?

Aug 10, 2009

Just wondering if there is an easier way to simply stop ScrollView from being scrolled via touch inputs? I will programmatically get the ScrollView to scroll to top or bottom.

As a last resort, I guess I will have to inherit from ScrollView and capture all the ontouch events. But wondering if there is an easier way before I take this approach?

View 5 Replies View Related

Android :: Trackball Doesn't Give Me Click Events / But Touch Screen Does

Mar 5, 2009

I have a list activity that creates a header row above the data rows from the adapter. I want to receive click events when the user selects the header or a data row (but my data rows have check boxes in them, so this part is tricky). When I use the touch screen, I get this expected behavior:

1. Tapping on any row causes a click event and a dialog appears.

2. Long-pressing on a data row causes a context menu to appear.

3. Long-pressing on the header row does *not* show the context menu.

However, when I use the arrow keys (emulator) or trackball (G1), I get this unexpected behavior:

1. Selecting any row fails to cause any click events, even though the row's appearance changes like it's being clicked.

2. Long-pressing on the header row *does* show the context menu, which I don't want.

3. Occasionally, it doesn't focus the correct row when I move up or down (e.g. it skips from the header to the last data row).

View 11 Replies View Related

Android :: Incorrect Touch Events From Browser With Dashcode Mobile Projects

Jul 16, 2010

I'm developing an HTML/Javascript mobile web application using Dashcode. Normally I wouldn't use such WYSIWYG stuff, but I've found it a very rapid development process.

Unfortunately it seems like I can't get it to run on Android's browser currently. The main display loads and all the correct data is pulled from web services, but you cannot press on anything to activate it.

I suspect that the android browser is sending different javascript events, which the Dashcode objects are not configured to pick up.

In addition, the adb logcat debugger refuses to output any log messages from the browser on the emulator, and as such I'm having a very hard time sorting this out.

What events I need to be watching for, so I can iterate over all the touch handlers and duplicate them for the android events, or offer help in any other way on this situation?

View 2 Replies View Related

Android :: ACTION_UP And ACTION_MOVE Touch Events Passed Through To Custom Views?

Jan 20, 2010

I have an activity defined as:

CODE:...................

View 3 Replies View Related

Sprint HTC Hero :: When Phone Is Inactive For While / Touch Screen Stops Working

Feb 23, 2010

Almost every day when I wake up I check my phone and 9 times out of 10 the touch screen does not work. I cannot make a call or check anything. I have to push a lot of buttons and take out the battery and generally wait a while before my expensive phone to start to work. Is there a fix for this? I've already had to go to sprit to do a hard reset because the phone got, "kicked off the network" for some reason the sprint people could not explain. Any solution for the screen issue?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved