Okay, I see, but I guess I didn't explain my entire issue. I don't know a whole lot about working with the SQLite databases, so right now I'm able to do what was done in the Notepad tutorial, get values from the database and tie them to ids of TextViews to display them. But part of the list I wanted to put together some of the values into a sentence. So I split it up into several text views. I have "Some string blah blah ", then the next TextView holds the value returned. Is there a way I can manipulate the data in each row to put it in my list? I just follow the Notepad tutorial right now. :S
On Mar 3, 12:30 pm, Marco Nelissen <[email protected]> wrote: > On Tue, Mar 3, 2009 at 6:26 AM, droozen <[email protected]> wrote: > > > So, we're supposed to be using our strings.xml to construct most or > > all of our strings, right? I had a situation where I wanted to display > > to the user "Somestringblah blah " + some value. So I put two views > > in a horizontal LinearLayout, with my "Somestringblah blah " (with > > thatspaceon the end, no quotes) in the strings.xml. I reference the > >stringin my first view, then set the value in the second view. > > However, if I set it up like this, thespaceat the end of mystring > > gets trimmed off, which doesn't look pretty. My workaround was not to > > use the strings.xml and place the "Somestringblah blah " (no quotes) > > directly in the android:text parameter of the TextView. > > > Any idea if there is a better way to do this? Or should I submit a bug > > to Android about this? > > Instead of breaking up thestringand using two TextViews to display > what is supposed to be a singlestring, you should use a single > TextView and astringin your resource like "Somestringblah blah > %s", and then use the version of Context.getString() that takes > format-arguments. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

