android

android surfaceview can't work

it's a easy question, but I can't figure it out: this is my xml : <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android = "http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <GG.My_pic.testA android:id = "@+id/myview" android:layo...

Problem with back button on emulator when multiple activities are there in single tab

I have created two tabs, say TAB1 and TAB2. For TAB1, i have loaded one Activity, say ActivityOne, into TAB1 as Intent intent = new Intent(this,ActivityOne.class); TabHost.TabSpec spec = getTabHost().newTabSpec("ActivityOne") .setIndicator("Activity One",getResources().getDrawable(R.drawable.a...

Android: Tabstyle

Hi All, I have a simple question... How can I make a simple white background under my tab style.. This is my source main source code.xml I was thinking to make a new LinearLayout with an android:background="#ffffff" Can anyone help thinking.. i'm an beginning android programmer .. Thanks a lot!! Here is my source code: <?xml ...

android application to pan images

i have developed an android application which perform ----> * load map from server * zoom in and zoom out of images are possible. Now i need to pan the image. please help ...

How to make a list that can show the changable content

Hi all! I have build an application in android. This app needs to display a list of text, but the list of text increase continuously. It means user can see increased list of text. Each text is separated by a horizontal row. It looks like google market when market try to show list of applications. How can i do in this situation ? ...

Android listView and selected items, with a custom ListAdapter

Hello, Android has ListView component which is quite nice. The problem is that I created my own adapter to supply viewitems for each item displayed and I don't get anymore: Background color change when i scroll the items using up/down arrows Background color change when I select an item. How do I do that? ...

How to implement a generic activity that can be extended by normal, List and Map Activities?

I want to display the same options menu on all of my application's activities. I created a generic Activity that implements the menu, and all my further activies extend it. The problem: when I need to extend other specific activities, like ListActivity and MapActivity, I can't figure out how to extend the generic activity and add the L...

How to get an event in a service when the screen is touched ?

I would like to implement a service in Android that basically should monitor the time elapsed since the user didn't touched the screen. For example the user opens Internet or Adobe Reader, starts reading and don't interact anymore withe the touchscreen. I want that my running service know the time since the user didn't touched the screen...

Detect final item selected in GalleryView with setCallbackDuringFling(true)?

Hello. I'm using a GalleryView to flip through days of a calendar (Populating it with LinearLayout instead of ImageView). I've implemented the onItemSelected() callback within setOnItemSelectedListener(). I've set setCallbackDuringFling() to true. As the user flings, my callback is successfully called for each selection. So far, all ...

Thread in Android method onCreate() still stops the UiThread in 10% of the cases.

This is my onCreate method of my first activity of my app. It initalizes all Widgets and then starts a Thread to load model data from the internet. In some cases, when the network is really slow or not responding, the "initializeModelThread" seems to take the whole CPU and doesnt allow the onCreate Methode to finish. In one case I saw ...

Using the same debug keystore on multiple computers

I'm developing on multiple computers. If I deploy to my phone directly from Eclipse on one computer, I can't deploy from the other without uninstalling first. I'm assuming this is because there is a debug certificate being used to sign the app, and they're not the same across the two machines. Is it possible to copy one over to the ot...

how do i get phone platform details?

well im making an app and it needs to know on what its running. lets say i run it on an android phone. first is there somewhere on in phone that says "android"? i need things things like screen size and if it can get touch, supported file types, jsr`s installed. is there a way to get that info from a phone? or am i doomed to try and mak...

Android: Resolution Emulator vs. Device

Hi all, I would like to test my app-layout with different resolutions. Therfore I created an emulator-device with a resolution of 480x832 (the same as my motorola droid/milestone). I did all my layout_width with "fill_parent" or with dp - but what looks good on the device (e.g. filling up the whole width) is much too small in the emula...

Android notification click, run the main intent?

Hy! public static void addNotification(String sAppname, String sDescription) { NotificationManager notifManager = (NotificationManager) mycontext.getSystemService(NOTIFICATION_SERVICE); Notification note = new Notification(R.drawable.icon, sDescription, System.currentTimeMillis()); Intent i = new Intent (myconte...

Android: Make tab gradients when selected and when deselected, tabwidget

Hi All, I have a problem with my tab style. I would like my tab style will look like this. http://www.technobuzz.net/wp-content/uploads/2010/02/seesmic-android-260-208.png Something goes wrong in my xml ... The style shows only the colors When selected from the comment. When I use a white icon is the text (text setindicator) white....

Where does the Android Emulator store the SD-Card files?

I want to make two emulators use the same SD-Card image. I automatically created a SD-Card in the first emulator and downloaded all the data to this SD-Card. How can I load this SD-Card in another emulator? I don't want to recreate all the data on the SD-Card for every single emulator all the time. ...

Using AudioTrack in Android to play a WAV file

I'm working with Android, trying to make my AudioTrack application play a Windows .wav file (Tada.wav). Frankly, it shouldn't be this hard, but I'm hearing a lot of strange stuff. The file is saved on my phone's mini SD card and reading the contents doesn't seem to be a problem, but when I play the file (with parameters I'm only PRETTY...

what is the purpose of using translatable in Android strings?

What is translatable attribute translatable="false" means? ...

How to retrieve the right view?

Hi, My adapter contain the following Views: private static class ViewHolder { ImageView p_Image; TextView p_Name; TextView p_Price; TextView p_Psave; } This Is how I implement onItemClick : gridView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, ...

Overlay Image in Android

Hello all, How to overlay two images like the one in iphone notification icon or new launcher pro notification? I want to add new image on top right of an imageview to show notification Here is the example of launcher pro notification and tweetcaster checked button (with facebook icon on topright) http://londatiga.net/images/overlayim...