**** BEGIN LOGGING AT Wed May 06 16:47:46 2009 May 06 17:13:04 is there a way to draw a horizontal line in the layout xml files? I want a divider between list items May 06 17:13:41 list items have a divider between them by default, right? May 06 17:15:14 ooooooooh... good point May 06 17:15:27 but if you look here there are some ways to tweak it: http://developer.android.com/reference/android/widget/ListView.html May 06 17:15:50 perfect, much better place to look May 06 17:17:22 incidentally, do you know how to set the background color for a listview? If I set android:background in the ListView, the background looks good but the listview flashes a different color when i use the scroll ball to move up and down. But if I set the background color on the individual item view, then the yellow selector color stops working May 06 17:17:37 set the background May 06 17:17:41 and also set the cacheColorHint May 06 17:19:49 beautiful, thank you May 06 17:20:32 is it still not a good idea to directly set the background for a listview? May 06 17:20:42 I remember it killing list performance May 06 17:20:53 oh? is there a recommended alternative? May 06 17:20:59 in a parent view May 06 17:21:07 I don't know if it is still true, however May 06 17:22:03 you can test it out and see how each performs May 06 17:22:13 just keep it in mind in case things are sluggish :) May 06 17:23:41 thanks. doesn't seem noticeably more sluggish in the emulator for my current dataset, but i'll remember that May 06 17:29:06 is there a slated date if at all for a Magic dev phone? May 06 17:29:32 i wouldnt necessarily assume that google will be doing that for every android phone released moving forward May 06 17:30:13 I was assuming HTC was the one that did it, and Google "marketed" it May 06 17:30:52 since firmware updates, etc. are on the HTC site May 06 17:30:58 for the dev phones May 06 17:35:36 on the dev phone, the only locale is english, are there language packs I can download? May 06 17:35:47 romainguy_ or scootley: it's weird, I tried setting the android:divider on my ListView, and my divider disappears. If I use #FFFFFF or #000000 it's invisible, but if I unset it it shows up fine (only the wrong color) May 06 17:37:12 even if I set my dividerHeight="20px" i don't see anything **** BEGIN LOGGING AT Wed May 06 17:43:21 2009 May 06 17:44:59 emmby: try an image and not a color ;) May 06 17:45:24 what herriojr said May 06 17:45:28 it's fixed in 1.5 btw May 06 17:45:46 cool, thanks both May 06 18:01:11 is there anything special I should do as far as color pallets for android? some of my gradients don't look very good.... May 06 18:01:25 palettes* May 06 18:01:32 everything is going to turn into RGB565 May 06 18:01:40 make sure your stuff would look ok converted to that. May 06 18:02:41 you can predither it in Photoshop, that helps May 06 18:03:22 romainguy_: do you know how to enforce RGB565 in photoshop? May 06 18:03:24 does that help performance as well? May 06 18:03:51 zhobbs_: you can't May 06 18:03:56 jasta: no May 06 18:04:13 zhobbs_: but you can use a 565 dithering filter May 06 18:04:25 that's what we do on many of our assets May 06 18:04:30 ok May 06 18:04:34 alternatively you can force dithering on your assets at runtime May 06 18:04:46 using android:dither="true" in a or drawable May 06 18:04:58 that will be a bit slower (to go back to jasta's question) but look better May 06 18:05:01 romainguy_: is that filter built in to photoshop? May 06 18:05:06 hmm, I'll try that May 06 18:05:07 we use this, for instance, on the title bars May 06 18:05:16 no, it's a (free) 3rd party plugin May 06 18:06:08 any chance you have a link to that, or know the name of it? I can't find it May 06 18:09:53 romainguy_: wow, some of my graphics look a lot better with the android:dither....I need to convert all my images! ;) May 06 18:10:05 don't apply it too widely May 06 18:10:15 it does cost something at runtime :) May 06 18:12:16 yeah, I need to find that photoshop filter...I don't want to do it at runtime at all May 06 18:13:09 zhobbs: the actual screen display hardware is quite bad for rendering 24/32bpp imagery May 06 18:13:12 dithering FTW May 06 18:13:29 ctate: yeah, I just tried the runtime solution and it looks way better... May 06 18:13:33 [565 sucks, the gamut sucks] May 06 18:13:47 just don't depend on it for anything remotely performance-sensitive May 06 18:14:24 zhobbs_: but you can only do it at runtime for nine patches :) May 06 18:14:30 romainguy_: can you share that photoshop filter? May 06 18:14:37 do not pre-dither nine patches May 06 18:14:39 or point me to it May 06 18:14:59 hmm, why not pre dither nine-patches? May 06 18:15:15 imagine what stretching a dithered image would do :) May 06 18:15:16 because the stretching will break the dithering and look awful May 06 18:15:27 gotcha May 06 18:15:28 zhobbs_: http://www.telegraphics.com.au/sw/ May 06 18:16:34 romainguy_: 5_6_5 Filter I assume... May 06 18:16:47 5_6_5 isn't the best name for SEO :) May 06 18:16:55 no wonder I couldn't find it :) May 06 18:17:51 thanks, going to see how it works May 06 18:18:25 if I have a nine-patch that is a vertical gradient, I only stretch horizontally I could probably dither it right? May 06 18:21:29 hi.. have a behavior question that came up during monkey testing... kinda cool tester actually.. Ok, app is sitting at a progress-bar dialog while background thread is doing network stuff, and user changes orientation of the phone May 06 18:21:43 ondestroy() gets rolled throughout... May 06 18:22:13 when the app comes back up.... is it common to pop up the dialog again and retry the network op, or.. just let the user do it again? I mean, should orientation change really be 'cancel' ? May 06 18:23:45 you may want to run it as a service so that it persists May 06 18:23:53 I'm leaning toward, put up the dialog and try network again ... May 06 18:24:10 ah a service will survive an orientation change? didn't know that May 06 18:24:30 yeah, services run in the background. May 06 18:24:37 soreachilles: no, orientation change should never cancel anything May 06 18:24:39 if you're hilariously unlucky, the service will get reaped when you disconnect May 06 18:24:41 i agree though, that it is annoying May 06 18:24:48 but that's pretty unlucky, and you can just have it try again. May 06 18:24:58 your best bet is to actually have the dialog be an activity itself May 06 18:25:01 er, unlikely May 06 18:25:03 yes, or that. May 06 18:25:08 actually i'm not even sure why you can create dialogs that are not activities May 06 18:25:16 because of this exact problem - rotation tears down the dialog May 06 18:25:22 this is going to become much more of an issue with the Magic May 06 18:25:28 y... it causes problems, cuz on my ondestroy path I have to dismiss the dialogs May 06 18:25:32 and with cupcake generally now you can rotate accidentally by twisting the phone May 06 18:25:53 making the dialog an activity is a good thought.. lemme think about that one May 06 18:26:04 it's just a theme, i think May 06 18:26:18 you create an activity as normal and set a magic marker thingy on it. then it is rendered on top of your existing activity as a dialog May 06 18:26:33 and dims the activity behind it with alpha, etc? May 06 18:26:35 your normal activity gets onPause as normal, your dialog activity runs the standard lifecycle, and will rebuild itself on rotation May 06 18:26:36 yeah May 06 18:26:42 i haven't used this trick myself though May 06 18:26:53 i haven't looked at whether the api makes this easy May 06 18:27:08 but you can stop rotate from destroying things, right? May 06 18:27:23 so that's the other way... May 06 18:27:27 well May 06 18:27:29 scootley: yeah, handle the configuration changes May 06 18:27:29 yes, by declaring that your activity handles orientation changes itself May 06 18:27:34 but I don't really want to catch it, and wait till I'm done, then let it rotate May 06 18:27:35 yes ..... but it's not the default for a reasn May 06 18:27:44 if you do that you might find your activity goes "weird" in some cases May 06 18:27:57 you have to handle destruction/rebuild anyway May 06 18:28:08 like, if the user receives a call whilst your dialog box is up - don't want to be gone when they finish, right ? May 06 18:28:14 yah.. I'd rather not.. I'm leaning toward just trying again when i'm laucned again.. save some state in prefs onPause May 06 18:28:37 i keep meaning to write some utility classes that do things like try a network operation and pop up a Maps style "we've got problems, but are retrying" dialog box May 06 18:28:54 i think that's the best way to handle potentially flaky/long running operations May 06 18:29:00 that's what I'm doing, essentially... May 06 18:29:01 soreachilles: that works too May 06 18:29:11 I retry in a thread, and post back to main thread to display a dialog May 06 18:29:17 but that's another deal... May 06 18:29:50 so ok... after rotate, I'm going to pop the dialog again and try the network op again... May 06 18:30:03 err, I should say, I'm not going to know it was or wasn't a rotate at all May 06 18:30:09 note that there is also a callback specifically to allow you to propagate 'expensive to reconstruct' state across the rotation destroy/relaunch May 06 18:31:19 onRetainNonConfigurationInstance() May 06 18:31:22 I don't have anything that expensive to reconstruct, unless it can hold onto my thread during rotate (and run it, heh) May 06 18:31:32 ==zhobbs_ May 06 18:34:31 soreachilles: actually, you can hold onto your thread during rotate... May 06 18:34:45 yes, but again, then it won't work properly if you get swapped out by a phone call May 06 18:34:51 your process doesn't die during rotation, only the activity. if you store your reference to the thread statically (be careful!), you can access it again. May 06 18:34:57 it's something to do _after_ the usual state reconstruction, not before May 06 18:35:07 what is so bad about android:configChanges="orientation|keyboardHidden" ? May 06 18:35:35 it's useful but only in certain limited circumstances May 06 18:35:46 i use it in my app to work around a deficiency of webview. you might want to use it if you're writing a game, for instance May 06 18:35:47 scootley: only downside is not being able to use resources for different configurations May 06 18:35:54 if you're writing a standard gui app best to avoid it May 06 18:36:14 but why, unless as zhobbs_ says you want to do something special on config change May 06 18:36:20 zhobbs_: well not quite true. some of the built-in widgets get unhappy if they aren't rebuilt across a rotation. i found adding that to my app screwed up rendering of the background image .... May 06 18:36:27 I say use it unless your layout is complicated enough to benefit from land/portrait resources May 06 18:36:28 so I'd rather keep the path clean... shoving the network op into the db/prefs onSomething() and just checking if anything's there onResume() and if so, doing it, seems reasonable.. I guess unless the user is rotating the phone back and forth May 06 18:36:52 which built-in widgets don't like it? May 06 18:36:58 just background image? May 06 18:37:01 it also means you're less likely to implement state rebuild correctly, imho May 06 18:37:08 because orientation changes are the easiest way to trigger that May 06 18:37:10 TD: I haven't run into any problems like that May 06 18:37:23 snapping the keyboard open/closed tends to reveal bugs in apps (mine included) May 06 18:37:35 that may be true May 06 18:38:55 i mean it's convenient, don't get me wrong May 06 18:39:11 the state handling in android is a PITA. long term the right solution is to have nice frameworks to handle all that for you automatically though May 06 18:39:22 rather than work around it by avoiding state rebuilds now May 06 18:40:20 it'd be worse if we made developers handle layout changes needed when changing orientation.... ;) May 06 18:42:20 RelativeLayout ftw May 06 18:42:40 i kinda wonder if a non-cancelable dialog should prevent a rotate from tearing everything down -- it prevents the backbutton from doing anything.. May 06 18:42:50 afaik May 06 18:43:42 soreachilles: if your activity is manually handling config changes it won't get torn down May 06 18:43:53 anyway state saving/restoring/re-networking seems to work thru a rotate May 06 18:44:05 thx for the ideas May 06 18:44:51 bhayes: Greetings May 06 18:45:00 Hiya May 06 18:51:14 zhobbs_ : I don't want my app to know about orientation change.. it just doesn't seem like it should care. but "we're going away while we're doing network stuff" seems like it could be fairly common, where rotate is just one case.. dunno.. May 06 18:52:47 gotcha May 06 18:53:45 man this monkey tester is absolutely bat-shit crazy May 06 18:53:57 it's awesome, heh May 06 19:04:04 monkey tester? May 06 19:05:03 famast: http://developer.android.com/guide/developing/tools/monkey.html May 06 19:07:07 yeah the adb shell has a monkey testing tool May 06 19:07:15 it goes crazy hitting buttons in your app, rotating it, etc May 06 19:07:29 err, right,that link.. heh May 06 19:13:30 stupid question, if my phone is rooted does that mean that my apps are automatically being run under root? May 06 19:13:58 no May 06 19:14:06 good May 06 19:14:18 next question May 06 19:14:20 however, the nature of the root hack is that any app *can* run arbitrary code as root if it wants to May 06 19:14:31 ctate, gotcha May 06 19:15:01 So Cupcake has been released in the UK aparently, with no word on a US release date still May 06 19:15:23 4 of my apps are toast under cupcake, 3 of which can be repaired. May 06 19:15:31 guy on #android earlier today said he called TMO just now. they told him it was already being rolled out to existing G1 customers. May 06 19:15:57 I'll believe it when I see it. Of course I'm not on JF so I'll never see it May 06 19:16:25 if it hasn't been reported on websites, I'm not believing "guy on #android" and "TMO Customer Service" May 06 19:16:38 heh May 06 19:16:40 ordered a g1 from amazon yesterday.. ships on the 11th May 06 19:16:50 wonder what it'll have on it May 06 19:16:54 it was spaztik there; he's still around if you want to ask him directly May 06 19:16:58 probably 1.1 May 06 19:17:19 in the box, yeah probably May 06 19:17:23 sorach, I'm guessing cupcake isn't factory installed yet May 06 19:17:41 gotta flush the supply chain before 1.5-from-factory devices hit shelves May 06 19:18:21 with a 6 day delay to ship, i'm surprised they have much in stock... maybe tmo does May 06 19:18:42 they have elves making them in the north pole 24/7 May 06 19:18:55 soreachilles: who has the 6 day delay? May 06 19:19:01 amazon May 06 19:19:05 which device? May 06 19:19:09 g1 May 06 19:19:12 * ctate nods. May 06 19:19:40 hm, i wonder whether it's possible to buy a Magic from amazon May 06 19:20:35 hm, looks like no, at least if you're going to amazon.co.uk from a US IP address May 06 19:23:43 hmm. I have a UK g1 here, I'll scream if I get 1.5 pushed to me :) (and I scream also in real life because I guess that there will be a lot of apps breaking after the 1.5 update (I mean visually, not crashing or something)) May 06 19:24:11 that's bad if aps start not working across an update May 06 19:24:17 i didn't have problems with my apps, except togglewifi May 06 19:24:18 start not working.. nice usage May 06 19:24:24 nah, they will still work - they'll just look weird :) May 06 19:24:27 which is in the class of "settings tweaking apps that no longer work" May 06 19:24:44 TD, togglewifi works May 06 19:25:41 it didn't for me :( May 06 19:25:52 what version are you on? May 06 19:26:02 anyway, i just leave wifi on all the time now, didn't notice any change in battery life yet May 06 19:26:04 so i guess it's no biggie May 06 19:26:11 uh, dunno. whatever the latest version was i guess May 06 19:26:18 * TD -> heading out now May 06 19:26:28 did you root your phone and install cupcake? May 06 19:26:45 i have an adp1 May 06 19:26:50 they had cupcake pushed to them already May 06 19:26:54 I've seen a couple of apps that use minimum width of buttons to layout themselves (http://2.bp.blogspot.com/_9l0GmPwgCzk/Sd-e2fnrTlI/AAAAAAAAADc/bgt_QYsnxCs/s400/grid.png) and stupid stuff like that :( May 06 19:27:31 TD, I ask because I wrote that. And from what I understand wifi settings haven't changed, and it should work. It works under my JF1.5 May 06 19:27:35 urg May 06 19:28:02 they didn't push cupcake to ADP1s. May 06 19:28:17 they published a 1.5 system image that ADP1 owners could download and flash. May 06 19:28:22 won't you guys be having fun when you have app compat flags in android os... May 06 19:28:32 soreachilles: shoot me now May 06 19:28:35 y May 06 19:28:41 we're trying pretty hard not to do that May 06 19:28:48 yeah... good luck.. May 06 19:28:59 every os does May 06 19:29:05 i believe the wifi settings issue may be a case where we documented that there was a permissions requirement but the code happened to not actually check May 06 19:29:09 and now it does. May 06 19:29:09 that has popular apps May 06 19:29:36 "app compat flags" ? May 06 19:30:06 they're the devil's work May 06 19:30:23 say you have a popular app that likes to overrun memory May 06 19:30:33 but on some particular version of an os, nothing's in that memory space to worry about May 06 19:30:38 but then you rev the os, and now there is. May 06 19:30:46 if you ship the os, people say you broke popular-app May 06 19:31:15 so the os says, ok, this app is running, but some crap in that spot in memory so the app can overwrite it May 06 19:31:32 but = put May 06 19:31:39 It doesn't seem like there was much of a lag between when developers had access to the new OS revision to when consumers had it on their handset, but maybe that's for the best.. May 06 19:32:56 no, it was not ideal May 06 19:33:09 we'd like to have SDKs ready further in advance May 06 19:33:41 we wound up breaking a public API without realizing it May 06 19:33:51 and the breakage was spotted two days after the 1.5 preview SDK came out May 06 19:35:19 hmm May 06 19:35:24 that explains much May 06 19:35:25 ctate, huh.. imagine if it was like it was with 1.1 - developers got it after it was pushed to devices :) May 06 19:35:27 thanks ctate May 06 19:36:53 monkey broke my emulator May 06 19:36:55 :( May 06 19:37:02 as long as my app works under JK15 though I'm assuming it's ok under the general release May 06 19:37:11 (without root of course) May 06 19:37:15 bad monkey May 06 19:50:46 I'd like to show and hide part of layout (view) based on orientation, how do I do that? May 06 19:54:15 mp, (just an example) you can define different layouts for different screen orientations - just place your layout .xml files under different directories (layout-land/ and layout/-port for example) May 06 19:55:14 THAT is what layout-land means? May 06 19:55:26 I've always wondered... May 06 19:55:55 -land for landscape; -port for portrait May 06 19:56:59 woh that's good to know May 06 19:57:14 isn't this in the docs? May 06 19:57:40 (or are you guys in the "print is dead" camp? ;) ) May 06 19:58:16 it may be.. but it sure didn't stick when I read it... I mainly work from the APISamples codebase for 'documentation' .. May 06 19:58:16 btw, there's still one "type" left here: http://d.android.com/guide/topics/intents/intents-filters.html#ccases May 06 19:59:58 ctate, I normally go hunting in the docs for things I need. Very few pieces of it that I've actually just browsed through May 06 20:00:31 somehow I missed the new SlidingDrawer widget...nice! May 06 20:01:03 I generally look i apidemos/res/layout May 06 20:01:14 and just never saw layouts in different directories.. May 06 20:01:21 mp, if you want to do it from code then that's also possible - I believe it was hidden somewhere in the Configuration class (you can check if the orientation == ORIENTATION_LANDSCAPE or ORIENTATION_PORTRAIT and then just hide/show your view's with view.setVisibility(..)). And there seem to be many more ways to do the thing that you want to do :) May 06 20:02:11 I'm trying to figure out OrientationEventListener now May 06 20:02:45 zhobbs, where is the sliding drawer widget? May 06 20:03:08 ah you can also do drawable-land drawable-port ... cool May 06 20:03:13 sure May 06 20:03:17 andrewoid: in 1.5, "android.widget.SlidingDrawer" May 06 20:03:54 soreachilles: you can also do thing like drawable-HVGA, drawable-QVGA, drawable-enUS, etc...theres all kinds of options May 06 20:04:01 nice May 06 20:04:08 soreachilles: and values-*, etc May 06 20:05:18 zhobbs, ahh, I thought you meant a widget in the interface. May 06 20:07:00 soreachilles, you can also combine them (for example layout-port-enUS) May 06 20:07:21 zhobbs, http://developer.android.com/guide/topics/resources/resources-i18n.html doesn't list HVGA etc, where did you get them from? :) May 06 20:10:41 tauno: think romainguy_ mentioned them...he also said you could do specific resolutions like drawable-640x480 or something May 06 20:10:56 tauno: so...not sure on the specifics May 06 20:11:30 ah yeah, I see specific resolutions mentioned but not HVGA/QVGA May 06 20:11:47 tauno: I might be mistaken May 06 20:11:51 well only HVGA is supported at the moment anyway May 06 20:12:03 ot: does anybody know why there's no API demos app included in the 1.5 SDK? May 06 20:12:13 tauno: they are May 06 20:12:21 where do I find them? May 06 20:12:22 look in platforms/1.5 or something like that May 06 20:12:37 I mean the actual app installed on the emulator May 06 20:12:49 just install it yourself May 06 20:12:57 (was it called api demos in 1.0?.. I think it was) May 06 20:13:30 romainguy, that's why I'm asking why it isn't included by default :) May 06 20:16:03 a non-technical UI designer wants to have a look at different widgets etc in 1.5 and I better don't tell him to go and compile and install something from some directory :) May 06 20:18:24 give him the apk on a website May 06 20:18:46 yeah, doing that atm May 06 20:20:16 damn non-technical people :P telling them to "install an emulator" and "make an avd" and "do it from the thing called "command line" is too time consuming :) May 06 20:21:16 fuckers won't go hexedit their own bins May 06 20:29:58 you mean they want something that just works when they get it? shocking ;) May 06 20:31:16 yeah, strange people (or you can use the wording that vol used) May 06 20:31:21 i like how monkey is pulling up the kanji keyboard and banging away while my app is on the network.. i don't even know how to switch to that kb May 06 20:32:15 app's got a non-cancel dialog up, on network, and the damn monkey wants to write something in japanese May 06 20:32:37 that's what they do :)) May 06 20:32:45 the found so many weird/subtle bugs for us May 06 20:32:48 I hate them May 06 20:32:53 but because they're so good at finding bugs ^^ May 06 20:33:03 yeah May 06 20:33:19 yeah it's a cool app.. it's just psycho what can go wrong in an app though.. rotations, kb's, I swear I see three dialogs on top of each other at times May 06 20:33:46 I guess some are fading out while others are coming up May 06 20:34:46 yeah somehow it's got a listview ontop of a date picker dialog.. how the hell did it manage that.. May 06 20:35:07 app's not crashing though, heh... hmm May 06 20:38:24 hi guys... anybody been able to stop a sound with soundpool on 1.1? The setLoop and setVolume hacks are not working for me May 06 20:38:53 I've read that it is quite buggy on 1.1 as well - so yes, I am aware that it should be fixed on 1.5 May 06 20:48:08 hi ctate May 06 20:48:50 did everyone get their free kfc? ;) May 06 20:50:48 Hi all. I need your help. While application closing a want to save it's state May 06 20:51:10 In the application I have text view inside scroll view May 06 20:51:11 onDestroy methods, etc.? May 06 20:51:44 so I'm saving text and scroll position May 06 20:51:45 onStop/onPause May 06 20:52:13 but I have a problem while restoring scroll position May 06 20:52:32 in restore I set text into text view May 06 20:53:18 but scrollTo does nothing May 06 20:53:34 CTPE^OK: you're talking about a list, right? May 06 20:53:39 no May 06 20:53:50 dang i wish they had free kfc here May 06 20:54:02 scootley: where at? May 06 20:54:08 not there May 06 20:54:30 CTPE^OK: then just grab the view and requestFocus() May 06 20:54:44 scrollto methods works only after the view was shown May 06 20:54:58 CTPE^OK: requestFocus() on the view May 06 20:55:09 hm May 06 20:56:00 invoke requestFocus before scrollTo? May 06 20:56:17 no, just requestFocus and don't do scrollTo May 06 20:56:32 I'm assuming you're using a ScrollView? May 06 20:56:44 textview inside scrollview May 06 20:56:56 yeah, just requestFocus should work May 06 20:57:09 after the application restart? May 06 20:57:09 textView.requestFocus() May 06 20:57:14 sure May 06 20:57:19 whenever you want it to have focus May 06 20:57:44 I don't need it to have focus May 06 20:57:48 either in onCreate for a rotation, or in onRestart when you leave and come back May 06 20:57:57 requesting focus selects it and scrolls to it May 06 20:58:14 no no no May 06 20:58:17 ah ok May 06 20:58:33 I have a large text in text view May 06 20:58:48 so it doesn't feet in the screen May 06 20:58:57 so I placed it into scrollview May 06 20:59:08 to have a posibility to scroll it May 06 20:59:18 ok May 06 20:59:50 there is only text view inside scroll view May 06 21:00:29 and I want to scroll it to the saved position while restoring May 06 21:01:15 I'm sorry for my english. Do you understand me? May 06 21:01:29 CTPE^OK: your english is fine May 06 21:01:33 I'm just thinking through it May 06 21:02:06 so after setting text into textview it has zero sizes May 06 21:02:21 and I guess that's why scrollto does nothing May 06 21:03:28 if I invoke this method after the biew was shown it does scroll to the specified position May 06 21:03:44 *view May 06 21:04:21 If I was going to write something that has to fetch data from the netwrok every x minutes/hours, then the best way would be to use the AlarmManager to schedule a service to run at that interval, right? May 06 21:04:26 did you try putting scrollTo inside of on onResume? May 06 21:04:33 yes May 06 21:04:50 tauno: yea i would think so May 06 21:05:00 tauno: yes, that's how I'd handle it May 06 21:05:30 CTPE^OK: I'd have to make a test application to try stuff, which I don't have time for, sorry. May 06 21:06:58 CTPE^OK: can you directly set mScrollX and mScrollY? May 06 21:07:28 it's private May 06 21:07:47 CTPE^OK: yeah, sorry, I don't know without testing things May 06 21:07:56 ok, then regarding this AlarmManager.setInexactRepeating(..) docs say that "..while the overall period of the repeating alarm will be as requested, the time between any two successive firings of the alarm may vary. If your application demands very low jitter, use setRepeating(..)" about how big timeframes are we talking here? if I schedule it to run every 5 minutes, it may run instead in 5 minutes+- how much? :) May 06 21:08:40 tauno: don't know, I allow the user to set the polling time May 06 21:09:03 tauno: it will run *on average* every 5 minutes. May 06 21:09:14 but the time between any two alarms is not guaranteed not to jitter May 06 21:09:52 herriojr, I'll also let the user choose it but I want to use the "better" version of setInexactRepeating/setRepeating (eg the one that "saves" most battery) May 06 21:10:00 in the current implementation, btw, if you ask for 5 minutes it'll be quite exact; it will just fall back to setRepeating() if you don't use one of the provided slots May 06 21:10:27 .setOverCaffeinatedTimer() {I'll be here all week; please tip your waitress} May 06 21:10:28 also in the present implementation there will be no jitter May 06 21:10:42 we just don't promise that there will NEVER be jitter May 06 21:10:43 tauno: so I'm guessing inexact piggy-backs on any connection near that time May 06 21:10:47 ctate, is there a maximum jitter time between any 2 events? (eg 2x the interval or something like that) May 06 21:11:14 tauno: like i said, the current quite-simple implementation does not jitter May 06 21:11:35 what it does is align your alarm with others with "compatible" periods May 06 21:11:45 ctate, ok, understood (didn't see you response before hitting submit, sorry) May 06 21:11:54 so there may be a certain amount of additional latency at first May 06 21:12:02 fwiw i wrote this code :) May 06 21:12:41 in the future, i want to make it jitter a bit in order to "stack" nearby alarms together May 06 21:12:58 even alarms with arbitrary periods May 06 21:13:24 but as you realize, managing jitter effectively is a lot more tricky and so i went with a simple, easy-to-understand behavior initially May 06 21:13:58 the intent of inexact alarms is to support "occasional" events in an efficient way May 06 21:14:20 check the current temperature every fifteen minutes or so; update something every hour or once a day; that sort of thing May 06 21:14:21 I really like the idea that similar events are grouped together to wake the device up as rarely as possible but I also want to be sure that the jitter isn't some crazy value (so my 10 minute interval event will fire @ T + 10min/29min etc intervals :) May 06 21:14:33 ha ha ha May 06 21:14:48 yeah, the jitter will always be a small fraction of the period May 06 21:15:03 ok, really great May 06 21:15:09 so e.g. an hourly inexact alarm might sometimes see a jitter of +/- 5 minutes May 06 21:15:19 maybe even 10 but that's stretching it May 06 21:15:36 i don't think we'll ever allow reschedule/jitter of periods < 15 mins May 06 21:15:49 maaaaaybe 10 mins May 06 21:15:50 ctate, ok, thanks, that's what I wanted to hear :) May 06 21:15:54 +/- 2 or something May 06 21:16:18 doing alarm-based work every 10 minutes is pretty unfriendly in terms of battery life; we don't want to encourage it. :( May 06 21:16:42 hmm ... I think I'll write a new roleplaying game for the G1 called Abuse. You take the role of an application developper and must fight hordes of trolling commentators off May 06 21:18:00 ctate, couldn't the app secify (very broadly) on how much jitter it tolerates? (eg setInexactRepeating (int type, long triggerAtTime, long interval, PendingIntent operation, int jitterTolerance) where jitterTolerance can be something like none, low (0-5%), medium(0-10%) etc.. May 06 21:18:52 it could but honestly i think that's overengineering May 06 21:19:04 if you really want low jitter, you just use setRepeating() May 06 21:19:29 and this way the API is clearly parallel to that of setRepeating() May 06 21:19:42 nah, I want it to be higher in some cases (probably) :) May 06 21:20:04 ctate, but yeah.. that would be overkill May 06 21:20:18 remember that *amount* of code to implement is always a background factor May 06 21:21:14 ctate, anyway, go and implement the jitter thingie - it sounds really great in theory :) May 06 21:21:41 thank you :) May 06 21:25:56 Argh. Anyone know why eclipse occasionally spends 15 seconds trying to do autocomplete for the simplest things? What is it getting hung up here? May 06 21:26:23 Eclipse. May 06 21:26:28 * ctate ducks. May 06 21:26:38 vol, what version? I had that in some older 3.x version but upgraded to latest ant it went away May 06 21:27:13 ctate, yeah, we'd all like to have IDEA but we just can't afford it :P May 06 21:27:19 3.4 May 06 21:27:41 agh, no, I'm using 3.3.2 (wtf) May 06 21:27:49 aha. May 06 21:28:06 that might not solve your issue but upgrading solved mine at least May 06 21:28:41 ctate, you are using that there, aren't you? :) May 06 21:29:20 hmm IntelliJ :)) May 06 21:30:10 damn.. it also includes git support out of the box now? May 06 21:30:14 yes May 06 21:30:33 oh well.. time to download the trial again :P May 06 21:31:01 are the datepicker and timepicker dialogs different than 'user created' dialogs? The date/time ones don't go away on orientation change, but the dialog I'm showing does go away... am I on crack? May 06 21:32:22 that is, I don't do anything to re-show the datepicker on orientation change/restore.. but it's still visible in its same state (wich is nice).. I'm trying for the same effect with my dialogs, but have to persist state, restore dialog from saved state, etc May 06 21:34:21 nm I'll figure something out.. seems wrong as it is May 06 21:42:19 is it a bad idea to start a thread in a ContentProvider? May 06 21:44:24 ok, contacts has the same issue/feature .. selecting the phone label type (home/mobile/etc) dialog then rotating, makes the dialog go away and not come back up. maybe I'll just do that too... May 06 21:46:04 herriojr: consumers of ContentProviders aren't expecting async results...so not sure why/when you would need to do that May 06 21:48:15 sorry to bug you again, but let me perhaps try to ask again.... anybody been able to stop a sound with soundpool on 1.1? The setLoop and setVolume hacks are not working for me May 06 21:48:36 djola: how are you playing the sound? May 06 21:49:49 soreachilles, how are you showing your dialogs? May 06 21:51:56 zhobbs: to keep database up to date if it relies on external databases....right now I have it in a service, which I feel is kind of the wrong place May 06 21:52:16 soreachilles, don't just do dialog.show() when you want it to be auto-managed by the activity. call activity.showDialog(id) etc (look in Activity documentation) and it will be automatically restored on configuration changes May 06 21:52:29 soreachilles, or maybe I just didn't understand your question :) May 06 21:52:50 herriojr: service is probably the right place...you can send commands to the service in the ContentProvider May 06 21:53:17 zhobbs: yeah, I just wanted to keep all database-related stuff in one location instead of splitting it up May 06 21:55:50 zhobbs: I guess I can look at having the service as a member of the provider of the provider May 06 21:55:53 "selecting the phone label type (home/mobile/etc) dialog then rotating, makes the dialog go away and not come back up." <- that's a bug then IMO :) May 06 21:56:07 *of the provider (just one ;) ) May 06 21:56:52 herriojr: I think there's a possibility of your provider's process being killed when it's done (similar to a BroadcastReceiver), so you should use a Service May 06 21:57:05 zhobbs: alright then, leave it as is ;) May 06 21:59:15 zhobbs: I am playing with a soundPool.play(soundPoolMap.get(sound), streamVolume, streamVolume, 1, 0, 1f); May 06 22:00:21 playing it works just fine. I was trying to get a thread playing several audios on timed intervals (which worked fine as well) and then needed to stop what was playing when another event happened. May 06 22:01:32 according to docs, soundPool.stop(soundPoolMap.get(sound)); should work, but most people are going with a hack that uses setLoop and setVolume. It worked for some, but in my case it does not. May 06 22:05:01 herriojr: a Service is absolutely the right place to do data management etc that is not tied to a specific Activity UI May 06 22:05:25 doubly so because you're talking about a ContentProvider, which is intended for interprocess data management May 06 22:11:10 what's the right way of designing something like this: I have x Activities and one background worker thread. the worker thread wants to display some (managed) dialog at some random point in time - I do not know which activity the user is using at this moment so how do I manage that? use an activitygroup around the x activities (so the worker has a reference to the activitygrop and the dialog-showing-logic is implemented in the group)? May 06 22:18:03 djola: Are you doing it on 1.5? May 06 22:18:41 djola: I had endless problems with SoundPool on 1.1, but it works on 1.5 May 06 22:19:19 Is the skeleton app "tests" subdir supposed to be able to run out of the box with ant? May 06 22:20:16 Not the actual SkeletonApp, just the one that's created with the "android create project" command. May 06 22:22:01 kRutOn: no, I am using 1.1... the problem of using 1.5 now is that I would not be able to test it on my device (not a devel one due to the outrageous shipping to the UK :) May 06 22:22:36 ok to make it clearer, imagine I have a fart-sound-app that has two activities, MainFartActivity and SettingsActivity. Then I have a long running task that's running in CheckForNewFartsThread. Now it would be fantastic if a "Hey, there are new and cool farts available, wanna download them? yes/no" dialog would pop up no matter if the user is in SettingsActivity or MainFartActivity. How does CheckForNewFartsThread know which activity to "ca May 06 22:25:51 tauno: an intent to bring the bring the pop-up when you have your new farts available? May 06 22:26:18 too many brings there... heheh May 06 22:26:52 how do I display a dialog using an intent? :) May 06 22:29:17 I'm feeling like a complete newbie here, sorry for these silly questions but I still don't see how I could accomplish that :( May 06 22:29:33 guys, correct me if I am wrong, but roughly you need to create an intent filter in your manifest that relates to your new farts window and then you'd bring it to the foreground with something like: startActivity(new Intent("your.package.your_activity.SHOWNEWFARTS")); May 06 22:30:05 tauno: well, welcome back to the newbie club. :) May 06 22:31:12 but I don't want to launch a new activity (or bring some activity to the foreground) - I want to display a dialog in the activity that the user is currently running/using May 06 22:32:53 sorry, but my knowledge stops there. I know you could launch an alert like dialog, but I do not see how you could trigger it without some sort of message (hence the Intent) May 06 22:33:59 perhaps you could get away with a very simple activity with translucent rendering? May 06 22:34:11 it would definitely look like a dialog! :) May 06 22:35:29 djola, that would be a hack May 06 22:36:05 and I don't want to add any more hacks ;) May 06 22:36:11 well, I see no way of getting around without a few at times :) May 06 22:37:18 romainguy, sorry to bother you again but can you give me a hint? :) May 06 22:40:59 I would think that you could create another thread to listen to intents within your Activities which would act when your polling thread sent the other intent request? May 06 22:43:20 err another hack then May 06 22:43:22 :) May 06 22:52:50 now I scared him away :( May 06 22:57:52 is Bitmap.getPixel() very expensive? May 06 22:58:54 probably, sammyF May 06 22:59:16 it does a bounds check in java then dives to native to read the color May 06 23:00:47 ctate, would it be faster if I stored the bitmap in memory in an array and did the reading there? May 06 23:01:16 don't do that May 06 23:01:27 then you're duplciating the bitmap storage, which is big May 06 23:01:43 what are you doing that requires individually reading lots of pixels? May 06 23:02:01 actually I only read 3 per pass if all goes well May 06 23:02:08 (also, as always, implement, THEN benchmark to see what the slow parts really are) May 06 23:02:16 oh, dont' worry about it for only a few May 06 23:02:24 ctate, I did May 06 23:03:47 that's why I'm asking. I have two bitmaps basically. one with the actual stuff that's showing on the display, and one with color coded informations needed by the game. I only have to read one pixel per active objects for each refresh in 99% of the cases May 06 23:04:20 the game went from extremely fluid and fast and responsivce to a state similar to molasse, just not as fast May 06 23:04:52 that's a bad sign May 06 23:05:01 and would seem to answer your question :) May 06 23:05:03 yep May 06 23:05:20 is this a SurfaceView? May 06 23:05:33 i know that in general the framebuffer is *extremely* slow to read May 06 23:05:40 also it isn't cached May 06 23:05:45 cya tomorrow guys - time to go to bed May 06 23:05:50 you mean the bitmap I'm reading from? no... it's just in memory but is never shown May 06 23:06:08 * ctate nods. May 06 23:06:21 so yeah, sounds like reading a pixel is slow in general :( May 06 23:06:28 sigh May 06 23:06:43 (i'm not one of the real graphics people alas; you'd do better for this sort of question on the android-developers mailing list possibly) May 06 23:06:50 that's not particularly good May 06 23:07:38 yeah. I'm going to ask there. my game really depends on the information from this bitmap. I guess I could do it another way, but this *sounded* like the fastest way to do it. May 06 23:08:03 I mean ... it should really be only reading one byte from mem ... how hard can that be? May 06 23:12:34 well, when it involves calling into jni... May 06 23:14:41 I'll try copying the bitmap's pixel into a buffer and use Buffer.get to grab the pixel. Who knows.. maybe it's faster. either way, if I don't find a solution I'll have to rethink the whole concept May 06 23:20:20 if you're just reading a pixel over and over, consider caching that pixel yourself somewhere outside of the bitmap May 06 23:21:55 can I just return an ImageView in BaseAdapter.getView()? May 06 23:22:07 vol, that was the idea with the buffer. If I understand it correctly, a buffer is just a chunk of memory I can read from more or less directly May 06 23:23:41 vol: I don't know which pixel it will be. The idea is taht I check the colour of the pixel that's underneath a sprite to give me informations I need for the game. May 06 23:23:47 I'm not inflating the ImageView...just using ImageView(Context), do I need to add it to the parent being passed in? May 06 23:25:28 sammyF, will the contents of the buffer (the image that you want to get the pixel from) change? May 06 23:26:21 no. Only when a new level is loaded. Once the level is loaded, the information won't change May 06 23:26:59 I mean, I envisioned to make it change at some point, but considering the problems I have now with static informations ... ;) May 06 23:27:28 can't you just store the pixel values in an int[] then? and if you need to read pixel n, then just read the n'th value from the array? May 06 23:28:22 and repopulate the array just once when changing levels May 06 23:29:07 tauno, yep. that's what I'm going to try now. Hopefully it will be fast enough. May 06 23:29:51 if (pixelValues[243] == SOME_COLOR) will be fast :) May 06 23:30:35 just populating it will take some time but since you are doing this only really rarely (level change) then I see no problem May 06 23:30:46 (oh and the array takes some memory.. that's the downside) May 06 23:30:47 using getPixel sounded like a more ~professional~ approach, but I should have known hacking would be the way to go ;) May 06 23:31:36 yep. memory might be a problem. I'll try an dsee May 06 23:31:40 "and see" even May 06 23:32:29 what's wrong with this BaseAdapter.getView() ?? GridView won't display the images: http://pastebin.com/m38bd19c3 May 06 23:32:55 you are generating these bitmaps for collision detection from the visible-level pictures by hand? May 06 23:33:06 tauno, yes May 06 23:33:26 not just collision detection though May 06 23:33:58 I also store slope information in the bitmap May 06 23:34:32 vaguely based on normal mapping May 06 23:35:03 what you could do to save memory is that you don't bundle the not-visible-bitmaps at all with your app - just write some j2se code that generates these pixel arrays for you and then include just these arrays (so you are not holding the indomation in two places in memory) May 06 23:35:26 information* May 06 23:36:20 damn.. I really seem to like these kind of hacks.. err.. I mean "optimizations" :P May 06 23:36:23 you mean, store the array in XML? May 06 23:37:22 tauno, seriously, this is my second application for the Android and also my second one in java, and ~optimizing~ has been what I spend most of my time on apparently ;) May 06 23:38:16 Life was so much simpler when writing C++ for cpu/gpu combos with too much power ;) May 06 23:38:43 sammyF, in xml or in code (as in int[] level1 = new int[] {0x12345678, ...};) May 06 23:39:13 but it might be a stupid idea.. since I haven't written anything like that before and maybe it just makes things worse :) May 06 23:40:30 oh well .. I'll just generate it on the fly for now. If the speed is adequate when actually running the game, I'll think about exporting the information. It's a good idea, but if Android crashes out of memory when doing it on the fly, I'd rather spare me the time spent on the export function ;) May 06 23:49:16 it doesn't even take THAT long May 06 23:49:30 and it's definitely faster May 06 23:50:11 cheers everyone :) May 06 23:51:03 np, that's why we're here for :) May 07 00:06:33 anyone have a good idea of a way to implement the photogallery that android has without running out of memory? May 07 00:14:48 ? May 07 00:14:57 chouman82: check out the api demos May 07 00:35:04 <[cliff]> hi all May 07 00:35:59 sup May 07 00:36:35 <[cliff]> same old, same old ;-) May 07 00:38:58 <[cliff]> anyhow, I'm trying to figure out how to solve an issue i'm facing: I have a ListView that has a ResourceCursorAdapter subclass for it's adapter. data coming in from a sqlite database, around 30 rows. If i scroll too fast, it appears that the data of the views are passed between each ListView row May 07 00:39:00 chouman82: also, dont work with enormous images that need to be scaled :) May 07 00:39:12 <[cliff]> and this is driving me nuts May 07 00:39:26 <[cliff]> no globals involved May 07 00:40:19 [cliff]: can we see your code? May 07 00:40:27 there is a lot you could be doing wrong :) May 07 00:40:51 <[cliff]> sure, let me create something on pastie May 07 00:44:16 <[cliff]> jasta: http://pastie.org/private/b6cvskaywp28hxr1kcwpeq May 07 00:44:30 what is viewLayout()? May 07 00:44:49 <[cliff]> utility method May 07 00:46:57 <[cliff]> some stuff is cut off because it's really long, not because it's private/sensitive lol May 07 00:47:40 <[cliff]> right, let me expand the pastie May 07 00:48:52 <[cliff]> http://pastie.org/private/q6isjbubycumjeo8mvsdg May 07 00:48:55 <[cliff]> new and improved May 07 00:49:06 hey romainguy_ , why doesn't this work in an adapter? http://pastebin.com/m38bd19c3 May 07 00:49:38 [cliff]: its pretty important that you show us this method. May 07 00:49:51 <[cliff]> it's there now May 07 00:50:20 i dont show it? May 07 00:50:31 <[cliff]> really? hmmmm May 07 00:50:31 <[cliff]> http://pastie.org/private/q6isjbubycumjeo8mvsdg May 07 00:50:44 <[cliff]> can you try to force refresh the browser? May 07 00:51:24 <[cliff]> yeah I opened a new private instance of my browser and it shows correctly May 07 00:51:41 i show it now, reading May 07 00:53:01 i dont see anything wrong here at first glance... May 07 00:53:15 <[cliff]> yeah, the mind boggles May 07 00:53:45 <[cliff]> I looked at android's source code and it's pretty safe there are no bugs there :-) May 07 00:54:13 i doubt very much that its an android bug :) May 07 00:54:55 <[cliff]> oh yeah, I'm pretty sure on that too :-) I just wanted to understand how the CursorAdapter works May 07 00:55:46 <[cliff]> what's more interesting is that the old code worked perfectly. the old code worked from memory instead of fetching data from the database, hence no cursors were involved May 07 00:55:59 <[cliff]> I just had an array and a ViewAdapter subclass May 07 00:56:14 can we perhaps blame your ContentProvider? May 07 00:56:16 <[cliff]> same viewLayout method May 07 00:56:18 or the content provider that gave you this cursor May 07 00:58:04 tauno: thanks for the tidbit about managed dialogs.. I wasn't aware the difference between management of dialogs in dialog.show() vs activity.showDialog(id) May 07 00:58:37 <[cliff]> jasta: i'll log that code, but I think it's pretty safe May 07 01:04:40 <[cliff]> the query method appears to be working correctly May 07 01:13:56 hmm, so no way to launch an email without a recipient it seems.... May 07 01:14:19 <[cliff]> yeah, it seems that it's some problem related to drawing May 07 01:14:44 <[cliff]> if you noticed the code, I have a HumanDateView, it displays dates in a "X time ago" format May 07 01:15:45 <[cliff]> in the method that sets the timestamp I'm logging both the timestamp value and what should be presented in the view (the actual text) May 07 01:15:54 <[cliff]> example: May 07 01:16:04 <[cliff]> D/handivi ( 572): setTimestamp: 1240568912 D/handivi ( 572): human date: 12 days ago May 07 01:16:14 <[cliff]> this is what shows in the logs May 07 01:16:21 <[cliff]> what appears on the screen is completely different May 07 01:16:38 <[cliff]> the value is the same as in the first HumanDateView (10 hours ago) May 07 01:17:36 <[cliff]> maybe it's an SDK issue May 07 01:24:41 <[cliff]> well, i'll have to try using a real device and see if the problem persists May 07 01:24:45 <[cliff]> thanks jasta May 07 01:29:17 so what was the reason behind the absolute layout deprecation? May 07 01:31:16 nyt: to encourage developers not to use it May 07 01:31:24 heh May 07 01:31:38 because it will just break apps badly on devices with different screen resolutions and/or densities May 07 01:35:34 also it is being abused by developers unwilling to learn proper layout techniques. May 07 01:38:11 i don't get these managed dialogs... if an activity is managing a dialog (either thru myactivity.showDialog(id) or myDialog.setOwnerActivity(myActivity() myDialog.show()) , and there's a config change which nukes the activity, how does the dialog become managed by the new instance of the activity? May 07 01:38:13 jasta: that too :)) May 07 02:00:21 romainguy__: is there a way to extract a specific Drawable from a StateListDrawable given a stateSet? May 07 02:00:31 or rather, just set it to that drawable, doesn't need to extract it May 07 02:00:50 it's easier to just set the state May 07 02:00:58 just trying to force a StateListDrawable into its various states to observe it. May 07 02:01:02 for a debug tool im building May 07 02:02:42 oh, you can just do setState() in the base Drawable class May 07 02:02:51 that makes more sense than how i was thinking it worked May 07 02:03:33 what tool are you building? May 07 02:04:14 well its not really a debug tool, its more a tool for our UI/UX to explore the theme. May 07 02:04:23 ok May 07 02:04:38 without knowing how to navigate the XML files and what not May 07 02:04:54 nothing fancy though May 07 02:04:55 yeah I've been thinking of building such a thing for the same reasons for a long time May 07 02:05:03 never got around to doing it though May 07 02:05:12 i'd like to recontribute it back but im hacking too much stuff for it to be of much value :) May 07 02:05:18 dont have enough time to do it better May 07 02:05:53 anyway, setState works, sorry i was being dense :) May 07 02:06:06 time to leave work i think :) May 07 02:06:29 the state system is... annoying :) May 07 02:06:42 adding new states to the base View class is a huge pain in the ass May 07 02:06:48 yeah no shit. i saw all that mass of constants in View.java May 07 02:06:55 I wish we used simple strings May 07 02:07:05 even if it's less efficient ^^ May 07 02:07:20 anyway, headin' home May 07 02:07:20 later May 07 02:07:24 see ya May 07 02:22:09 I think my managed dialog woes are due to the dialog being started from a tab, that is itself started as an Intent from a tabhost. When the config change is done, the Intent that started the dialog isn't even active yet. And if I make it the active tab in the tabhost's onStart(), the dialog still doesn't auto-appear. Remove the tabhost stuff , and it all works May 07 02:31:55 quick question guys May 07 02:32:02 trying to underline a textview May 07 02:32:08 tried using span.setSpan(android.graphics.Typeface.UNDERLINE, start, end, flags); May 07 02:32:17 but the UNDERLINE constant apparently isn't defined any more May 07 02:32:21 anyone? May 07 02:32:46 (has to be possible in code rather than just xml - setting it dynamically) May 07 02:36:35 TextAttribute.UNDERLINE May 07 02:36:37 yw. May 07 02:36:55 I see that constant but... May 07 02:36:59 I don't know what to do with it? May 07 02:37:21 I don't see anything in the TextView docs that mentions the word "TextAttribute May 07 02:37:37 setspan is setspan(object, start, end, flags) May 07 02:38:22 so I can give TextAttribute.UNDERLINE for the first argument? May 07 02:38:39 no May 07 02:38:41 you cant May 07 02:38:46 you set the span on the object you want it to apply to May 07 02:39:11 I'm sorry. I don't understand anything you're telling me. May 07 02:41:13 spanTypeFace = new StyleSpan(android.graphics.Typeface.BOLD); May 07 02:41:31 str.setSpan(spanTypeFace, start, end, Spannable.SPAN_MARK_MARK); May 07 02:41:34 theres an example May 07 02:41:39 have fun May 07 02:41:44 but BOLD doesn't do me any good, and there's no such thing as android.graphics.Typeface.UNDERLINE May 07 02:42:14 i just gave you all the info you need, im not writing your code for you May 07 02:42:36 no, you're acting like your superior without actually helping me May 07 02:42:39 specifically May 07 02:42:53 the last line is not applicable because it only works for bold, underline, serif, sans serif etc May 07 02:43:03 if you don't want to help me, fine May 07 02:43:11 but don't act like you're God's gift to coders May 07 02:43:31 and too mighty to bother with the poor teeming masses looking up upon you from the depths May 07 02:43:59 i, too, can pull random lines from the docs that kind of look like they're relevant May 07 02:45:32 rofl May 07 02:46:41 i thought i was god's gift to coders, wtf May 07 02:51:01 i didnt know that UnderlineSpan s = new UnderlineSpan(); was so hard to figure out =[ May 07 02:51:13 oh well May 07 02:58:35 ahh dialog surviving orientation change on tabhost with intent tabs... solved... **** ENDING LOGGING AT Thu May 07 02:59:57 2009