Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

rotaryfun posted:

I've not found an elegant solution for including a populated database with an app. Anyone have any experience or do you always check for a database and create it on a first run?

I ended including the database as a resource, and copying it into the proper location on first run. It's not ideal, especially if you've got a large database, but it does work.

Adbot
ADBOT LOVES YOU

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Doctor w-rw-rw- posted:

Why resource and not an asset?

Put it in your SQLiteOpenHelper or whatever it's called, and apply it at database creation or update time. Or something like that.

Err, yeah, it was an asset. I haven't done enough Android development lately to keep all the terminology straight.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane
Strange problem... I have some EditTexts that will need to change between actionDone (in which case the IME should close) and actionNext (in which case the focus should move to the next EditText in the list). When I don't see any IME options, it works as it should, where the enter key moves focus to the next EditText. Likewise, when I set the appropriate IME options to IME_ACTION_DONE, it closes as expected. However, when I have an EditText which previous had IME_ACTION_DONE set, but then has IME_ACTION_NEXT set, it closes instead of moving focus to the next EditText.

Is there something I'm failing to understand about how imeOptions is supposed to work?

EDIT: It appears as long as ACTION_DONE is never set, setting IME_ACTION_NEXT works fine. This suggests to me that I need to somehow "clear" the previous imeOptions, but I can't figure out how to do that. I was under the impression that setImeOptions removed all previous options, but I must be mistaken.

EDIT 2: Apparently IME option changes aren't recognized until the IME is closed and re-opened. As well, it seems you need to manually set Next Focus Down after switching from ACTION_DONE to something else. How I ended up getting it working the way I wanted was to write a custom OnEditorActionListener to handle the change of focus the way I wanted.

PT6A fucked around with this message at 22:05 on Aug 16, 2012

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane
I'm trying to get Eclipse and the Android SDK set up on my laptop. I think I have everything installed properly, but Eclipse and/or ADB will not recognize my phone or my tablet (which are working perfectly with my main computer). I've installed the whole thing on OS X computers successfully multiple times, but this is my first time with a Windows machine, so is there some magic step I'm forgetting? I installed the USB driver for my tablet, but it still won't work.

EDIT: Never mind, the right combination of restarts and unplugging/plugging it in finally got the prick working. I still have no idea why it wasn't working, or what I did to fix it so I can't help anyone else in a similar situation, but the important thing is that it's working now.

PT6A fucked around with this message at 04:26 on Sep 4, 2012

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply