android

ListView forms part of an activity, rather than the activity?

For my next application, I'd like a ListView to form part of the app. Specifically, I'd like it to be the top half of the screen. Having looked through the documentation, I've only been able to find full screen list views, ie with the list taking up the full screen. Is there any way of doing ListViews differently? I know there must be, ...

Name not found exception at PackageManager.GET_CONFIGURATIONS

Hi, Im trying to display versionname using below code PackageManager pkm = getPackageManager(); PackageInfo pki = pkm.getPackageInfo("com.example",PackageManager.GET_CONFIGURATIONS); String tempCurrentVersion = pki.versionName; Bt im getting exception at PackageManager.GET_CONFIGURATIONS as Name not found exception Please tell me how...

android 9 patch drawable xml

Is there a way to define a 9 patch drawable in an android xml file? The reason I ask, is that when you apply a scale animation to a drawable w/ a stroke on it, the stroke appears to thicken. I'd like to make the stroke stay the same size as the animation plays... ...

Can i run Jets3t on android to connect , download , upload files from amazon s3?

if yes please add example cause i have several errors. ...

How to imitate default browser to download .apk files from webview?

Can someone explain me how I would be able to imitate the default browser when trying to download .apk from the net? So far I have this: WebView webview; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); webview = (WebView) findViewById(R.id.webview)...

How to display a message when the list view is empty in android

Hi All, I am a new to Android stuff. I am creating an application that contains a list view that will get dynamically populated. My requirement is when the list is empty, I would like to show a message. I don't want to create additional views just for displaying this message. Is there any nice way to do this? Any suggestions? ...

Android SharedPreferences limitations?

I developed a game on Android. I am currently saving most of the game stats in a Database. However the app does not utilize more than a single row in the DB. I am now interested in introducing some new stats but this will cause my DB to re-install and thus clear out everyone's progress. In order to avoid this in the future I am consideri...

CSS fonts on Android

I'm using @font-face to display League Gothic on a website, but it's not showing up on Android 1.6. Here's my code, generated with Font Squirrel's @font-face generator @font-face { font-family: 'LeagueGothicRegular'; src: url('/fonts/League_Gothic-webfont.eot'); src: local('☺'), url('/fonts/League_Gothic-webfont.woff') format('woff'), u...

Android - Service with Application lifecycle

I am trying to create a Servicefor my application which will negotiate Bluetooth connections and data. I want this service's lifecycle to start and end with the Application, but still be able to have specific Activities listen for events that occur within this service (in addition an Activty should be able to call specific methods of the...

Adjusting camera's focus in Android 2.2

Can you directly adjust the focus of the camera instead of changing the changing focus mode in 2.2? ...

Getting started with web development for mobile applications, suggestions?

Hello: I made a very simple site with PHP+MySQL that let's users add professors to a database and post comments. I want to use a framework like Sencha to make my website 'mobile friendly'. Thing is, I'm not sure if that will do what I want or if there's something better for my simple application. What I would like: Relatively easy...

Is there a way to set DEBUG for all tags in Android's ADB?

I know I can set DEBUG in Android's ADB by typing: adb shell setprop log.tag.MyTag DEBUG What I'm wondering is if there is a way to set debug for all my classes that do logging instead of having to type the above multiple times: adb shell setprop log.tag.MyTag1 DEBUG adb shell setprop log.tag.MyTag2 DEBUG adb shell setprop log.tag.MyT...

What am i missing in my code?

Hi, i would like to show my database on a listview in android, but the data is not showing. Arrival.java package one.two; import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.widget.ArrayAdapter; impo...

Simple JTwitter for Android example

I have tried many different way and search all over the internet to find a tutorial to use JTwitter with OAuth. Here are the following step I have accomplish Download both Jtwitter and Signpost Add them as Jars in the Java Builder Created a simple button that run public class ShareGenerator extends Activity { private static fina...

[Android] Unable to modify ArrayAdapter in ListView

Hi there, I'm trying to make a list containing names. This list should be modifiable (add, delete, sort...). However, whenever I tried to change the items in the ArrayAdapter, the program crash, with java.lang.UnsupportedOperationException error. Here is my code: ListView panel = (ListView) findViewById(R.id.panel); String[] array = {"a...

I am getting BUILD FAILED ,When i try to deploy Android Application in Netbeans 6.8

I have just started with android in Eclipse and now i want to do the same in netbeans 6.8, i Configured netbeans with all the (andoird's)jar files..etc..whatever it asked me to do.,now it is possible to open the android project in the my netbeans 6.8, but the problem that i get now, While i try to start new Android Project,Its getting o...

Dynamically add TableRow to TableLayout

When a button is clicked, the following method is run: public void createTableRow(View v) { TableLayout tl = (TableLayout) findViewById(R.id.spreadsheet); TableRow tr = new TableRow(this); LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); tr.setLayoutParams(lp); TextView tvLeft = new Tex...

How do I clear all Activities from the stack?

I am having trouble popping all activities off the stack using Intent.FLAG_ACTIVITY_CLEAR_TOP and android:launchMode="singleInstance". In my application activity A, launches activity B (via startActivity) which in turn launches activity C (via startActivity). On activity C the user presses a menu item to return to activity A. When the...

Change the drawable of tabs on selction -- android

Hi all i am using tab view in one of my activity. I want to change the drawable of the tabs on the basis of their selection. So it is like this -- i have 4 images T11, T12, T21, T22. I want to set the image T11 and T22 initially with tab 1 selected. Now i want to change the images to T12 and T21 as soon as i select Tab 2. So far i tri...

Error starting conversation list activity from broadcast receiver on deveice

I've got a broadcast receiver that gets triggered when a notification my app created is clicked. When that broadcast receiver is started it completes a task then tries to bring of the sms conversations. It works fine on the emulator, however when I try it on a droid incredible it crashes with the following message 07-07 22:57:23.901: ...