Questions tagged [android-event]

On Android, there's more than one way to intercept the events from a user's interaction with your application. When considering events within your user interface, the approach is to capture the events from the specific View object that the user interacts with. The View class provides the means to do so. Questions that regard doubt about any type of events action (listeners and handlers), should use this tag to express themselves.

Within the various View classes that you'll use to compose your layout, you may notice several public callback methods that look useful for UI events. These methods are called by the Android framework when the respective action occurs on that object. For instance, when a View (such as a Button) is touched, the onTouchEvent() method is called on that object. However, in order to intercept this, you must extend the class and override the method. However, extending every View object in order to handle such an event would not be practical. This is why the View class also contains a collection of nested interfaces with callbacks that you can much more easily define. These interfaces, called event listeners, are your ticket to capturing the user interaction with your UI.

While you will more commonly use the event listeners to listen for user interaction, there may come a time when you do want to extend a View class, in order to build a custom component. Perhaps you want to extend the Button class to make something more fancy. In this case, you'll be able to define the default event behaviors for your class using the class event handlers.

For a more detailed information you can visit Google oficial webpage about Events at Google Developer - Events

318 questions
0
votes
1 answer

Fire back event twice in Android

I have a intent to a third party map app. And actually I need the navigation activity, but in order to start the navigation, the map app needs to start a main map activity first. So when I quit the navigation activity, it goes back to the map. I'd…
Joey.Z
  • 4,492
  • 4
  • 38
  • 63
0
votes
0 answers

Swip images is not working on multitouch in android

I have tried to make a simple android program for zoom and swip images in android as they both working on mutitouch ,I have tried for that but its not working...Can any one give good refrenece for multitouch in android?
jigar
  • 1,571
  • 6
  • 23
  • 46
0
votes
0 answers

how to get address information when I click on a location icon

I have a set location code in my app. I want to get address information when I click on a location icon. How to use a click event public class MyActivity extends MapActivity implements LocationListener { MapView mapView; MapController mc; private…
0
votes
1 answer

How can i set the event OnFocusOut on a EditText?

I cant find the way to get the event "focus exiting from a edittext" (neather "focus entering an edittext"). I've found the event OnFocusChange, but it is called both the times, entering and exiting the edit, and i want my function called by that…
Pelle
  • 13
  • 1
  • 5
0
votes
0 answers

ScrollView smoothScrollTo does nothing when screen off

I have this problem that when the device screen is turned off, and my Timer triggers, I call ScrollView method smoothScrollTo. However it does nothing, I am not getting onScrollChangedcallbacks at all. Is there any solution or workaround for…
Niko
  • 8,093
  • 5
  • 49
  • 85
0
votes
1 answer

android Calender event issues

hi everyone I am a newbie and learning android...i got the following code from this post written by @Abhi Put reminder in real calendar on the phone? this post does provide the answers, only code. I would like someone to help me with the problem I…
Amjad
  • 1,950
  • 5
  • 26
  • 41
0
votes
0 answers

Handle navigation buttons in a custom listView

I have a tabbed application. Each tab has got a custom listview. I am not able to track navigation buttons in a custom list view. I tried the following @Override public boolean onKeyUp(int keyCode, KeyEvent event) { Log.i(TAG_NAME, "key event: "…
0
votes
1 answer

Permission check event (or log) for Android

I understand that when you install an android app you need to accept the permissions requested by the app. When you run the app, when it comes to the point that app really about to use that permission and perform a task, the android system has to…
0
votes
2 answers

Setting multiple home launcher apps doesn't work

Background Information: I want to create a child lock application. Therefore I need to disable all the keys (including the Home key) when the user is in the application. I basically want a similar application to this one. Problem: If I have set…
Mace
  • 141
  • 1
  • 1
  • 4
0
votes
1 answer

Playing sounds on button click doesn't start

I am trying to make an app that plays sound when button clicks and I have like 100+ sounds and 100+ buttons. I have created the buttons and now am mapping it to the sounds to be played. Another thing, when clicking more than "x" number of times the…
Karim Bibars
  • 75
  • 1
  • 9
0
votes
1 answer

How to make an item selected in ListView to execute after a button is clicked?

I have a ListView and I want to select (highlight) an item first and then click a button before it goes to another activity. Here's an example of what I want to do: This is how I made my ListView(I get its entry from a database) ListView lv =…
Rogene Sagmit
  • 101
  • 1
  • 8
0
votes
1 answer

How to get just some events from an Overlay that sees in the top of all applications in Android

Im trying to develope an app which is an Overlay working on top of all aplications in the system, till there I dont have problems. The issue is that my overlay has to be able to manage some events and others just let them go under it. Example: The…
Carlos Morera
  • 377
  • 4
  • 12
0
votes
2 answers

Not Getting OnItemClick Event of ListView

As said in title I am Not Getting OnItemClick Event of ListView My code : ListView listView1 = (ListView) findViewById(R.id.listView1); listView1.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void…
Ankit Popli
  • 2,809
  • 3
  • 37
  • 61
0
votes
3 answers

addTextChangedListener gives force close

I have four text box on which i am adding a TextChangedListener, Following is the code i implemented: public class PasswordActivity extends Activity{ /*This will store the password temporarily */ private int passcodeString; private String…
Ketan Mujumdar
  • 113
  • 2
  • 9
0
votes
1 answer

How to block volume button even when my app is not running

I want to block the volume button even when my app is not running how to do it..?