android

Could you please help me in displaying a popup when a key is press in softkeyboard in android

How can i display custom popup when any key is clicked in android? Can any one tell which part of code i need to change for doing the same in SoftKeyboard sample? Thanks & regards, Reddy Pratap R ...

SQLite Query : Select Query with BETWEEN clause

Hi all I want to run this query in Android Application : SELECT field1 FROM table1 where field1 = ?(enteredField1) AND field2 = ?(enteredField2) AND enteredField3 BETWEEN field3 , field4 ; my DB schema table1(field1, field2, field3, field4, field5) enteredField1 , 2 , 3 = are parameters which is to be checked. I hope I am clea...

How to create TextView that will act as a link

I have a Textview with location: eg. "Mountain View, CA" What I want to achieve is to create this text to act like a Link - color,underline, focusability etc. This link doesn't need to direct anywhere - surrounding view has attached onClick listener that fires google maps intent. ...

Android: How to remove arrow down icon next to EditTextPreference entry?

The preference activity gets inflated by invoking addPreferencesFromResource(R.xml.preferences); and here are the preferences.xml: <PreferenceCategory android:title="@string/pref_categ_update_label"> <ListPreference android:title="@string/pref_label" android:key="update_interval" android:entries="@array/up...

Weird layout problem. (please see the attached image)

The image above is the first page of my game. Normally the big blue 'button' background image should not show up there. I declare my custom background image for my buttons in layout file like this: <Button android:id="@+id/id_button_startgame" android:layout_width="wrap_content" ...

How to catch exceptions caused by a malformed layout-xml file?

public class MyActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //R.layout.main has an illegal element (e.g. no layout_height attribute) //But no e...

Android: can I create a view/canvas that is not rectangular, but e.g. round?

I have a view that is round and hovering above (-> in z-axis direction coming out of the screen) the main content. When the someone taps the screen I want either the main content to be selected or the view hovering above, when it covers the main view. So far that works perfectly. I have a round shaped item on a transparent canvas. Meani...

how to add "face book like button" in my android application

Hi to All, how to add like button in android application. when user click on like button if the user logged in, it should automatically publish the feeds in to all friends who are added in his face book account i create like button to get the from developer.face book and got source in html code and java script code.how to add this code...

Creating strings and arrays

Hi, I am trying to create a information based application, I have 92 subjects, for these subjects I have 92 map locations and maybe as much as 400 url links. Currently I have created a class for each map location and a class for each url link, but this would mean I would have in excess of 500 classes, so what I want to do is split the ...

Camera/SurfaceView app returns android icon not emulator checkerboard image

I'm using the android SDK in Eclipse on Linux. I've used the code at itp.nyu.edu/~sve204/mobilemedia_spring10/androidCamera101.pdf to write an app to store an image captured through the camera onto SD card (there are various examples of this around). It works ok except that the image returned by the camera is not what's on the preview s...

File format for images with layers + meta data

I'm writing a simple bitmap editor for Android that supports layers. The state stored in memory for the image being edited is: A series of bitmaps, where each one represents a layer of the image. Each bitmap has an associated opacity integer and a visibility flag. I want to add saving/loading for this state information. My plan was t...

android:layout_gravity effect in main.xml?

Hi, I have 4 buttons in a horizontal linear layout. I'd like the right edge of the 4th button to align with the right edge of the linear layout (equal to screen width) I've tried using android:layout_gravity="right" but it doesn't work - the right button is to the right of the 3rd one but not right aligned . Am I missing something obviou...

App making http requests for JSON, LogCat printing odd messages

My app makes multiple request to a web server via a static method, here is the method's body try { DefaultHttpClient defaultHttpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url); httpPost.setHeader("Accept-Encoding", "gzip"); List<NameValuePair> nameValuePairs = new ArrayList<NameVa...

How do i make Android app which do something every X second

Hello i wanna do apliacation which every 1 second call function or do something else. I have this code which is not working can you tell what is wrong? public class App5_Thread extends Activity implements Runnable { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInsta...

Debugging Android with GDB

Hi, I am trying to debug rild.c deamon with gdb.I followed the steps given in developer site with respect to gdbserver and gdb.After the connection is established between gdbserver and gdb in localhost iam not able to step in GDB i,e when i give next or Step command in gdb it simply hangs.can anyone tell me what's the problem? ...

Android: getString(R.string in static method

When programming for Android sometimes you have to use static methods. But when you try to acces you resources in a static method with getString(R.string.text) you'll get an error. Making it static doesn't works. Does anyone knows a good way around this because the resource files in Android are very helpfull for creating things in diffe...

Calling Android intent from Web page ?

i want to launch an intent from android website what code do i need to add in the HTML , for example how could i launch the dialer intent after the user click on number in the website . i saw some example in the web like when you click download app in website and it launches the android market . thanks ...

How to change the background color of a TextView in android?

Actually, what I want is a textview which can show the progress of something, I know progressbar in android,however,so far as I know, it can not contain any text(am I right?), so, I want to change the background color of the textview to show progress,from left to right gradually. Is there any other way to do this ? Thanks in advance? ...

How to enable on-screen keyboard?

I have one screen. it consists of an edit text. I want when this screen shown on the screen, keypad automatically shown by default without clicking on the edit text. ...

Using removeCallbacks

I have set a button onTouchListener and I would like to replace it with another listener. I believe that I need to use the removeCallbacks call before setting the new listener for the button, but I'm not sure how to use removeCallbacks and I'm not even sure if it's the right method to use. I originally set the listener like this: mybu...