android

How to keep android listview highlighted?

if I click on a listview item i want to keep the highlight on it. how do i do this? ...

[Android] changing TextView properties of a ListView crashes the app

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Typeface font = Typeface.createFromAsset( getAssets(), "DejaVuSans.ttf"); setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, getGroups())); tv = (TextView)findView...

How to select the first item in a ListView by default

When my app loads, I want the first item in the listview to already be selected. how can I do this? ...

Android SDK virtual device fail?

I using Eclipse Helios and JDK6 , The Android SDK virtual device make a problem follow the step. The device cannot shut down,it stop at 09-03 03:59:02.986: INFO/ShutdownThread(72): Performing low-level shutdown... If i force close the device, i cannot start up again, it make emulator.exe crash. It have only one way to make ...

How to simulate landscape orientation in the android simulator?

How can I simulate landscape orientation in the android simulator? ...

Out of Memory exception handling?

have a dump_log which points to "Out of Memory exception". How do I fix the issue as we have a number of applications running on the Android target? ...

How can I change my view in horizontal orientation and then back to portrait?

I want my view to change when it has changed to horizontal orientation: @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setContentView(R.layout.chartsactivity); } This works, but I want my layout to switch back when it is in portrait mode. ...

How to shield the home key if my app is active? (Screensaver, Lockscreen)

If I want to write a Screensaver or Lockscreen. Is there a way to prevent the home key from going back to the launcher? ...

android circular gallery ?

I am a newbie to android development.Now i would like to do gallery view as circular like image as below.The things is that i want to enlarge the center image when user scroll from left to right and right to left. Is there any tutorials for that ? image link ( http://i53.tinypic.com/1z5st50.png ) what I want is the image that's been s...

android begining

hi to everyone i m a new one in want to develop android app so which is the best ebook or site to refer? thank in advance ...

Handlers in Android

Hello All! What are Handler used in android proggraming for? How do we use them to dismiss the ProgressDialog? I have referred few things from the Net regerding this but couldn't found them pretty convincing. An example of dismissing a ProgressDialog along with Handler will be a great thing. Thanks, david ...

Android update Widget from a button click

Hello everybody, I have a widget that shows some informations from database. The widget is periodically updated every one hour. But i also let user to update it manually by clicking a refresh button on widget.How can i perform the click action and refresh the widget? Note: The widget uses service to perform operations. Thanx in advan...

android activity running in bkground

is there a way to keep an activity running even though it has been sent to the background, home button is clicked, ? My app has a countdowntimer and i want the timer to keep running even though the app is in the background. Is there a way to do this without using services ? Because ive been reading up on services and im really notgettin...

Strange behaviour in Expandablelistview - Android

hi all, Im trying to implement an activity that uses ExpandableListView and I have gotten so far but now I have found some strange behavior. My activity is meant to record food intake as specified by the user. they have a choice of menus (breakfast, lunch and dinner - the outer group) which expand to show their contents. when a user c...

Util Class in Java

Hello Friends! I want to know about the util Class used in Java. I am currently working on one Application in Android where I need to used a class from one file to another different file. I was told to import it like "import com.android.utli.(ClassName)" here the "com.android.util" is a package name. Can I use thast class in my another...

How do i put a vector into my arrayadapter?

I have the current code: ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_spinner_item, array_spinner); adapter.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item ); colourSpinner.setAdapter(adapter); How would i put a vector into my array_spinner? Thank you. ...

Detect when Android emulator is fully booted

I want to create a script where I start an emulator and after the system is fully booted, I want to install an .apk. How can I know when the emulator is fully booted so I can run the install command? Here http://developer.android.com/guide/developing/tools/adb.html it is said that adb wait-for-device install <app>.apk is not correct. S...

AlarmManager with pending intents to update a widget

I have a requirement where in i need to updated my widget once in every 15 seconds. There is a method called android:updatePeriodMillis but that seems to be getting fired only after 30 minutes. I took an approach of updating my Widget with the help of AlarmManager. The widget updates but the issue is it slows down the performance of th...

How to change row height in ExpandableListView

Hi All, Is it possible to change the children row height in ExpandableListView ? Thanks ...

How to center icon and text in a android button with width set to "fill parent"

I want to have an Android Button with icon+text centered inside it. I'm using the drawableLeft attribute to set the img, this work well if the button has a width of "wrap_content" but I need to stretch to max width so I use width "fill_parent". This moves my icon straight to the left of the button and I want both icon and text centered i...