[android-developers] Auto-closing soft input method

2009-11-26 Thread HenrikH
Hi, Is there an easy way to have soft input methods automatically closed as soon as the user taps _anywhere_ outside of the corresponding EditText? Sometimes it's not very convenient if the soft input method stays on the display when the user starts performing other actions in the same activity.

[android-developers] addPreferencesFromIntent

2009-06-18 Thread HenrikH
Hi, I've been playing around a bit with Preferences and trying to understand how addPreferencesFromIntent works, but I haven't really got it to work. Are there any examples of how to use this at all? I have one (or more) application providing preferences which I want to display in another (host)

[android-developers] Re: Changing 9-patch background on a list item in runtime doesn't always redraw properly

2009-06-01 Thread HenrikH
Thanks a lot Romain. I feel a bit silly not realizing that sharing Drawable instances wasn't such a good idea :) Thanks again /Henrik On Jun 1, 6:48 pm, Romain Guy wrote: > > This works fine but the performance is not that great while scrolling > > since I'm inflating quite a few Views due to c

[android-developers] Changing 9-patch background on a list item in runtime doesn't always redraw properly

2009-06-01 Thread HenrikH
Hi, I have a ListView containing a few different type of items, all having their own background image and font color. In my first implementation I implemented each type of item as its own layout with the background image etc defined in XML (and implemented Adapter.getView() so that it only reuses

[android-developers] Re: Application.onPause()? Is there a hook like this?

2009-05-28 Thread HenrikH
Could you use a timer to introduce a short delay for the deactivation of the listeners? For example by wrapping the calls to LocationManager in a utility accessible from both your activities. If activity A is paused by activity B, activity B would then get focus before the timer expires and could

[android-developers] Re: Starting services on Android Boot

2009-05-28 Thread HenrikH
Add a BroadcastReceiver listening to BOOT_COMPLETED. BR /Henrik On 28 Maj, 02:24, dapaintballer331 wrote: > If I create a no-gui application that extends and android.app.Service > class, how do I get it to register itself so that the application > starts when the phone boots up? > > I need some

[android-developers] Re: Creating a daemon

2009-05-28 Thread HenrikH
You should be able to do this with a BroadcastReceiver listening to BOOT_COMPLETED and a Service. http://developer.android.com/guide/topics/fundamentals.html#appcomp BR /Henrik On 27 Maj, 15:27, dapaintballer331 wrote: > How do you create a java program that runs on startup, in the > backgrou

[android-developers] Re: Controlling the width of listview items

2009-05-27 Thread HenrikH
erarchy of the list item? What am I missing here? Thanks /Henrik On May 26, 11:51 pm, Romain Guy wrote: > List items are always as wide as the ListView. > > > > On Tue, May 26, 2009 at 2:19 AM, HenrikH wrote: > > > Hi, > > > I'm trying to make a list tha

[android-developers] Controlling the width of listview items

2009-05-26 Thread HenrikH
Hi, I'm trying to make a list that contains elements not necessarily occupying the entire width of the screen, but even if using android:layout_width="wrap_content" on my elements, they always behave as if their width value were set to "fill_parent" instead. If I set a fixed value for the width,

[android-developers] Re: How to realize cascading delete in sqlite?

2009-05-26 Thread HenrikH
True, but you can use manually create triggers to implement foreign key behaviour, including cascading deletes - SQLite does support triggers. BR /Henrik On May 26, 9:13 am, Matt Williams wrote: > AFAIK although you can set foreign key constraints in SQLite, they > don't actually work. > This i