android

Java Content Assist / Refactoring with External Build tools

We currently build our Android (Java) projects using the built-in Eclipse build tools. Then we have a separate ANT build script for automated building, unit testing, etc. I would like to switch to using the ANT script inside Eclipse as well. What I can't figure out is how Eclipse content assist and refactoring tools will interact with s...

How to set Android WebView background of selected textbox...

Ive got a input tag in an HTML page in an Android WebView. I want the background to be transparent. It is (via background-color: transparent) UNTIL the user selects it (gives it focus, to input data). Then the background is white. I've tried background-color on textbox and textbox:focus and Ive tried -webkit-appearance: none. None of th...

How to stop a background thread on keyboard flip in android

How can I stop a background thread on keyboard flip in android? ...

How to use rawQuery() in android

Hi, I have a sql query like this String loadFav = "SELECT _id, title, name, favorite FROM table1 where favorite= 1 " + "UNION ALL" + "SELECT _id, title, name, favorite FROM table2 where favorite= 1" ; Cursor mCursor = mSQLiteDatabase.rawQuery(loadFav, null); I got an error when run this query. I...

state of activity saving in android when home button pressed

hi, I am having an issue related to home key . when i press home key all current activity gets hidden . but when i press the executable it again starts from the fisrt screen . I have overidden all methods onsaveInstaceState opPause onStop onResume but there are still issues what is the right way to handle those conditions...

how i can create my own jar using eclipse or ant??

hii how can i create my own jar file for android application using eclipse or ant?? ...

Writing a portable Java application using JOGL and Android OpenGL

I plan on writing a Java 3D game that will work both on PC and Android. Unfortunately it looks like there is no common OpenGL API for both platforms. Do the APIs differ significantly? Is there a way I could use the same 3D code in both versions? Is it a good idea? ...

How do two android applications talk to each other?

Guys What is the general communication architecture for two android applications? Case 1: I have two android applications, a) One is a server that waits for client request, process the request( read data from some sqlite db) and return the results to the client. This server application runs on its own independent android phone. b) ...

Android toast blur

Hi everyone, I'm making a popup in Android using Toast, is there any way when shown to blur the window behind. I'd usually use: getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND); But in this case am not sure how to go about it... Any help would be grea...

Show Complex Toast From BroadcastReceiver

Hi, I wonder if someone can help me. I'm trying to display a toast element when an SMS is received. This toast should contain a layout which has an image (SMS Icon) and 2 textviews (sender, message) If I call the following method from an activity, it works as expected... public void showToast(Context context, String name, String messa...

Hidden features of Android development?

Guys, I am surprised that there is no Android Hidden Features post yet in the Hidden Features series that I've been tracking for a while now. The Hidden Features series is great for people who are new to a certain language. It shows the ropes and certain valuable tricks, all in one place. I think it's a brilliant idea. Even experts some...

How can refresh ListView when tab in android

My application have three tabs with ListView display inside each one. How to write code to refresh ListView when click between tabs ? @Override public void onTabChanged(String tabId) { if(tabId == "tab_1") { refresh ListView ??? } } ...

Difference between context menu and option menu in android

Hi, Can you please tell me the difference between context menu and option menu in android? When I click the menu button on the emulator, is that option menu? or context menu? And how to invoke the other menu (not trigger by the menu button)? Thank you. ...

Android SDK - List All Users

Hello. I have just begun working with the Android SDK and I am having problems with my first app. Currently, I am trying to list all of the users in a big list. However, no matter what I try, the app continues to force close. I found the code in the sample files, but this is still giving me issues. Below is the code I am using. pu...

AsyncTask and Android threading: how to get it right ?

I am firing off an AsyncTask to fetch images via HttpClient. Via DDMS in eclipse, the view shows that the AsyncTask runs and then hangs around. This is a screenshot of the DDMS threads view. Should the AsyncTask #1 thread disappear or is it benign ? What does the status wait mean anyway ? ...

Android: Application force closing as soon as it opens

I'm tinkering around with android on Netbeans and did a simple math application. Somewhere along the way the application suddenly force closes as soon as it opens(On the emulator)... I tried commenting all the code in the class that hosts the main activity but to no avail. Since it doesn't give me a specific error message, I feel kind of...

Accessing webserver running within Eclipse from outside the workstation

Hi, my question is the following. I run a web project targeted to be deployed on the Google Appengine locally from within Eclipse. So the server starts up and it can be accessed normally by typing localhost:8080 into some browser. Everything fine so far. But what I need is to access it from outside, say from a friend's machine (which ob...

How to add padding to gradient <shape> in Android?

I have a shape with a gradient that I'm using as a divider between ListView items. I've defined it as follows: <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#ccd0d3" android:centerColor="#b6babd" andr...

Android ScaleAnimation

I'd like to grow a view with each click using a ScaleAnimation. I've managed the effects of the animation persist after it has finished with the fillAfter, but the problem now is, the animation always starts from state 0 (as the View is defined in the XML) - on click the view resets and animates back to the state it was just after the fi...

Android: Return to previous activity without calling finish()

I have an android application with a LOT of activities, think of something like a book where every page is a new activity. The user can make changes in each activity, for example highlight certain texts with different colored markers etc. and it's crucial that I'll remember this information as long as the application stays alive (and I d...