• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Search results

  1. A

    Apps TranslateAnimation ???

    I am using TranslateAnimation to move an object from 1 position to another. startX = 1; secondX = 100; thirdX = 200; but the animation doesn't save the new location of the object. So when i call it to go to secondX it goes from 1 to 100. then, when i call it to go to thirdX instead of going...
  2. A

    Apps startActivityForResult ??????

    I open a new activity by calling startActivityForResult. Inside my SecondActivity class i have an exit button, when the user clicks it i need to close the SecondActivity. What method should i call to close SecondActivity? I tried calling finish() and finishActivity() on my exitButtonClicked...
  3. A

    Apps Get Position of an object ?????

    All i am trying to do is to get the position of an object on the screen. so let's say i have a button, and i want to know the (x and y) of thi button Thanks
  4. A

    Apps ImageView ==> Clear ????

    Is there any way to clear an imageview? Lets say i have an imageview which is already using a drawable image. During run-time i need to be able to clear it. and no i do not want to change the alpha or visibility of my image. Thanks
  5. A

    Apps AbsoluteLayout is deprecated ????

    it says "AbsoluteLayout is deprecated" but the code works fine. is there another way to do such a thing without getting this warning? Should i ignore the warning? AbsoluteLayout l = (AbsoluteLayout)findViewById(R.id.layout); l.addView(myCustomButtonOnRunTime);
  6. A

    Apps How to use Handler ?????

    I have a socket running as a service. It receive some data , and based on this data i need to update my gui, for example populate a ListView. but it doesn't work. How can i use a handler here? public void socketGotData(String message) //this method is in my service //it gets called when i get...
  7. A

    Apps Accessing a Service ????

    When my first Activity loads i create a service (Socket connection to my server), and this srrvice suppose to keep running while the app is running. I navigate to other Activities, and I need to somehow get an instant of this Service class to call a method "sendDataToServer". How can I access a...
  8. A

    Apps global variable ==> Extending Application ???

    I am trying to implement a class extending the application to keep my global variables. I get an error public class MyApp extends Application { public String username; public String session; public String key; }//when debugging and trying to go through line 6 the debugger says...
  9. A

    Apps Accessing and intent from a Service?

    I have a service running in the background. (A socket class) When the socket receives message i need to access the Activity that is shown on the screen and update the gui, any idea how i can manage to get the Activity shown to the user? Thanks. public void socketGotMessage(String message) {...
  10. A

    Apps Beginner ==> Day 1 - Where to start ???

    I am an iphone app developer, and i want to start with android. Everything is different. For example, I need to create an instance of a socket, and have it running through the whole program? Where do i need to create this instance of socket so that it runs all the time? In iphone there was...