android

listview with imagelist not work proper for multiple selection in custome adapter

Hi Please any one Help me out of this.. i am using listview adapter for displaying image list with check box, that allows to select multiple image form list.. code works good for images list not more than screen but if image is more than screen (for scrolling) it throws null pointer exception.. following is my code. (apterMultiChoice.ja...

Change the text on a button in the program

The text on my buttons are set in resource files. E.g. <Button android:id="@+id/up_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/up_label" /> The above code defines a button with text @string/up_label. How can I change this text in my program during th...

Adding a number into Contacts works on emulator but not on device

Hi, I have written code to add a number in contact book when the application is used. ContentResolver cr = getContentResolver(); Uri phoneUri = null; ContentValues values = new ContentValues(); values.put(People.NAME, "stack"); Uri uri = getContentResolver().insert(People.CONTENT_URI, values); phoneUri = Uri.wi...

android append '…' at the end textview _EDIT

Hi, I have a lsit view and i that i need to add some text. in the adapter, I need to append ... at the end and i used the following when i give android:ellipsize="end" in the only shows 2 line eg: asdnfsdfdsf asdfsdfasdf sdfsd sdfsdf sdfsd ad... And when i give android:ellipsize="start" it is as : asdnfsdfdsf asdfsdfasdfd ......

Loop one layer in a LayerDrawable ?

Hi, I'm trying to loop 1 layer which is in the middle of a stack of semi transparent png images. The initial layerDrawable is created in XML, then the LayerDrawable is retrieved using findViewById().getDrawable(). I can change one of the layers using LayerDrawable.setDrawableByLayerId() if the command is in the same method. But when ...

How to resolve couldn't get connection factory client error on android

couldn't get connection factory client running the MapsDemo sample application on emulator. I'm getting the error: couldn't get connection factory client. How to resolve this error? ...

Save ListView items

Hello! I want to save my downloaded ListView items so that for example next time the app starts, it should not start my download dialog, instead my previous ListView items should turn up. Some useful code snippets would be appreciated. Thanks in advance and please tell me if I need to clarify! ...

Initiation of Android TextView will not work first time, dimensions are zero. What is the secret trick?

I have inflated a View into a PopupWindow. This View includes a TextView where I want to place text at runtime. I need to count the number of lines the TextView uses in order to adjust the size of the pop-up. For this purpose I use TextView's getLineCount() and draw the TextView before counting the number of lines ( myTextView.draw(canva...

Create a contact on salesforce through Android

I am trying to use KSOAp on android to connect to salesforce. Right now I am able to connect and authenticate on the server. I can also get the contacts from salesforce. What I am trying now is to create a contact through my client application on Android.But unfortunately I am new to Webservices and Ksoap and I do not understand how to. ...

Android Emulator SD Card Problem

I have a problem with the Android Emulator and its SD card. I am developing an application that writes files to /sdcard. Everything works fine, until I exit the emulator by clicking its close button. After restart the files are empty (size 0), but still in the directory. Of course, they have not been empty as long as the emulator runs. ...

IllegalStateException: attempt to acquire a reference on a close SQLiteClosable

What may causes this exception? 10-26 07:06:08.214: ERROR/DatabaseUtils(10775): Writing exception to parcel 10-26 07:06:08.214: ERROR/DatabaseUtils(10775): java.lang.IllegalStateException: attempt to acquire a reference on a close SQLiteClosable 10-26 07:06:08.214: ERROR/DatabaseUtils(10775): at android.database.sqlite.SQLiteClosabl...

Changing the style of a progressbar

Hi, I have loaded a progressBar from: <?xml version="1.0" encoding="utf-8"?> <ProgressBar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+android:id/progress_small" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" /> On different devices I ...

Connection problem on Boot Completed issue

Hi all, I am trying to run my service as soon as boot is completed. I know how to do it, but this is the prob: the service is running as soon as it get the boot completed intent, but my service cant open any HttpUrlConnections I get that error: 10-26 09:53:50.400: ERROR/HttpHandler(1165) Host is unresolved: my.host:8080 assume t...

[android]Setting WebViewClient to WebView doesn't work correctly

I am writing app, that should authorize on twitter. I load to WebView Link to my app's server, which redirects me to twitter authorization page. Before this, user is logged in on my app server with DefaultHttpClient. If i just writing webView.loadUrl(link); everythig works correctly, but if i'm adding webView.setWebViewClient(new WebVi...

Android samasung galaxy tab emulator resolut ??

Hai, I have updated my android sdk with samsung galax tab addon , it installed successfully . problem is that when i open galaxy tab emulator, it displayed portion of emulator ,i.e; bottom of emulator is not visible. i thnk it is problem with desktop resolution , but resolution of desktop is 1280 X 1024 . Can any one tell me how to g...

message alignment in alert dialog box in android

Can i change alignment of message displayed in alert dialog box ?? plz.. any body help ...

How does color depth and/or compression level of images affect UI performance?

To what extend do color depth and compression level of the original jpg and/or png images used as drawables have an effect on the app's UI performance, given the fact that all images are converted to bitmaps internally anyway. Especially considering i.e. images in list views for example. Same question goes for png vs. xml shapes as dra...

android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS not found

I am trying to use android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS but it is giving an error. I think its matching Activity may not exist. How can I use it. I want to make an application which can directly give me list of available network operators. ...

How to position a view off-screen so that it can be Animated to move on-screen?

I have a RelativeLayout filling the screen and a couple of ImageView positioned on it using LayoutParams margins. These ImageView are animated in different ways, and in one case I want an image to "fly in" to the screen from the right. Unfortunately, if I set leftMargin for that ImageView greater than the width of the screen, it does no...

PackageManager's applicationInfo.name is always null!

PackageManager pm = this.getPackageManager(); ActivityManager am = (ActivityManager) this.getSystemService(Context.ACTIVITY_SERVICE); List<RunningAppProcessInfo> runningAppProcesses = am.getRunningAppProcesses(); for(RunningAppProcessInfo process : runningAppProcesses) { try { ApplicationInfo ai = pm.getApplicationInfo(proc...