**** BEGIN LOGGING AT Sat Jun 23 02:59:58 2012 Jun 23 03:42:32 hi puppy3ghz Jun 23 05:03:41 is there a service onStop handler ? Jun 23 06:18:25 anyone have experience in doing Facebook friend invitation in your app? Jun 23 06:18:43 like inviting friends to use your app? Jun 23 06:19:20 mobilegamelabs: #facebook is more approriate for that question Jun 23 06:19:34 cross-posting, though, isn't Jun 23 06:37:53 so uh.. Jun 23 06:39:14 There's no onStop() method, only onDestroy(). If I have a service that is both bound (to monitor progress from a main app) and started (to run indefinitely, or until stopped), how can I stop it? Calling stopService aparently doesn't work as intended. Jun 23 06:39:37 can a service start ITSELF with an intent? Jun 23 06:45:07 also, does it violate any design prinicples to have the service stop itself somehow? I DO have access to run a stop() method on it directly, as it's bound with a Binder class.. Jun 23 06:56:02 do all BlueTooth keyboards (including the $9 ones) work well with Samsung phones (including cheap ones too, e.g. Gio) Jun 23 06:56:30 (no idea how standard that is but I think it would be really cool to have one to types notes during conferences) Jun 23 07:11:46 Hello Jun 23 07:18:55 So uh.. Now I'm looking for a chart. Very much like the "Activity lifecycle" chart, but for the Application. Jun 23 07:21:04 process creation -> onCreate -> process killed Jun 23 07:25:38 how can i automatic adjust the layout in all android version? Jun 23 08:29:19 has anyone here created a custom ViewGroup before? i'm looking to replicate the windows phone tile stuff; i would like tiles to be one of several sizes and then they should be draggable to other areas Jun 23 08:30:07 i've played around with wp a little and watched a few videos of how wp8 does it, its very sexy and i think its going to be pretty tough for me to do Jun 23 08:30:33 g00s: i implemented a custom viewgroup.. but for something completely different.. Jun 23 08:30:47 it's a layout that uses proportional values to place its children Jun 23 08:30:58 so it's called ProportionalLayout Jun 23 08:31:01 does it do any drag and drop ? Jun 23 08:31:03 nope Jun 23 08:31:30 g00s: please can you help me for layout automatic adjust in all version Jun 23 08:32:26 i think i'm going to struggle with this Jun 23 08:33:03 http://pastesite.com/38552 Jun 23 08:33:08 just FYI Jun 23 08:33:19 i might package it and put it on github some day Jun 23 08:33:21 thanks tapas ! Jun 23 08:33:31 g00s: no use for your case though :D Jun 23 08:33:48 there are very few examples of custom viewgroups Jun 23 08:33:54 i guess the simplest is AbsoluteLayout Jun 23 08:33:55 it's for one very specific use case only.. Jun 23 08:34:10 i also use custom xml parameters Jun 23 08:34:53 cool Jun 23 08:34:55 http://pastesite.com/38553 Jun 23 08:35:11 cool, thanks Jun 23 08:35:22 anybody there Jun 23 08:35:31 i thought i heard something Jun 23 08:35:35 <.< Jun 23 08:35:37 >.> Jun 23 08:35:40 must be nothing Jun 23 08:36:56 everything on wp is so damn fluid. its like ios or even better Jun 23 08:37:26 i'm getting quit ambitious on how i would like to do this, seeing what they do Jun 23 08:37:42 for example, when i move a tile i would like the others to slide around it (animation) Jun 23 08:37:49 this is going to be fing hard Jun 23 08:39:07 i'm not even sure if the animations avaialble in froyo can even handle this Jun 23 08:39:34 i remember the old music player list reorder dnd was pretty crappy Jun 23 08:45:31 why doesn't google put some pressure on samsung to fix bugs like this? the brand new galaxy s 3 has the same bug as the s 2... http://code.google.com/p/android/issues/detail?id=18336 Jun 23 08:46:22 i actually got into android dev in 2010 to wrote an app, which revolved around this api Jun 23 08:46:38 after buying my phone and spending 6 mos working on the damn thing, found out it was pretty borked Jun 23 08:47:09 for hard sizes in xml layouts, I forget what measure am I supposed to use...dp, sp? Jun 23 08:47:12 how canb we set the touchtone on button click Jun 23 08:47:27 rule of thumb? Jun 23 08:47:34 dp is best Jun 23 08:47:40 kk ty Jun 23 08:48:42 g00s:do u know my question's answer Jun 23 08:48:50 no Jun 23 08:49:08 why i am not getting answer from here Jun 23 08:49:19 GeeksOnHugs: depends on what you want Jun 23 08:49:24 because everybody is sleeping or drinking Jun 23 08:49:25 dp are density scaled pixels Jun 23 08:49:43 sp are density scaled pixels but also taking font size settings into account Jun 23 08:49:51 g00s:oh that means all re bussy on their task Jun 23 08:49:57 (e.g. if the user setup his device to show bigger fonts) Jun 23 08:50:02 px are real screen pixels Jun 23 08:50:15 (except for maybe some compatibility modes) Jun 23 08:50:34 i think basic questioni have asked bit till no any answer here ..too bad Jun 23 08:51:00 jagruti_: please rephrase your question, so we can understand it :D Jun 23 08:51:19 tapas:thx fro your reply Jun 23 08:51:44 tapas: i want to create layout that will support in all android version Jun 23 08:51:46 well, I'm making a simple log in screen...I want centered in the screen: text Username edit Username text pass edit pass....and I was asking for the edit box because I don't want it to stretch over whole screen (tapas/g00s) Jun 23 08:52:18 GeeksOnHugs: use vertical linear layout linearlayout Jun 23 08:52:21 put in three views Jun 23 08:52:27 first and empty one with layout weight 1 Jun 23 08:52:35 then your textview with layout weight 0 Jun 23 08:52:48 and give the text view layout_gravity="centerHorizontal" Jun 23 08:53:05 then third add another empty view to the linear layout with layout_weight 0 Jun 23 08:53:22 ok, what type is the empty views? Jun 23 08:53:42 Jun 23 08:53:46 just an empty view.. Jun 23 08:54:01 OK I see...what about the other edit boxes and the other text box Jun 23 08:54:04 tapas: i have design the dialpad using tabllyout and i have set background image for all buttons.but the problem is that that layout see good in 2.3 but in 4.0 it will give some space below that Jun 23 08:54:06 they just fit in between I guess Jun 23 08:54:19 OH oh Jun 23 08:54:21 I SEE Jun 23 08:54:29 the three views are my "row" Jun 23 08:54:33 yes? Jun 23 08:54:46 one moment.. i'll hack up an example for you.. Jun 23 08:54:53 kk ty :) Jun 23 08:57:36 http://pastesite.com/38554 Jun 23 08:57:41 checking... Jun 23 08:57:49 this centers the textview horizontally and vertically on the screen Jun 23 08:58:06 and instead of a single textview you can use again another layout there which groups your textboxes Jun 23 08:58:12 or just use several textviews Jun 23 08:58:44 right on thx bro :) Jun 23 08:58:49 I appreciat eit Jun 23 08:58:52 appreciate it Jun 23 08:58:58 the layout_gravity on the textview is unnessecary because the textview fills the parent and its gravity is set to center_horizontal already Jun 23 08:59:09 so you can leave that out or adapot to your needs Jun 23 08:59:22 i c Jun 23 08:59:44 jagruti_: can you show us your layout file? Jun 23 09:00:03 GeeksOnHugs: oo Jun 23 09:00:06 much easier: Jun 23 09:00:10 use a RelativeLayout Jun 23 09:00:17 for me? Jun 23 09:00:22 and use android:layout_centerInParent="true" Jun 23 09:00:30 yep Jun 23 09:00:35 ok...listening... Jun 23 09:00:38 taps:sure i am showing the code Jun 23 09:00:49 oh Jun 23 09:00:56 relative layout, no empty views Jun 23 09:01:00 is that what you mean? Jun 23 09:01:04 exactly Jun 23 09:01:35 there's many roads to rome and what's the best way depends on your specific needs.. Jun 23 09:01:35 and how would you do the edit boxes so they don't span the whole row, but are a pleasing width Jun 23 09:01:39 here's an example: Jun 23 09:01:42 [one moment] Jun 23 09:01:55 kk, np take your time of course :) Jun 23 09:03:27 I'm adding a custom external/ .. rather then building each *.c in LOCAL_SRC_FILES seperately, I'd like to do something like: cc 1.c 2.c 3.c 4.c 5.c -o outputbinary Jun 23 09:03:35 http://pastesite.com/38555 Jun 23 09:03:44 ty checking... Jun 23 09:03:52 the two textviews could represent your different edittexts for your login thingies Jun 23 09:04:27 tapas:http://pastesite.com/38556 this is my code of dialpad Jun 23 09:04:28 bhundven: are you talking about gnu makefiles? Jun 23 09:04:36 Android.mk Jun 23 09:04:38 yes Jun 23 09:04:51 tapas well the edit texts start empty so there is no width to wrap? Jun 23 09:04:51 ah ok.. you can build lists of files with shell commands.. Jun 23 09:05:09 that's why I was thinking doing something hard coded that would fit on any screen Jun 23 09:05:16 tapas: when I do that it still builds each .c file seperately and then links to LOCAL_MODULE in the end Jun 23 09:05:37 bhundven: oh ok... no idea though.. never worked with the android build system.. Jun 23 09:05:47 i only wrote my own makefiles for other projects ;D Jun 23 09:06:01 GeeksOnHugs: when the text changes in a textview the screen will be relayouted Jun 23 09:06:18 yea, i've added externals before, but this particular build is stupid. I might just restructure the code. Jun 23 09:06:28 i c...OK, ty bro :) I'll get rolling with this Jun 23 09:06:37 GeeksOnHugs: one more thing.. Jun 23 09:06:46 jagruti_: one moment :D Jun 23 09:07:06 GeeksOnHugs: you can just set the widths of the edit texts to some specific dp value Jun 23 09:07:07 tapas yes? Jun 23 09:07:22 yah that's what I was thinking in this case Jun 23 09:07:31 tapas: ok take your time bcz really i need your help Jun 23 09:07:34 cause there is a reasonable size that would fit on every screen Jun 23 09:07:36 or if you want to have it take up a portion of the screen you could again work with a horizontal linear layout and appropriate layout weights Jun 23 09:07:55 the space is then distributed among the views according to the weights given Jun 23 09:08:02 there's articles out there explaining the principle Jun 23 09:08:20 jagruti_: just call make -j 8 Jun 23 09:08:27 oops Jun 23 09:08:31 right on, thank you so much...it's a big help Jun 23 09:08:31 bhundven: that was for you :D Jun 23 09:08:37 then they get built in parallel :D Jun 23 09:08:52 tapas:sorry i cant understand Jun 23 09:09:50 jagruti_: that comment ws for bhundven :D Jun 23 09:09:59 tapas:oh i c Jun 23 09:10:13 jagruti_: ok, back to your layout.. let's see what was the problem with it again? [reading up] Jun 23 09:10:36 jagruti_: ok, "there's some space below that" Jun 23 09:10:40 what do you mean by that? Jun 23 09:10:47 that the layout doesn't stretch over the whole display? Jun 23 09:11:14 tapas:that means that layout is not feet in screen Jun 23 09:11:25 "feet"? Jun 23 09:11:33 sorry, i don't understand your sentences :D Jun 23 09:11:44 you mean "fit"? Jun 23 09:11:47 ya Jun 23 09:11:56 sorry my lang are too bad Jun 23 09:11:57 so the columns need to be resized? Jun 23 09:12:12 look at the shrinkColumns and stretchColumns attributes Jun 23 09:12:32 exactly i want the vetrically it should be fit with screen in all Jun 23 09:12:51 oh, so it's too tall [the height is too big]? Jun 23 09:13:05 hmm, let me ask again a little more clearly. maybe someone else will pick this up. Jun 23 09:13:11 I'm adding a custom external/ .. Normally you add a list of your c files to LOCAL_SRC_FILES, each file is compiled to a .o and linked to LOCAL_MODULE in the end. I have a specific binary that I need to build the .c files at once. For instance: arm-gcc 1.c 2.c 3.c 4.c 5.c -o outputbinary Jun 23 09:13:25 tapas: so what can i do Jun 23 09:13:39 i have set the image size as 111*69 Jun 23 09:13:46 bhundven: or do this: only put one source in the list of files and have the one c file include al the others ;D Jun 23 09:13:57 eck Jun 23 09:14:03 \:D/ Jun 23 09:14:07 lol Jun 23 09:14:40 jagruti_: your buttons have height "wrap_content" Jun 23 09:14:50 so to make them less tall, you need to have their content to be less tall Jun 23 09:15:59 that means i reduce the size of img? Jun 23 09:16:18 you could use an imageview instead of a button Jun 23 09:16:27 set its scaling mode to centerInside Jun 23 09:16:40 and use adjustLayoutBounds=true Jun 23 09:17:12 but if we have use the button with wrap_content then its the same na Jun 23 09:18:02 jagruti_: including .c files is bad style, but it has its place in some circumstances Jun 23 09:18:54 tapas: guessing you meant me ;) Jun 23 09:19:00 oops, yep :D Jun 23 09:19:25 I would like to not have to modify the source as to keep it easy to merge with upstream Jun 23 09:19:27 does anyone know the hex code for the ICS blue color? Jun 23 09:19:55 oh tapas, that works beautifully thx again Jun 23 09:20:10 tapas: it is final solution for me to change the button to imageview Jun 23 09:20:12 bhundven: may i ask why it's nessecary to have the sources compiled in one compiler call? Jun 23 09:20:45 found it: 34B4E3 Jun 23 09:20:50 bhundven: then add one .c file to include all the others unmodified Jun 23 09:21:07 bhundven: or maybe let's check for your reason first :D Jun 23 09:21:40 thats how their build script does it, and there are spots where some #defines are in one c file and not defined in another. if you build them as seperate objects then link in the end, you get undefined errors. If you build them at the same time, the define will still be in the parse tree Jun 23 09:21:57 tapas: i think i have to wait right Jun 23 09:22:10 :P Jun 23 09:22:11 jagruti_: was your previous comment a question? Jun 23 09:22:29 question marks help with transporting that intent across ;D Jun 23 09:23:00 taps: i have i asked like that is it final solution for me to change the button to image view? Jun 23 09:23:29 jagruti_: it depends.. can you make a screenshot of your app? that'll give us better ideas to help you maybe.. Jun 23 09:23:56 tapas: ya sure but i dont where i attach that screen shot? Jun 23 09:24:02 imgur.com Jun 23 09:24:10 ok thx Jun 23 09:24:19 i will show you wait ok Jun 23 09:25:30 bhundven: oh, that sounds like a rather bad source tree. is adding a single .c file which includes all the others no option either? Jun 23 09:25:53 not sure. I'll try that. Jun 23 09:26:06 bhundven: another thing would be to look up the #defines in the .c files and pass them along as CFLAGS Jun 23 09:26:19 oh man, that would be painful Jun 23 09:26:23 lol Jun 23 09:26:32 ok, just a thought :D Jun 23 09:27:05 yea, I'm gonna try a few things. thanks for the ideas Jun 23 09:27:07 tapas: just check it and see the diffrence in layout http://imgur.com/rdrBH Jun 23 09:29:16 tapas: r u there na? Jun 23 09:29:34 patience, young jedi Jun 23 09:30:06 okay Jun 23 09:30:15 so you want the table layout to stretch vertically to fill the space? Jun 23 09:30:17 hmm.. Jun 23 09:30:22 ya Jun 23 09:31:22 jagruti_: what happens if you set all your button's layout_heights to "fill_parent"? Jun 23 09:31:52 o i will try now Jun 23 09:34:16 tapas:there is no change in layout it same as i have show u Jun 23 09:37:54 jagruti_: hmm.. i'm not sure http://stackoverflow.com/questions/5698414/stretch-row-table-layout-android Jun 23 09:37:57 this might help.. Jun 23 09:38:04 using layout_weights on the rows.. Jun 23 09:38:24 set the layout weights of the rows that you want to stretch vertically to 1 Jun 23 09:43:32 I know you can suppress warnings in java but is there a way to suppress warnings in XML layout files? tapas the layout you set up for me works, but it gives a warning saying either linear layout or relative layout is unecessary...but it doesn't work for just one or the other, needs both...I want to supress the warning Jun 23 09:43:47 GeeksOnHugs: show us your layout? :D Jun 23 09:43:55 yep 1 sec Jun 23 09:44:34 oh well, sometimes the warnings are wrong.. Jun 23 09:44:40 that's why they are only warnings :D Jun 23 09:44:48 is this easily implementable? http://dl.dropbox.com/u/19390574/preview.pdf Jun 23 09:44:52 Is it possible to build a Drawable from an XML on the SD card by using Drawable.createFromXml ? Or does it only work for project resource files? Jun 23 09:45:09 the UI, I mean Jun 23 09:46:18 tapas http://pastebin.com/Z5DTgPc0 Jun 23 09:46:32 I can't abide warnings lol Jun 23 09:46:53 I love the feature in java to suppress them when you approve of something, hope there is a way in XML Jun 23 09:47:15 GeeksOnHugs: one guess: Jun 23 09:47:21 yuo could get rid of the linear layout Jun 23 09:47:29 set all vies to centerInParent="true" Jun 23 09:47:44 The relativelayout is useless Jun 23 09:47:46 and use their ids to and layoutAbove to position them relatively Jun 23 09:48:10 lol which way? Jun 23 09:48:22 SimonVT can you please look at the above link that I posted? want to know if it's possible to implement something like that (with the charts and whatnot) Jun 23 09:48:57 also I think that's a harsh warning, to call my code useless. programmers are people too Jun 23 09:49:25 Sicp: not too terribly hard from the UI perspective Jun 23 09:49:29 just a bit of work :D Jun 23 09:49:52 Shouldn't be too hard Jun 23 09:49:54 hmm Jun 23 09:49:57 if it's useless how come when I remove one or the other it doesn't work Jun 23 09:50:01 Sicp: take a look at Canvas and Paint, etc.. dunno if there's custom views for these special cases.. Jun 23 09:50:07 so obviously it's useful, if not optimal Jun 23 09:50:08 Providing you know what you're doing Jun 23 09:50:18 GeeksOnHugs: well lint tells you there might be another way to do it "better" Jun 23 09:50:21 i.e. without warning.. Jun 23 09:50:36 well so my first choice would be can I suppress that warning in XML? Jun 23 09:50:55 GeeksOnHugs: SimonVT is very knowledgable.. so maybe pose your original question again Jun 23 09:51:01 before i go experimenting, cause it is exactly how I want it to look now Jun 23 09:51:02 he might come up with better solutions than me :D Jun 23 09:51:21 You really should listen to the warning Jun 23 09:51:29 or well, not really a warning Jun 23 09:51:38 to begin with though, does it look good, what I showed? Jun 23 09:51:39 SimonVT, do you know what additional thing I should do in addition to getting rid of relative layout to make it work? Jun 23 09:52:16 Move the background attribute Jun 23 09:52:16 what I have currently is an atrocious, http://dl.dropbox.com/u/19390574/01.jpg Jun 23 09:52:21 -an Jun 23 09:52:32 Set layout_gravity="center" on the linearlayout Jun 23 09:52:45 kk cool lemme try, will report back Jun 23 09:53:03 If that doesn't do it, set the linearlayout to match_parent, gravity to center Jun 23 09:53:29 kk Jun 23 09:53:48 All your android:layout_gravity="center_horizontal" can be replaced with a single gravity="center_horizontal" on the linearlayout as well Jun 23 09:54:13 Your layout_weight's are all 0, those can be removed Jun 23 09:56:32 ok, yah it's in upper left hand corner now...there is no layout_gravity in linear layout but there is gravity...I will set the single gravity in linear layout and remove the others and see... Jun 23 09:57:35 Yeah, so you can either set layout_gravity="center" on the linearlayout, or change its width/height to match_parent Jun 23 09:57:48 ALong with gravity="center" Jun 23 09:58:07 yah linear layout didn't have layout_gravity, only gravity? I think Jun 23 09:58:42 do I remove both layout grav and grav from inner views? Jun 23 09:59:07 layout_gravity Jun 23 09:59:23 Gravity affects how it draws its content, you don't want to remove that Jun 23 09:59:57 that bar on the top of what I showed in the beginning (the one that had SysLog, Terminal, etc..) that's called an Action Bar? Jun 23 10:00:35 ok got it :-) thank you that works...I also had to set linear layout to fill parent width and height, not sure if you mentioned but that got it back in center Jun 23 10:00:43 ty SimonVT ty tapas :) Jun 23 10:00:58 :D Jun 23 10:01:15 Sicp: Nope Jun 23 10:01:17 just for general knowledge do you know if you can suppress warnings in xml? Jun 23 10:01:29 Looks like a tabwidget or something Jun 23 10:02:08 neither Tab nor ActionBar are available for API 10 Jun 23 10:02:25 TabWidget is Jun 23 10:02:41 and TabHost Jun 23 10:03:45 GeeksOnHugs: You can Jun 23 10:04:03 SimonVT what's the symbol? I searched the net couldn't find it Jun 23 10:04:13 is it the same compiler directive as in java? Jun 23 10:04:28 It's somewhere in the docs, I can't remember where Jun 23 10:04:50 kk ty...well if I ever need to cross that bridge I'll dig for it, ty :) Jun 23 10:04:58 im having some difficulties with WindowLeaked exceptions when i rotate the device if i have an AlertDialog displaying which was launched by a FragmentDialog. Trying to dismiss the AlertDialog onStop has absolutely no impact on it, any ideas? Jun 23 10:05:17 Basically you define the tools namespace, and add a tools:ignore="lintcheck" tag to the view Jun 23 10:05:28 e.g. tools:ignore="TypographyEllipsis" Jun 23 10:05:40 Mostly you shouldn't need to do that tho Jun 23 10:05:53 robb_www: Use dialogfragment Jun 23 10:06:10 so i have to roll another dialog just for a single-selection list :( Jun 23 10:06:22 boilerplate++ Jun 23 10:06:35 if you don't like boilerplate, don't use java ;D Jun 23 10:06:41 so true Jun 23 10:06:47 or xml ;D Jun 23 10:07:01 The issue is manually managing dialogs Jun 23 10:07:01 the verbosity can drive one insane at times.. Jun 23 10:07:15 Has always been horrible Jun 23 10:07:27 Using the good old showDialog/dismissDialog doesn't really fit with fragments Jun 23 10:07:31 So, dialogfragment Jun 23 10:08:14 *nod* i have no doubt that will solve my issue Jun 23 10:25:55 unsure how "replace with latest from repository" can leave me with a handful of files which havent been updated Jun 23 10:26:18 subclipse must be trying to upset me Jun 23 10:28:02 SimonVT: have you made any custom viewGroups before ? Jun 23 10:28:14 Yep Jun 23 10:28:19 :) Jun 23 10:28:48 if you have seen it, how hard do you think it would be to make the movable tiles like wp8 ? Jun 23 10:29:04 a viewgroup for all the tiles, and individual small / medium / large tiles Jun 23 10:29:10 which can be moved and resized Jun 23 10:29:47 tapas gave me a code example a while back; i think i'm in over my head Jun 23 10:31:45 I have no idea how it looks in wp8 Jun 23 10:31:59 in this tutorial, where is it mentioned that the Photos tab will be the first to open? http://www.androidhive.info/2011/08/android-tab-layout-tutorial/ Jun 23 10:32:05 But well, laying out tiles is easy Jun 23 10:32:11 or is it just that the very first tab opens the first? Jun 23 10:32:41 Dragging a tile shouldn't be too hard, depending on how fancy it's going to look Jun 23 10:33:04 I mean, that's probably just doing some stuff in onTouch to offset a single tile Jun 23 10:33:26 Then calculating its new position in the UP motionevent Jun 23 10:33:46 hmm Jun 23 10:34:01 Does that make sense? Jun 23 10:34:18 yeah - i have done custom views before, not viewgroups Jun 23 10:34:45 retos's book does a good job of custom views Jun 23 10:34:49 Adding some fancy animations to the process is probably a bit more work Jun 23 10:35:08 yeah, i would like it fluid, like all the tiles move around Jun 23 10:35:20 or reflow around the moving tile Jun 23 10:35:43 i'm not really sure if i can do that with the froyo level animation stuff Jun 23 10:36:35 HC+ animation framework has been backported Jun 23 10:37:07 yeah, some parts of it Jun 23 10:37:36 i'm not sure if the reflow animation is something i would do manually or use android for Jun 23 10:38:13 All of it should have been backported Jun 23 10:38:42 really? i thought nine old androids didn't have the full api Jun 23 10:38:55 or was missing some property thing Jun 23 10:39:22 You'd have to ask JakeWharton, but I'm pretty sure it's all of it Jun 23 10:39:38 i think animations were so terrible in froyo, i avoided animations altogether and now i am clueless Jun 23 10:39:45 is there no such function as "getTabHost()"? Jun 23 10:40:08 this tutorial uses it just fine, and I imported everything needed..http://www.androidhive.info/2011/08/android-tab-layout-tutorial/ Jun 23 10:40:11 SimonVT: what did your ViewGroup do ? Jun 23 10:41:06 tapas: pfft, I didn't need to do what I was thinking Jun 23 10:41:14 thanks again Jun 23 10:42:20 One was just a tab indicator like in the market app Jun 23 10:42:41 That used the getView adapter pattern Jun 23 10:42:55 And another for making some fancy transitions in a single-activity tablet ui Jun 23 10:43:23 ok Jun 23 10:44:15 A bit less complex than what you're doing Jun 23 10:46:40 pretty much like this at 0:40 http://www.cnet.com/8301-17918_1-57458213-85/the-flashy-yet-familiar-windows-phone-8-start-screen-hands-on/ Jun 23 10:46:57 err, 0:30 Jun 23 10:47:47 he mentions samsung touchwiz does some of this, but i have never seen it Jun 23 10:48:21 anyhow, i'm not looking at doing a start screen or launcher, just a general tile -based layout engine thing for my app Jun 23 10:49:18 Heh, that's probably a bit more complex :p Jun 23 10:49:31 hiya i've got a bit of a java noob question, but if i have a function that returns a float[] that is a member of an object, does that return a reference (ie. am i really modifying the member data?) Jun 23 10:50:03 Younos: yeah, do an arraycopy if you want a new one Jun 23 10:50:23 Younos: You'll be returning a reference. So if you modify the returned array you'll be modifying the same array that the member reference is pointing to Jun 23 10:50:23 ah, thanks :) i'll google that Jun 23 10:51:00 i think it is this http://docs.oracle.com/javase/6/docs/api/java/util/Arrays.html#copyOf(float[], int) Jun 23 10:57:19 ah this looks a whole lot better:) Jun 23 10:58:38 hm, so are none of the talks on day 3 being recorded ? https://developers.google.com/events/io/sessions#android Jun 23 10:58:54 there is a little camera icon on the others Jun 23 11:00:09 QUESTION : How the heck you guys set a grid view to properly display thumbnail images on different devices, just as like Instagram does? I set/unset/experimented with a number of attributes, but it still looks pretty weird. :) Jun 23 11:01:05 Btw, the new CSS on developer site looks really cool ;) Jun 23 11:02:25 g00s: doesnt look like it, even tho day 3 has some nice topics Jun 23 11:04:05 the font used in the new android website renders like hell in my browser Jun 23 11:04:12 its too light, bold, and fuzzy Jun 23 11:04:19 which browser? Jun 23 11:04:24 chrome for mac Jun 23 11:04:56 they actually used Roboto for the website Jun 23 11:05:01 * g00s shakes head Jun 23 11:05:10 g00s: nothing new, Chrome always sucked at webfonts ;) Jun 23 11:05:35 napster: http://developer.android.com/training/basics/supporting-devices/screens.html Jun 23 11:05:38 p_l: how do you know if its pulling in a webfont ? Jun 23 11:06:08 <[deXter]> g00s, renders fine on my Chromium / Linux machine Jun 23 11:06:08 fonts.googleapis.com Jun 23 11:06:13 loads Roboto Jun 23 11:06:18 the fallback is sans-serif; i can't tell which it is trying to use. and the color being #444 is too bucking light Jun 23 11:06:24 of course, my laptop *has* Roboto installed Jun 23 11:06:28 in header Jun 23 11:06:46 g00s: I'm on chrome for mac as well. It looks pretty nice here :) Jun 23 11:07:05 hmm Jun 23 11:07:43 bhundven: Guess its not what I'm looking for. Jun 23 11:09:12 hello,anyone have encoutered with problem that there is no Jun 23 11:09:13 voice in call while playing mp3 ok when porting kernel? Jun 23 11:10:40 Is there any way to set the padding of a GradientDrawable? Jun 23 11:11:05 I'm having this eclipse error (that's happened before from time to time)...my project is fine and builds fine, but when I try to "run" it from eclipse in an AVD it refers not to main.xml but a phantom main.out.xml file and complains that it's empty? Jun 23 11:11:30 usually if I clean/restart/shake my computer enough it goes away but it's not going away now Jun 23 11:12:59 i'm seeing some references to it as an eclipspe bug but not finding a workaround yet :( Jun 23 11:13:12 ok, I did that tab layout and it worked well :D Jun 23 11:13:17 much better UX Jun 23 11:13:51 usually Clean solves nonsensical bugs.. Jun 23 11:14:41 yah normally it does, but it's not now, I even restarted Jun 23 11:17:40 yep some esoteric setting fixed it and it should never happen again according to the post on stack overflow...I have no idea what it does...it was... Jun 23 11:17:52 Better fixing: Eclipse -> Window -> Preferences -> Run/Debug -> Launching -> Lauch Configuration Jun 23 11:17:53 Cross : Filter checked launch configuration types and Cross also : XSL (at the end of the list) Jun 23 11:17:54 Make the problem go away Forever ! Jun 23 11:18:40 so I dunno what that does exactly but it fixed it Jun 23 11:21:44 Has anyone got experience in developing android apps that source their data from remote sources like the web? Jun 23 11:48:12 Bacta: there is a google I/O talk that deals with combining android with GAE : http://www.youtube.com/watch?v=M7SxNNC429U Jun 23 11:48:53 it's not exactly what you want, you might find some ideas there Jun 23 11:49:07 Ah yeah Jun 23 11:49:14 Well I already have an external data source Jun 23 11:49:28 It's a web page that serves Electronic Programme Guides Jun 23 11:49:38 oh, ok Jun 23 11:49:40 No idea if it's reliable not though which raises some interesting issues Jun 23 11:55:35 well, backend reliability is a whole different kind of fish Jun 23 11:58:09 hi all, I'm making an app, targeted for api 14. I'm using the action bar, and I have some options in the option menu but they just do not appear in the action bar, even with android:showAsAction="ifRoom" being set (there is plenty of room). Jun 23 11:58:46 I am stumped... I am only testing on the emulator, haven't tested on a real device, but the icons just do not appear in the action bar, but pushing the options menu shows the options are available in the list Jun 23 11:59:12 it's as if showAsAction is just being ignored... I have it set in my element.. any ideas? Jun 23 11:59:20 oops, I mean element Jun 23 12:04:29 Hello how can I match first found regex match with matcher? I mean it defaults to longest match, but how the first? Jun 23 12:06:28 put a ? after the character match Jun 23 12:06:41 also.. search for non-greedy regexp Jun 23 12:09:36 misc-- Thanks :) Jun 23 12:10:08 =) Jun 23 12:33:37 hi guys Jun 23 12:34:01 somebody on here? Jun 23 12:34:06 nope Jun 23 12:34:07 i got some issues Jun 23 12:34:13 with listpreferences Jun 23 12:34:18 that's what she said Jun 23 12:34:38 and updating the summary on click one of the preferences in the list Jun 23 12:35:35 if i chosse the onclicklistener - the "update" of the summary is wenn i click on the down arrow of the listpreference Jun 23 12:36:17 if i chosse the onchangelistener - the "update" of the summary is when i choose another item of the listprefernce Jun 23 12:36:26 but it is every time 1 behind Jun 23 12:55:40 in code the string resource is an int which has to be dereferenced by Context.getString(R.string.mystring)...in my own public class file, what context do I use? Jun 23 12:56:31 in an activity I think you can just reference this as the context? but I am in a class descended from Object so there is no context Jun 23 12:58:06 GeeksOnHugs: can you pass your public class when or after you instantiate it? Jun 23 12:58:24 GeeksOnHugs: sry, I meant, can you pass it a String? Jun 23 12:59:04 yah, I could do that, but that would seem an odd way to do it, to include all the strings it might use in the constructor? Jun 23 12:59:26 when R.string already manages it Jun 23 12:59:27 GeeksOnHugs: unless you have a ton of strings, that's a pretty normal thing to do Jun 23 12:59:38 OK, I didn't know, that's what I needed to know Jun 23 12:59:58 so say, if there were 5 or even 10 strings needed, pass them in and load them into local variables is normal? Jun 23 13:00:05 what if you had like 100 or something Jun 23 13:01:05 GeeksOnHugs: then I'd consider passing an instance of the context instead, the only problem with that is, but then you have to watch out for lifecycle issues and make sure you aren't causing memory leaks by keeping your pub object around after that Activity goes away, etc.. Jun 23 13:02:05 ok right on Jun 23 13:02:46 but it's cool too to pass a context around so long as your careful about considering objecct life cycle and memory? Jun 23 13:07:16 i just want to know the right way. In my current circumstance it's only one string as of right now so I'll just do that. I wonder about a third way of instead of my object throwing the exception, return a result to the activity which then raises the exception? Jun 23 13:07:23 GeeksOnHugs: sure, never store the Context anywhere Jun 23 13:07:30 GeeksOnHugs: yeah, passing a context around is very normal, holding a permanent reference to it is were people get in trouble Jun 23 13:08:04 GeeksOnHugs: you could, for example, pass it into your constructore, init all your strings, and just never store it, and you'd have no problems Jun 23 13:08:23 although I imagine some lazy people could just use Application as the Context which should stay fixed over the lifetime of the process, and should get initialized before anything else. But that's hacky. Jun 23 13:08:35 *coughs* Jun 23 13:08:42 alankila: hehe Jun 23 13:10:31 OK, cool, good call Jun 23 13:11:10 yah, garbage collection is new to me so I'm figuring all that out...it seems nice but sometimes explicit manual garbage collection seems easier to understand Jun 23 13:12:11 there is no such thing as explicit manual garbage collection in any language I'm aware of. Jun 23 13:12:43 meaning where I free my memory myself when I'm done with an object Jun 23 13:13:00 alright. Jun 23 13:13:35 like in my old language I would create my object but it would exist forever unless I freed the memory...if I lost the handle to it, it would cause a memory leak Jun 23 13:13:36 normally the gc is better as you can just forget about the existence of the object and it gets handled automatically Jun 23 13:13:43 yah I agree Jun 23 13:13:46 just getting used to it :) Jun 23 13:13:56 but if the object holds a reference to some external resource, via native code or whatever, then ensuring that it gets freed appropriately may be important Jun 23 13:14:18 it *will* get handled when the runtime does the gc cycle, but that could be too late Jun 23 13:14:34 I think I really like jhudgins suggestion - pass in the context, grab the primitive data I need but dont store it in the class...that seems clean and straightforward to me Jun 23 13:14:43 for instance java programs may run out of file descriptors if the close() is not called when appropriate Jun 23 13:15:31 java 7 introduced disposable objects for this, but unfortunately android has not yet been updated to support this notion. Jun 23 13:15:34 wait I don't understand, in what instance to I have to make sure something gets freed appropriately? Not sure I understand Jun 23 13:15:46 when the object represents a native resource that is scarce. Jun 23 13:16:04 and it's not *freeing* the object, it is *disposing* the object. Jun 23 13:16:09 GeeksOnHugs: like closing a network connection or a file that you've been reading/writing Jun 23 13:16:20 GeeksOnHugs: You need to make the object "dead", that is without non-circular references Jun 23 13:16:27 freeing always belongs to the garbage collection and we do not control when that happens. Jun 23 13:16:30 shouldn't the object take care of it's own cleanup? Jun 23 13:16:45 but disposing is something we can control, and we *have* to control it sometimes to ensure code is bug-free Jun 23 13:16:55 GeeksOnHugs: yes it does that. Jun 23 13:16:58 closing connections and files should happen in the destructor Jun 23 13:17:02 The entire problem is that we don't know when the GC happens. Jun 23 13:17:07 GeeksOnHugs: NO Jun 23 13:17:10 that is the wrong model for GC. Jun 23 13:17:15 oh I see...your saying make sure to do it, like on ondestroy? Jun 23 13:17:15 GeeksOnHugs: you can have *finalizers*, which are called by GC Jun 23 13:17:55 I see, so I should do all of my objects clean up in a "finalizer"? basically an ondestroy event? Jun 23 13:17:56 a finalizer should always free any leftover native resources, but there needs to be another method that user can call to ensure that the native resources are disposed of in some predictable point of time Jun 23 13:18:00 closing files and what not is really a seperate topic from GC. Jun 23 13:18:23 GeeksOnHugs: you have *really* bad or lacking knowledge about GC and GCed languages Jun 23 13:18:36 duh, that's why I'm asking about it Jun 23 13:19:10 GeeksOnHugs: yeah, but I think #java might be a bit better place :) Jun 23 13:19:17 and good book on GC Jun 23 13:19:41 i'm picking up what I need as I go...I've read several sources, but I'm a practical learner Jun 23 13:19:42 anyway java 7 introduced 'try (Foo x = ...) { ... }' like pattern Jun 23 13:19:54 Java sucks Jun 23 13:19:57 the idea is that x will be disposed on the exit of the block no matter what Jun 23 13:19:58 End of story Jun 23 13:20:06 diki but it has some nice tools =) Jun 23 13:20:30 alankila: looks to me more like x goes out of scope Jun 23 13:20:31 I dunno, I was scared at first...I been doing delphi for 17 years...first few weeks were uncomfortable but now it's no problem Jun 23 13:20:37 Which probably have C counterpatys Jun 23 13:20:52 p_l: one may think of it in that way, but that is not the correct model. Disposing happens when the block ends. Jun 23 13:21:06 you can try to keep x elsewhere but it will still be disposed object. Jun 23 13:21:10 alankila: does it make illegal returning references from it? Jun 23 13:21:14 p_l: no Jun 23 13:21:33 or are we talking about Disposable interface getting apropriate method called? Jun 23 13:21:33 my biggest issue with java is it's so freeform feeling compared to Object Pascal (Delphi) where everything has it's place and order...but java will allow a class here, a method there a field over there...Im not allways sure how to group and order elements Jun 23 13:21:34 but there's high likelihood the reference doesn't work anymore because if it were a fileinputstream, say, it will be closed Jun 23 13:21:44 p_l: yes, the Disposable interface. Jun 23 13:22:39 sooo... basically simplified finally block Jun 23 13:22:44 p_l: yes. Jun 23 13:22:47 meh Jun 23 13:22:51 it's not meth Jun 23 13:22:59 alankila: meth would be more interesting Jun 23 13:22:59 if you ever dealt with file descriptors they suck Jun 23 13:23:26 and when you have multiple of those buggers, the code to allocate and dispose them without this feature bores you to tears Jun 23 13:23:42 alankila: I'm used to similar blocks in form of (with-open-file ... ) Jun 23 13:23:42 because in the finally block you need another try-catch shit for just the close Jun 23 13:24:02 alankila: lol..yeah, but that happens even with just on InputStream Jun 23 13:24:09 alankila: "one" Jun 23 13:24:10 in object pascal you had an explicit area to declare shit, and then implement shit...discrete sections for private, protected, public (and published)...variables before methods in each...so there was no question on where something would go Jun 23 13:24:45 GeeksOnHugs: Java is pretty strict layout too Jun 23 13:24:51 jhudgins: true, but if you have multiple the correct disposing sequence starts to get really annoing :-p separate finally try-catch blocks for each. Man it is so awkward Jun 23 13:25:06 I dunno p_I the compiler doesn't seem to complain too much about where I put things Jun 23 13:25:11 try...catch...finally is annoying too Jun 23 13:25:13 like my last girlfriend Jun 23 13:25:19 haha Jun 23 13:25:22 GeeksOnHugs: thank heavens java doesn't require strict ordering like that Jun 23 13:25:35 group logical things together. Try to minimize variable scopes -- do not declare them at start of method, declare them on use Jun 23 13:25:36 alankila: agreed, it's one of the ugliest things in java Jun 23 13:25:46 No I agree...I'm getting a feel for it Jun 23 13:25:47 GeeksOnHugs: Pascal was never supposed to be used in production. It was strict to browbeat students into Dijkstra's school of computing Jun 23 13:26:28 with various hidden magic numbers derived from CDC6600 Jun 23 13:26:53 (like symbol case and length) Jun 23 13:27:34 I have nothing bad to say about it, its an amazingly productive language and combined with RAD delphi...totally a programmer multiplyer...it was very fast to get started with...easy as VB, nearly as powerful as C++, fast compile, fast executibles Jun 23 13:28:56 as a programmer loner and relatively open-source fanatic, I disapprove of the above message. Jun 23 13:29:06 Delphi/VB/etc style RAD lead to pretty bad stuff, though. And you don't know programmer multiplyer till you get to truly high level languages :)_ Jun 23 13:30:30 I agree p_l...but you could develop good OO technique with them (well not with VB) you'd eventually have to not use the visual tools so much, but you know they're like training wheels heh...I mean if you can do VB you can start with Delphi, but then when your ready you have all the power you could want Jun 23 13:32:07 Free Pascal is an open source implementation of object pascal...and they have java compilers too, but I determined to do things the android way when I came to android...I'm also switching my workstation choice from windows to linux so I might use free pascal for native linux programming Jun 23 13:32:17 anyhoo...back to the grind...thx for all the insights Jun 23 13:34:23 I doubt anybody is writing programs for linux in pascal Jun 23 13:35:37 no, there are Jun 23 13:35:43 lemme link ya Jun 23 13:36:13 No need Jun 23 13:36:19 too late http://www.freepascal.org/ Jun 23 13:36:25 Pascal seems rather forgotten Jun 23 13:36:37 NEVER Jun 23 13:36:40 C and c++ arr widely used Jun 23 13:36:45 <3 pascal Jun 23 13:36:50 well for sure Jun 23 13:37:19 you misunderstood what I meant Jun 23 13:37:30 back to the passing contexts around...there is another class...assetmanager, I think maybe that's whats meant to be passed around for picking out assets...i'm looking into it Jun 23 13:37:30 In fact python is much more used than java Jun 23 13:37:42 I doubt anybody writes end-user applications in pascal for linux. Taking a quick look at the packages section on that site indicates that no modern toolkit is supported Jun 23 13:37:54 so that's a strong hint that pascal is simply not used for anything Jun 23 13:38:33 oh...well I guess i'm not sure on that then, surely someone is...I'll definately concede that it's prolly not much Jun 23 13:38:37 no gtk+, no qt, but there is forms. That's something I last saw like 10 years ago I think Jun 23 13:38:53 diki: I wouldn't say such things Jun 23 13:38:54 all that's missing is motif support Jun 23 13:39:08 diki: especially not given how much internal corporate development is in Java Jun 23 13:39:26 and all coders tend to learn Java at some point, not all do for Python Jun 23 13:40:22 yah I'm happy to be picking up a popular language...getting help in delphi could be such a chore at times...but make no mistake there is a diehard group of developers out there that you'll have to rip pascal out of their cold dead hands...not many, but they are kind of insane Jun 23 13:44:29 that is true for anything. I still hope for the One Universal Language. It seems to me that java could be almost that, except for the fact it can't be used where C can be, and there's .Net as competitor runtime and its own languages for it Jun 23 13:46:25 still, C and Java do not look like the most horrible pair and they can cover a large chunk of the spectrum from low-level programming to fairly high-level programming. The highest levels can still execute on the jvm, and there are numerous choices for such scripting. Jun 23 13:47:24 so I certainly would appreciate it personally if we looked jvm as the runtime to use for running most of the system on. Jun 23 13:48:06 technically jvm can even do its own memory management, so things like virtual memory aren't required with it Jun 23 13:48:30 but that's probably getting too radical for most people Jun 23 13:49:13 still, if we could agree to do virtual memory in software, we could remove that stuff from hardware and probably get a nice performance boost as side effect. Jun 23 13:51:40 it's just the total system that matters. It has to be able to provide the features. If we simply decide that nobody sane runs anything but the virtual machine software on bare metal, then all the bare metal has to do is enough to get the virtual machine running. Jun 23 14:05:19 hey guys, I know how I can implement tab navigation using the action bar, but looking at the youtube app on honeycomb, they seem to have some sort of tabbing toward the bottom (see screenshot here http://derp.co.uk/58bb1), independant of the AB. How would one implement this? Jun 23 14:11:35 hello Jun 23 14:26:36 Anyone some experience in creating a custom keyboard in android? Jun 23 14:30:47 nurd_: look at http://code.google.com/p/hackerskeyboard/ maybe Jun 23 14:32:08 I can give my keys custom backgrounds with android:keyBackground in a KeyboardView, this makes all the keys the same background. Jun 23 14:32:19 Now I want to change the background of one single key, but I can't get this Jun 23 14:33:50 Hackerskeyboard has a selector with folowing lines Jun 23 14:33:56 android:drawable="@drawable/btn_keyboard_key_light_pressed" /> Jun 23 14:33:56 Jun 23 14:34:17 I tried to add a custom state "locked" in attrs.xml but hadn't any luck with that Jun 23 14:35:32 someone familiar to OpenVG and SVG images ? Jun 23 14:39:03 someone alive? Jun 23 14:39:32 Never used them Jun 23 14:39:41 linuxdroid: never ask to ask? just ask ... Jun 23 14:40:31 eitherway not sure #android-dev is the right place. Jun 23 14:40:38 Hello when I run the ch_04_fragments android project from the professional android applications book I can only see the list fragment and not the details fragment Jun 23 14:40:45 anyone know how to use the style dialogs apply to the layout holding the buttons? it is very much /not/ @android:style/ButtonBar Jun 23 14:41:27 i m trying to make an app something like " connect the dots" Jun 23 14:41:53 but also trying to introduce some interactivity in the dots with the user.! Jun 23 14:42:19 so need help regarding OpenVG and SVG images Jun 23 14:42:43 i have no idea about how to proceed regarding svg and OpenVG.!! Jun 23 14:50:41 Hello everybody Jun 23 14:51:18 I'd like to ask a question, I'm trying to use the latest NDK to compile a few projects, but I seem to be missing this: android-ndk/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-gcc Jun 23 14:51:38 the "prebuilt" folder doesn't seem to exist Jun 23 14:51:57 and a quick locate query shows no traces of the arm-eabi-gcc file anywhere Jun 23 14:52:59 johnnyonflame: it's in the NDK sources, not the NDK binaries Jun 23 14:53:51 sam, I don't think I follow you Jun 23 14:54:36 johnnyonflame: http://tools.android.com/overview/ndk-git Jun 23 14:55:24 johnnyonflame: I don't see why you'd need arm-eabi-gcc for your own use though Jun 23 14:55:40 johnnyonflame: don't you want arm-linux-androideabi-gcc instead? Jun 23 14:55:53 the project I'm using is asking for it Jun 23 14:56:08 it uses a pretty customized compilation steps Jun 23 14:56:14 are there any issues with fragments on the built-in emulator? Jun 23 14:56:20 I think that project's wrong Jun 23 14:56:45 johnnyonflame: or maybe outdated Jun 23 14:57:17 sam, you're probably right, thanks for the help. Jun 23 14:57:23 I'll check the git now Jun 23 14:57:24 johnnyonflame: it looks like it relies on the user having built the NDK themselves Jun 23 14:58:18 Should I build it myself then? Jun 23 15:13:02 hi there, anyone can help me out. I've implemented jake's darkactionbar , but on the samsung galaxy s3 the background of the menu remains systemcolor black, whatever I try to change. Jun 23 15:13:24 SO, I downloaded the sources, what do I do with them? Jun 23 15:17:28 2 questions, 1) Has anyone used a program called "Mr. Tracker"? 2) Does anyone know how to or if it is even possible to convert a .exe to a .apk? Jun 23 15:21:17 johnnyonflame: check that you have that arm-eabi-gcc in there Jun 23 15:21:46 sam, locate still tells me that there is no arm-eabi-gcc Jun 23 15:22:14 johnnyonflame: locate only knows what was on your disk the last time updatedb was run Jun 23 15:22:52 makes sense Jun 23 15:23:10 "find directory -name arm-eabi-gcc" Jun 23 15:23:45 NTinNJ: 1) no 2) it would not make sense at any level, they contain different things, were written in different languages, and even the parts that aren't were for different CPUs and systems, so really, no chance at all Jun 23 15:24:17 sam, Still tells nothing Jun 23 15:24:42 johnnyonflame: then really that project you're trying to build needs an update Jun 23 15:25:00 NTinNJ: #2 is *theoretically* possible Jun 23 15:25:01 it has a few reasons to use such binaries Jun 23 15:25:14 but I might be doing something wrong Jun 23 15:25:17 somewhere a bit below "making an Alcubierre drive", though Jun 23 15:25:33 p_l: haha, qemu + winelib? Jun 23 15:25:47 sam: he asked for *conversion* :P Jun 23 15:25:52 turing equivalence et al Jun 23 15:26:11 Thanks for the input guys, I don't understand why it doesn't work unless it is just a scam. Jun 23 15:26:45 even if you manage to turn a .exe onto a .pkg by using some crazy wine magic, it is probably not going to give you any decent performance Jun 23 15:27:04 actually, Alcubierre drive afaik only needed stupidly insane amounts of energy, because it's not computational stuff that has nice things like halting problem ;) Jun 23 15:27:30 so, welcome to "faster than light space travel science" Jun 23 15:27:31 All this program is supposed to do is give me the Longitude and Latitude coordinates of anyone who sends me a text / SMS message. Jun 23 15:27:38 scam Jun 23 15:27:41 like most such offers Jun 23 15:27:54 afk, Opera time Jun 23 15:28:12 p_l: Do you KNOW that it is not possible, or are you thinking it is not possible? Jun 23 15:29:50 NTinNJ: with high confidence level I state my answer Jun 23 15:30:18 ok, fair enough, thanks for the input. Jun 23 15:36:19 sam, Any idea on how can I get that file? Jun 23 15:42:12 johnnyonflame: maybe an old version of the NDK... I do have it here in a July 2011 NDK checkout Jun 23 15:42:48 johnnyonflame: but that binary alone is useless to you, it requires other executables, headers and support files Jun 23 15:43:24 sam, ndk r7 probably? Jun 23 15:43:48 johnnyonflame: no it's a checkout of the source code Jun 23 15:44:04 :/ Jun 23 15:50:58 hi, ive built myself an android app using c++. im trying to figure out now how to start another app that is already installed on the device and pass it args like argc and argv. is this possible? Jun 23 15:51:46 giantpune: apps don't have argc/agv only ndk api's Jun 23 15:51:53 giantpune: read up on ndk Jun 23 15:52:08 im digging through the included docs now Jun 23 15:52:09 giantpune: is that app C++ as well? what have you tried so far? did you try execve() or system()? Jun 23 15:53:13 the app im trying to launch is a java app. basically im wanting to use the c++ i wrote to browse to a movie or photo and have it open in the video player or image viewer Jun 23 15:53:47 giantpune: use the ndk to bring it into dalvik space and work from java there Jun 23 15:53:55 giantpune: that's the android way to do it Jun 23 15:54:08 giantpune: use you c++ as helpers to a java app basically Jun 23 15:54:12 yout* Jun 23 15:54:15 ok. ill take a peak at that Jun 23 15:54:15 your** Jun 23 15:54:16 thanks Jun 23 15:58:50 Hey guys, currently using: spinner.setBackground(button.getBackground()); in order to make the spinner look like the button. It works perfectly.. except when I click the proper button it puts the click animation around the spinner. Any ideas how to fix this? Jun 23 15:58:56 Anybody mind helping me go over the basics off app development? I'm kinda new too it.... Jun 23 15:59:40 Student: basic? Project->New->Android project… then Run->Run Jun 23 15:59:54 or rather… right-click project and run as Android Jun 23 15:59:55 lol Jun 23 16:00:01 I know how to do that Jun 23 16:00:04 it is the so called Hello World app Jun 23 16:00:08 ok Jun 23 16:00:44 I was talking about the actual process of app development; I know how to do it. I know java. I just dont get it Jun 23 16:01:01 what is it you don't get Jun 23 16:01:07 I wanted go over the basics off app development. Jun 23 16:01:13 like the logic Jun 23 16:01:14 so follow tutorials? Jun 23 16:01:36 Student: like the workflow? http://developer.android.com/tools/workflow/index.html Jun 23 16:11:39 Anyone else excited that Google I/O is coming up next week? Jun 23 16:12:46 Do I need a service for executing a queue of big filesystem operations? Jun 23 16:13:01 royale1223: maybe you think service is somehow a thread. it's not. Jun 23 16:13:16 I'm already using asynktask Jun 23 16:13:30 AsyncTask Jun 23 16:13:39 so what's the point of the service, then? Jun 23 16:13:53 (you could use intentservice maybe) Jun 23 16:14:00 Are you familer with android download manager app? Jun 23 16:14:18 No. Jun 23 16:14:41 the default one. that comes with ur phone? Jun 23 16:14:48 well I've seen it, sure. Jun 23 16:15:11 I'm not sure what it does, from user or developer point of view, except I imagine for user point of view it provides a window to what you have downloaded lately from browser or something. Jun 23 16:15:29 maybe it does downloads via URLs on behalf of applications Jun 23 16:15:32 if so, that sounds useful Jun 23 16:15:44 It displays a kind of queue right? and gives notifications. Jun 23 16:16:11 it does something. I'm not really familiar with it. I rarely download files with my phone. Jun 23 16:16:46 alankila: if your background op is supposed to continue when your Activity is paused/stopped then use a service, otherwise a thread is usually fine Jun 23 16:17:01 don't talk to me about it. Jun 23 16:17:10 I mean, I knew that. Jun 23 16:17:14 DownloadManager dlMgr = (DownloadManager)getSystemService(Context.DOWNLOAD_SERVICE); Jun 23 16:17:20 ^ that is the download manager Jun 23 16:17:37 alankila: sorry, i thought you were asking =) Jun 23 16:18:16 OK, I have extracted the files from the Mr. Tracker thingy, which had other compressed files in it, I extracted those, now I have like files that are something.001, something.002, etc. There is an .XML file that seems to call on the previous mentioned files. What do I need to do to make those files into a .apk file to install it into the phone? The phone is an HTC EVO, if that helps. Jun 23 16:18:24 then dlMgr.enqueue(new DownloadManager.Request("http://www.something/somefile.zip")); Jun 23 16:18:45 royale1223: ^ Jun 23 16:22:06 alankila: are you here still? Jun 23 16:22:53 sure. Jun 23 16:23:11 royale1223: do you wanna learn about the download manager? Jun 23 16:23:18 i got disconnected. Jun 23 16:23:53 I'll note that down Jun 23 16:23:54 So i need an interface like it for execting the asynctasks, showing queue and pushing notifications. Jun 23 16:24:17 royale1223: so you don't wanna use the download manager, you wanna imitate it? Jun 23 16:24:30 yes. Jun 23 16:24:31 well, if you want it to look like a bunch of background notifications then maybe IntentService is good fit Jun 23 16:24:59 if you want to show an actual UI then sounds like just some activity that reaches for some background service via bind Jun 23 16:25:02 That's new to me, let me look it up. Jun 23 16:25:40 intentservice is designed to launch threads doing some work described by the intents. Jun 23 16:26:50 alankila: can it update my activity? Jun 23 16:26:51 or maybe a thread Jun 23 16:27:03 royale1223: I imagine it can broadcast some intents or something. Jun 23 16:27:37 alankila: so it all boils back down to intents. Jun 23 16:28:00 it is one way to do message passing Jun 23 16:28:15 Thank you, I think it might be a fit. Jun 23 16:31:45 royale1223: there's really no truly good way to interact with service imho Jun 23 16:31:45 alankila: this is my application: http://forum.xda-developers.com/showpost.php?p=27752794&postcount=130 Jun 23 16:32:03 alankila: why do you say that? Jun 23 16:32:49 alankila: can't we use intefaces? Jun 23 16:32:58 because when activity wants to display state of service, it needs to do somthing to get that information Jun 23 16:33:07 when service does something, it needs another way to talk to activity what its state is Jun 23 16:33:15 so you end up sort of doing the same work twice Jun 23 16:33:29 alankila: i see Jun 23 16:33:48 so activity needs a way to request service for update of its status to immediately show what the state is, Jun 23 16:34:22 and then when state changes service must send some kind of notify message. imho it's pretty annoying to deal with Jun 23 16:35:01 alankila: have you got any good example in doing that? Jun 23 16:35:22 but it's also not quite clear what the optimal design should be. Perhaps activity should register a listener to service, and the service when updating its state (and on receiving that listener) calls the listener with the most up-to-date state information Jun 23 16:35:33 in any case to do that requires doing the bindService() shite Jun 23 16:35:37 no, I don't Jun 23 16:35:50 alternatively service's state could be stored in a sticky broadcast Jun 23 16:35:58 I tried that too but it requires special permission becasue fuck android Jun 23 16:36:18 :D Jun 23 16:36:42 Hey guys, currently using: spinner.setBackground(button.getBackground()); in order to make the spinner look like the button. It works perfectly.. except when I click the proper button it puts the click animation around the spinner. Any ideas how to fix this? Jun 23 16:37:05 anyway most application I see like music players show garbage for about 1 second when you switch to an activity that shows the currently playing track Jun 23 16:37:16 it's because the update is broadcast periodically every second Jun 23 16:37:23 alankila: i might be saying fuck android pertty soon too. Jun 23 16:37:36 the update comes with all the info which fixes the UI to show what it's supposed to show, but it's still 1 second delay there Jun 23 16:38:11 and it's because of the complexities of interacting with activity and service. There's just too much work involved and people are too lazy to make truly high-quality application experience because of it Jun 23 16:39:01 and this all further boils down to the broken android lifecycle idea and the original low-memory phones, which birthed all the complexity Jun 23 16:39:38 alankila: low memorry phones are being released even now.. Jun 23 16:39:46 the only thing that make me excited about google i/o is if I hear they are going to announce some completely different way to write applications where applications manage more of their own lifecycle. It'd be totally doable, especially with modern phones. Jun 23 16:40:23 alankila: that sounds good.. Jun 23 16:40:38 what sounds good? I didn't promise that's what is going to happen. Jun 23 16:41:02 alankila: but they are thinking about it.. Jun 23 16:41:07 they're not Jun 23 16:41:14 it's us developers that complain. Jun 23 16:41:23 or at least I complain. Jun 23 16:42:04 supporting old apis is a pain in the ass... Jun 23 16:42:17 alankila: i've written several music/media apps, basically you have to bind to the service in onStart, and then register a callback listener to receive state updates from the service, if your service pops an update as soon as your callback is registered there shouldn't be a noticable delay when your activity updates Jun 23 16:42:19 which is why they should just declare the whole android shite as it currently stands as legacy Jun 23 16:42:38 jhudgins: yes. Thta is more or less the only way to make it not suck Jun 23 16:42:58 but it's awkward as fuck, especially that bindService shite. Jun 23 16:43:41 several interfaces to implement just to get android to call 'new FooService()' for me and give me a reference? Fuck that. Jun 23 16:43:50 Give me FooService foo = bindLocalService(this, FooService.class). Jun 23 16:44:22 alankila: yeah, but they gotta be all async and shit Jun 23 16:44:25 REALITY OF 38 YEARS of programming: API is essential, makes life easy for REAL programmers. Droid is not going anywhere but up. Blackberry is being discontinued. MS has nothing as far as cell phones go, nor do they truly have any interest in the market. Not EVERYONE wants to spend the money on an Iphone. Jun 23 16:44:37 there's no "gotta". If you don't need to pass process boundary. Jun 23 16:44:44 they COULD have bindLocalService. Jun 23 16:45:02 alankila: well, that's what peekService does right? Jun 23 16:45:49 jhudgins: fascinating. Jun 23 16:45:58 still a pain to use in practice, but fascinating Jun 23 16:46:27 the trouble with peekService is most likely that if you do startService() followed by peekService(), it's still going to return null. And there's that IBinder, even if you bypass it in shortest amount of code possible, it's still there bothering you Jun 23 16:47:35 but yeah, I guess peekService can be implemented for a broadcast receiver, so there's that. Not much good to you in fresh application's activity's onCreate or anything because startService like anything else seems to defer until some quiescent moment. :-/ Jun 23 16:47:41 alankila: yeah, i've only used it for widgets (peekService), seems like they could extend that for a more general use case though Jun 23 16:47:48 I might be missing something, but why would a WaitUntil() function work? Jun 23 16:47:58 I meant NOT work. Jun 23 16:49:52 NTinNJ: perhaps it is not apparent to us what a WaitUntil method/class/whatever does. Jun 23 16:52:16 Depends on the language, some it's built in, some it's a UDF, but the BASIC syntax of it is WaitUntil(variable) = X .or. Y .or. Z Then the next instructions would follow based on what variable is equal to, otherwise it would be ignored. Jun 23 16:53:33 I don't see the relevance. If this was about the bindService() trouble, then the fact is that these operations do not occur until I return from that method. Jun 23 16:53:53 so I can't wait for them to occur because the thread that's supposed to cause things to occur is busy waiting Jun 23 16:54:58 Hence the trigger of WaitUntil(), the process just is looking and says nope, not this one, nope not that one,, YES this one! Jun 23 16:55:22 It's not REALLY WAITING, it is just seeing. Jun 23 16:55:30 I do not think that notion is compatible with event-driven programming, or useful in that case. Jun 23 16:55:51 I don't need to "wait" for anything. Android calls me when it's ready with something. Jun 23 16:56:27 I'm mostly complaining about the amount of code required to deal with android's idea of event-driven programming, especially when making activities and services cooperate. Jun 23 16:56:53 it's perfectly possible currently, only I have to implement multiple interfaces to cause it to occur, and even after that it's sort of awkward Jun 23 16:57:02 Think of it like this, you have 200 items in your shopping basket, I do not care about any of the items unless they are on my list, so they all pass through without a delay, I see an item on my list and say WooHoo! I need that item, then do whatever. Jun 23 16:57:25 I do not see the relevance. That's as much as I'm going to say about it for now. Jun 23 16:58:15 The relevance is that I only care about certain things. Hence "Event Driven" the event doesn't occur, I move on. Jun 23 17:00:39 Unless I am missing something. But another analogy would be multiple levels of clearence for the event. Using a supermarket as an example, all you care about is produce, so canned, meat, dairy, etc do not apply, so you do not even look at them. Jun 23 17:02:24 OK, now a produce item scans, but you only want fruit, a carrot scans, you stop looking, an apple scans, but you only want citrus fruit, the apple goes by, an orange scans, you want that. Obviously you could make this less code, just saying how you could break it down. You might want that apple afterall, but in a different bag or something. Jun 23 17:03:27 let's just say I get it. My problem is specifically that I have to use event-driven programming and have to implement multiple interfaces in order to cause something incredibly trivial to occur. Jun 23 17:03:44 in this case, for android to instantiate a Service and give me the reference. Jun 23 17:04:38 i agree sometimes it's ok to "wait till the job is done" instead of "page me when it's finished" Jun 23 17:04:53 Maybe I am making it more complex than it needs to be, but I think what I said is what you are trying to accomplish, just make it more generic. Jun 23 17:04:54 SuD: if only it was possible to "wait" in this case, but sadly it is not Jun 23 17:05:44 i'm not sure if you could make a wrapper to those jobs. Anyway you would have to code it. Jun 23 17:06:10 How do you want it to let you know that something you were waiting for occurred? Jun 23 17:07:01 by returning from the method where I caused something to occur. Jun 23 17:07:07 in other words, by being synchronous :-p Jun 23 17:08:10 i thought the trend of all modern ui systems was asynchronous anyway Jun 23 17:08:27 SuD: this specific case -- of instantiating a local service object -- has no good reason to be asynchronous Jun 23 17:08:38 I understand that part, but do you want it to be like someone dials your phone, the phone rings, you know an event occured and you need to answer the phone. Or something happened, your phone receives an alert, then your phone launches some other method that then decides whatever Jun 23 17:09:27 other than that local service object is just special case of remote service object where you don't have to deal with the IBinder or starting a process or another application or whatever. Jun 23 17:10:01 which is why the API looks like it does. But it's mightily inconvenient -- inconvenient to the point that I do not use Services for actual work because of it. Jun 23 17:10:43 I see even AOSP applications contain abortive attempts to write synchronous bindservice calls. This problem is clearly biting other people as well, and some of them write AOSP applications. Jun 23 17:10:59 K, so is it safe to assume that an alert will happen, and the ONLY options will either be TRUE or FALSE? Or is it possible that the event can generate MULTIPLE possibilities? Jun 23 17:11:35 In programming terms, it's either LOGICAL or VARIABLE responses. Jun 23 17:11:45 NTinNJ: let's just say that what you are describing bears almost no relevance to what I'm talking about. Think about 1 + 2. You don't have phones, supermarkets, or whatever else involved to calculate the result as 3. Jun 23 17:12:38 it is the same when you invoke 'new Foo()' to construct an instance of Foo. You just do it. My contention is with the fact that android forces me to construct a request to execute 'new Foo', which it does at some later time of its own convenience, adn then when Foo has been constructed, calls a method on object I provided which says 'yep, here is your foo. Good day!' Jun 23 17:13:01 but what I want is basically just something that does 'new Foo()' and gives me the object immediately Jun 23 17:13:21 because it's got to be totally possible only the stupid bindService API doesn't allow it Jun 23 17:14:31 and it's a major hassle, forcing complexity to EVERYTHING that ever wants to use a Service method. Jun 23 17:15:00 because you don't know if you have bind to the service yet, and so you have to prepare for the possibility that the bind hasn't happened yet and then you schedule the work to be run later once you know the service has been contacted etc. Jun 23 17:15:19 To me I would say it is actually a simple IF, THEN, ELSE, OTHERWISE type of loop. Jun 23 17:15:21 so you should see that what should be, say 'new Foo().bar()' becomes a total bunch of objects all representing deferred work Jun 23 17:16:07 oops, I meant ON() IF, THEN, ELSE, OTHERWISE type of loop. Jun 23 17:16:50 But understand it would have to be a UDF that you create IMHO. Jun 23 17:17:06 Is UDF per chance "user defined function"? Jun 23 17:17:18 exactly. Jun 23 17:18:31 Pardon me, but aren't programs anybody writes usually quite full of these UDFs? not that java has functions, of course, it only has methods. Jun 23 17:19:08 i don't know much, but maybe with threads and synchronization you can implement the wating until your services are set up Jun 23 17:19:37 SuD: unfortunately not. The trouble is that you are in onCreate, say, and you just inflated the layout, and you want to contact as service to initialize the content of some view, let's say TextView Jun 23 17:19:42 Of course they are, but sometimes the built-in stuff does not do what you need it to do, hence the ability to create your own. Jun 23 17:20:01 because you are already in onCreate, and you need the value from service immediately -- or at least prefer to be able to get it immediately -- then that's the thread that has control. Jun 23 17:20:25 so you can't sort of start another thread, do the bindservice, wait, etc. because the structure of the problem does not lend itself to such Jun 23 17:20:33 My experience is NEVER to base code on time. Jun 23 17:21:38 a) your beautiful code takes 5 seconds to start. b) you found an alternative code takes 0.5 sec... what do? Jun 23 17:21:40 SuD: and you might think you are clever and bindService in onCreate but only get the value from service during onStart. Unfortunately, android calls all these activity method in tight loop before doing the service binding work. So it *has* to be written asynchronously to work at all. Jun 23 17:22:39 c) there should always be a quite beautiful code that takes 0.6 sec Jun 23 17:22:52 SuD: Your beautiful code takes 5 seconds, better code takes .5 seconds. The power went out about 60 seconds ago, you have no Battery backup, you're screwed. lol Jun 23 17:23:53 Remember, time does not really exist, it is man-made. Jun 23 17:24:01 so you use an initial layout that just displays "Loading...", then reload when the service is ready? Jun 23 17:24:56 SuD: doesn't work in every case either. Sometimes you have, for instance, fragments which contain the views, the fragments may get restored before the activity or something like that. I experienced a number of crashes when I tried something like that. Jun 23 17:25:32 it seems to me that android is constructed to not allow you to win this game. Asynchronous or bust. And in every place where you think the service is surely initialized by now, make sure to not do the call if it just happens that the service is null Jun 23 17:25:42 because that's the level of paranoia it takes to use services. Jun 23 17:26:21 Well, a way I did handled it in a TOTALLY non droid application, client had to send me a file that I had to process, did it via FTP, got the file information first before the transfer occured, had the date, time, and filesize, my process did not do anything until the received filesize matched the filesize I was told it was supposed to be, power outage was not relevant. Jun 23 17:27:04 It's NOT paranoia!! It's heightened AWARENESS! lol Jun 23 17:27:40 anyway, the simple solution to all service-related problems is to not use a service. Jun 23 17:28:17 after that everything is straightforward and pleasant. You still need a service, though, but it is purely to defeat android lifecycle management for your process. Just run a service that tells android that killing your process would be disruptive, and it will never kill you. Problem solved. Jun 23 17:29:06 ah ballz, that's like saying the solution to not getting a DWI is not to drink, I say, just drive more carefully when you are hammered. hehehe Jun 23 17:32:40 time for a cigarette and do some work, later folks, good luck alankila! Jun 23 18:52:36 Hello @all Jun 23 18:56:46 Has anyone ever used [bak]smali before? Jun 23 18:59:34 Anybody here on a Saturday? Why would getSupportFragmentManager().getFragment(savedInstanceState, "fragmentkey"); throw a null reference Exception? Jun 23 18:59:52 I can see that the fragment is being added correctly via .putFragment(). Jun 23 19:02:09 Is there any good quickstart guide to developing native apps on android? Jun 23 19:02:27 yes, at d.android.com Jun 23 19:03:43 Chronax: how about findFragmentByTag? Jun 23 19:03:50 I've tried them all. Jun 23 19:03:57 I can not get a fragment to persist after orientation change. Jun 23 19:04:04 findbyId findbyTag, etc. Jun 23 19:04:20 i've never seen one not persist :P Jun 23 19:05:49 Yikes. Jun 23 19:06:32 I'm now trying exactly what's listed beneath "Solution" here: Jun 23 19:06:32 http://stackoverflow.com/questions/7951730/viewpager-and-fragments-whats-the-right-way-to-store-fragments-state Jun 23 19:08:05 i haven't had occasion to work with ViewPager Jun 23 19:08:41 where's JakeWharton when you need him, bet he'd know :P Jun 23 19:08:49 sleeping Jun 23 19:08:58 summoned :P Jun 23 19:09:11 it's noon there, get up =] Jun 23 19:10:54 the text on the developer website is giving me a headache; it too light Jun 23 19:10:58 I'm trying to figure out how to use: String[] myArray = getResources().getStringArray(R.array.testArray); .... but then for an xml file on sdcard and not from res/values (couse cant update in that folder) Jun 23 19:11:03 I just can't understand why this line of code would throw a null pointer exception? Fragment f1 = getSupportFragmentManager().getFragment(savedInstanceState, "fragment1"); Jun 23 19:11:14 Seems to me that it could fail... but the documentation doesn't say it will throw null ref. Jun 23 19:11:18 Also, why the F is it null? :( Jun 23 19:11:45 I can see it being "put" correctly in onSaveInstanceState with an identical key, obviously. Jun 23 19:12:20 that lines throws an NPE? not a line after it? Jun 23 19:12:26 No, that exact line. Jun 23 19:12:47 that would mean the support fragment manager is null Jun 23 19:13:18 Oh, right. Jun 23 19:13:21 How is that possible? Jun 23 19:13:27 i assume you're in onCreate and it's not possible for "this" to be null Jun 23 19:13:33 I am. Jun 23 19:13:41 Maybe need to try onPostCreate or onRestoreInstanceSt() ? Jun 23 19:13:43 i have no idea how that's possible Jun 23 19:13:53 did you call super? Jun 23 19:14:54 Yep. Jun 23 19:14:56 Always. ;) Jun 23 19:15:22 well, check the return value in the debugger and verify Jun 23 19:15:31 then you have a starting point Jun 23 19:17:22 off topic question: anyone know an algorithm for finding the edge intersection in a bipartite graph where the sets of vertices are ordered (that runs in less than quadratic time)? Jun 23 19:19:33 wongk-home: what do you mean by edge intersection? Jun 23 19:22:42 Hey JakeWharton: Is there any way for me to add an alpha animation when setting a custom view on ABS? Jun 23 19:23:04 joel135: where the edges intersect Jun 23 19:23:24 since each set is ordered, the intersection is deterministic Jun 23 19:24:40 intersections (plural) Jun 23 19:24:58 i want to strangle the people who did the website redesign Jun 23 19:25:21 why the fuck does the sidebar stop scrolling at the end and make the right hand side of the document scroll insetead Jun 23 19:25:49 that's how browsers work Jun 23 19:25:54 You'll have your chance next week at I/O! Jun 23 19:26:02 once you reach the end of a scrollable element the entire window scroll Jun 23 19:26:04 s Jun 23 19:26:27 wongk-home: bullshit, the docs on my hard drive are fine Jun 23 19:26:44 that's how every browser i've used works Jun 23 19:26:47 i mean the list of classes and interfaces Jun 23 19:27:03 when i scroll to the end of that, on the old site, that pane stops scrolling Jun 23 19:27:03 unless the site is using something like frames Jun 23 19:27:15 on the new site, the large frame starts scrolling now Jun 23 19:27:44 the Roboto web font either isn't hinted or isn't hinted well Jun 23 19:28:28 even if i override the font in Chrome Custom.ss to Helvetica, the style sheet is doing something really weird with weights that makes it render poorly Jun 23 19:29:11 i haven't had any issues with the font on linux or windows Jun 23 19:29:31 hopefully they put as much effort into adding documentation as they did on messing with the look of the site Jun 23 19:30:35 arm-linux-androideabi/bin/ld: cannot find -lssp_nonshared Jun 23 19:30:41 Anyone minds lending me a helping hand? Jun 23 19:33:05 wongk-home: do all vertices within a group have a common x or y value like in http://goo.gl/spe0T ? Jun 23 19:33:15 johnnyonflame: Need more details. Jun 23 19:33:39 Since JakeWharton seems to have disappeared, anybody know if I can add something like an alpha animation when adding a custom view to ABS? Jun 23 19:33:52 I have a very simple xml file that i can access for now only from the res/values folder.I found out i wont be able to update that xml with new content grabbed from a server.Can i access an xml from the sdcard without a xml parser? I currently use : String[] myArray = getResources().getStringArray(R.array.testArray); Any help would be appreciated. Jun 23 19:34:01 joel135: http://code.google.com/codejam/contest/619102/dashboard#s=p0 Jun 23 19:34:29 wHiTeHaT44: You'll need to fetch and parse it manually. Jun 23 19:34:43 there's a simple the simplification that each vertex has exactly one edge Jun 23 19:35:02 wHiTeHaT44: http://stackoverflow.com/questions/3779944/reading-a-specific-file-from-sdcard-in-android Jun 23 19:37:16 has anybody here built a website around their application? Jun 23 19:37:36 I would just like to see if the whole ordeal can be settled with a couple of Github Pages Jun 23 19:37:37 i just have a blog Jun 23 19:38:01 because really all we'll need is a wiki and a changelog.. Jun 23 19:38:19 github can do that Jun 23 19:38:20 I can't seem to find a tutorial on doing animation when switching activity views? Can anyone point me to one please? Jun 23 19:38:25 yea I already have the wiki set up Jun 23 19:38:40 just edit README.md for the main page Jun 23 19:40:52 Anybody know if I can animate adding a custom view to ABS? Jun 23 19:43:54 Hello! I'm trying to try out the fragments... I've realised then a layout which uses 2 of them, inserting the android:name parameter and associating with two different classes (my.inverse.hostname.programname.classname), but Android refuses to continue, giving me an error about "Error inflating class fragment" on line 7 of the XML file... this is the layout: http://pastebin.com/vZUEuHa8 Jun 23 19:43:54 and this is the simple class: http://pastebin.com/U4dfh5Qz Jun 23 19:44:36 if needed, the item.xml is here: http://pastebin.com/UjkXWKLt Jun 23 19:51:24 any idea? Jun 23 19:52:36 Where would I look for useful resources on how to implement mobile network data usage in my application? I've tried many terms in google but the stupid user tutorials on apps to install that do it keep coming up instead of what I'm looking for. Jun 23 19:52:48 sorry, "mobile network data usage tracking" Jun 23 19:53:08 i.e. what's already built-in ICS? Jun 23 19:53:12 configuring caps, billing cycles, etc. Jun 23 19:54:08 Do I need permissions for private file access like sharedpreferences and internal storage or just for external storage access?? Jun 23 19:54:12 elegos: we have around 250 tablets deployed to our employees just so they can use the app that we've built, and the tablets are half Samsung Galaxy 7" (Gingerbread), and the other half are HTC Evo View 4G's (Honeycomb) Jun 23 19:55:00 sha1sum: there are already programs that monitor the network data, both WiFi and non-WiFi... I used one of them years ago, on 1.6 Jun 23 19:55:01 The problem is, our employees are going over their data usage, and many of them do not know wtf they're doing to download and install an app that monitors it, so I figured why not try to build something in to our app? Jun 23 19:55:42 elegos: whats the full backtrace? Jun 23 19:55:49 elegos: if we were talking about a normal situation where people get our app off the market, then we wouldn't have to worry about *their* data usage, but since these are our assets it's a bit different. Jun 23 19:56:34 Basically my thinking was taking a look at how some of those app developers did it and built it in to the app they're required to use to make sales so that it's integrated with everything else we've got and we're sure they have it and are warned before they go over their usage. Jun 23 19:56:37 wongk-home: http://pastebin.com/kQ1cq76v Jun 23 19:57:03 for example, we have one employee who has a 2GB cap and he used 12GB last month... That gets expensive, and getting it back from the employee is a legal headache in certain states. Jun 23 19:57:37 sha1sum: are you using WiFi or 3G? Jun 23 19:57:48 elegos: your "fragment" class extends Activity, not Fragment Jun 23 19:57:59 Caused by: java.lang.ClassCastException: org.elegosproject.romupdater2.ActionsListFragment cannot be cast to android.app.Fragment Jun 23 19:58:04 wongk-home: which line? (just for learning) Jun 23 19:58:07 ok Jun 23 19:58:09 thanks :) Jun 23 19:58:12 didn't notice Jun 23 19:58:12 elegos: that all depends. Basically our employees are "mobile" salespeople, so if the location they're in has WiFi then they use that, but mostly the Galaxy's are 3G and the Evo View 4G's are 4G Jun 23 19:58:31 (Galaxies?) Jun 23 19:58:31 wongk-home: can a Fragment act like a ListView? Jun 23 19:58:41 elegos: always look for the 2nd exception "Caused by" Jun 23 19:58:58 you can have a listview on a fragment Jun 23 19:59:02 sha1sum: the problem is when they use the non-WiFi connection, right? Jun 23 19:59:21 wongk-home: may you please point me to the docs where it's explained please? Jun 23 19:59:29 When setting the corner radius of a GradientDrawable to a single value, I end up getting the Y radius of the corners being half of the X radius, even though they should be set to the same value. Has anyone else seen this behavior? Jun 23 19:59:42 elegos: there's http://developer.android.com/reference/android/app/ListFragment.html Jun 23 20:00:01 thanks wongk-home :) Jun 23 20:00:21 elegos: yes. Jun 23 20:01:07 sha1sum: take a look at this: https://play.google.com/store/apps/details?id=com.carl.trafficcounter&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5jYXJsLnRyYWZmaWNjb3VudGVyIl0. Jun 23 20:01:13 elegos: and since our service provider won't automatically suspend accounts when they reach quota (can't blame them), we have to think of something creative. Jun 23 20:01:18 btw 12GB / month is waaay lame Jun 23 20:01:20 :) Jun 23 20:01:43 I have a question: I was reading this android development tutorial and one of the examples was silent mode toggle. In his java code he had mToggleUIimage at @OnResume. That's okay but he didn't have it at the beginning of the jaav code though Jun 23 20:02:06 wouldn't the picture show up as on the first time u run the app Jun 23 20:02:33 elegos: I've thought about the logistics of getting 250 people to install an app to do it, but many of these guys are salespeople, not tech-savvy users, and when we deploy the tablets they do not even have google accounts on them, so an in-market app would not work the way I want it to. Jun 23 20:02:40 Austrie: your question is missing all kinds of details Jun 23 20:02:48 If I have to get them all to create google accounts and install apps, I will, but that's my last resort, really Jun 23 20:02:54 it unanswerable Jun 23 20:02:57 it's Jun 23 20:03:18 should i pastebin the example java code? Jun 23 20:03:24 that'd be great Jun 23 20:03:31 sha1sum: so you should re-invent the wheel... I mean, you can still grab the APK from somewhere and push it into the tablets Jun 23 20:04:00 it's more difficult to let your salesmen install an app outside the market rather than downloading one off of it Jun 23 20:04:38 elegos: that solves it going forward, but not retroactively for the already-employed. I know reinventing the wheel sucks, but it seems like the best-case scenario right now Jun 23 20:05:08 sha1sum: in which way would you install the new software on old tabs? Jun 23 20:05:21 we could do it if all of our employees were part of our google apps domain, I believe, but $5/mo gets kind of expensive for that many employees Jun 23 20:05:37 elegos: giving them instructions and *hoping* they follow them to create a google account and install the app. Jun 23 20:05:58 sha1sum: I mean the app you want to develop outside the market Jun 23 20:06:34 elegos: the app is already done and deployed on the tablets and we have an update system in place already for that app Jun 23 20:07:00 sha1sum ok, so that's already on account, cool Jun 23 20:07:02 so basically if I include network monitoring and release the update, they will get a notification and the opportunity to install the next time they logged in. Jun 23 20:07:13 sha1sum: well, you should monitor the network off WiFi Jun 23 20:07:49 Yep that's what I was thinking. I also know that I'm going to have to build another service, but mostly I don't know what classes I need to use to monitor all that. Jun 23 20:08:47 And since all of the tablets using our application are ours and we know what the billing cycle and bandwidth caps are for each model, we can just configure the cap and cycle inside the APK based off of model, which we can always change with an APK update in the future if need be. Jun 23 20:08:48 sha1sum: I think there is an android built-in class for this, seeing how many apps already did this Jun 23 20:09:16 I mean, for network monitoring Jun 23 20:09:20 Yeah Jun 23 20:09:44 I just need to find some source for one of these apps or something. Jun 23 20:09:46 heh Jun 23 20:09:49 I think you should check whenever you're connected to a WiFi net or not. If you are, track down all the incoming and outgoing connection bytes Jun 23 20:10:46 elegos: I already have broadcast receivers set up for connectivity and network changes, so that part is easy Jun 23 20:10:55 sha1sum: look at this: http://developer.android.com/reference/android/net/TrafficStats.html Jun 23 20:11:43 I think you'll have to setup a registry for that Jun 23 20:11:51 (to make the diffs) Jun 23 20:11:54 elegos: check this out... just found it: http://www.jaqpot.net/netcounter/ Jun 23 20:12:01 open-source ftw :) Jun 23 20:12:17 Hey guys. How kan I keep my service running FOREVER? It really should never ever be killed. Jun 23 20:12:19 yeah, that's the one I used years ago Jun 23 20:14:07 WeeJeWel: use a foreground service, and kiss your battery goodbye Jun 23 20:14:34 wongk-home: does that mean the display has to stay on? Battery is no problem since it's always docked Jun 23 20:14:53 wongk-home: I think WeeJeWel wants a foreground service which won't be killed by the android task manager or a task killer Jun 23 20:15:07 that's the point of foreground service Jun 23 20:15:07 elegos yep Jun 23 20:15:48 there are no guarantees, but that's as close as you can get to one Jun 23 20:16:26 also not if ive rooted my device? Jun 23 20:16:49 i'm not sure that's relevant Jun 23 20:17:15 maybe something low-level, like the persistent flag Jun 23 20:17:39 http://pastebin.com/WZdxeZNE Jun 23 20:17:42 I have a question: I was reading this android development tutorial and one of the examples was silent mode toggle. In his java code he had mToggleUIimage at @OnResume. That's okay but he didn't have it at the beginning of the jaav code though Jun 23 20:17:47 wouldn't the picture show up as on the first time u run the app Jun 23 20:18:15 Austrie: this paste is impossible to read Jun 23 20:19:28 the variable you mention also is not in the paste Jun 23 20:19:32 It's the activity class Jun 23 20:19:48 I'm thinking about integrating RoboJuice into my app. Is ~700kb jars worth the effort to save a few LOC? Jun 23 20:20:01 just ignore the numbers like [] 32 Jun 23 20:20:20 how could it be any different from the file itself Jun 23 20:20:26 besides having no color Jun 23 20:20:35 or indentation Jun 23 20:20:38 lol Jun 23 20:20:45 that last one is a big deal Jun 23 20:21:39 can I get the context of a ListFragment? Jun 23 20:22:30 elegos: an Activity is a Context Jun 23 20:22:54 just read line 9 to 34; those lines aren't to bad and their apart of my question Jun 23 20:22:59 wongk-home: how can I pass it to the listfragment? Jun 23 20:23:31 elegos: android already does Jun 23 20:23:58 wongk-home: what should I pass as first argument of the constructor then? Jun 23 20:24:01 He has "toggleUi();" for "OnResume" but not "OnCreate"; I was wondering why? Jun 23 20:24:17 elegos: i thought you were using xml layouts? Jun 23 20:24:27 wongk-home: not for the list Jun 23 20:24:29 wongk-home: He has "toggleUi();" for "OnResume" but not "OnCreate"; I was wondering why? Jun 23 20:25:00 elegos: you were in the pastes i saw Jun 23 20:25:09 toggleui just changes icon depending on silent mode or noise Jun 23 20:25:26 wongk-home: ActionsListFragment was an Activity, now it's a ListFragment Jun 23 20:25:33 and I want to set its list adapter Jun 23 20:25:35 any clue wongk-home? Jun 23 20:26:14 Austrie: OnResume is run after OnCreate Jun 23 20:26:40 but only after you run the app the second time Jun 23 20:26:46 no Jun 23 20:26:57 wouldn't when you run the app the first time it has nothing to resume? Jun 23 20:27:03 wongk-home: this.getActivity() should work right? Jun 23 20:27:06 it doesn't matter Jun 23 20:27:10 elegos: yes Jun 23 20:27:24 elegos: but im not entirely sure what you're trying to do Jun 23 20:27:51 Austrie: read the activity documentation, especially about the lifecycle Jun 23 20:27:53 so no matter what Onresume will always be run after OnCreate? Jun 23 20:27:57 yes Jun 23 20:28:07 wongk-home: I'm trying to play around the fragments, and my idea now is to create a Settings-like application Jun 23 20:28:16 I was thinking OnResume only runs when there's something to resume? Jun 23 20:28:28 *cross out the question mark* Jun 23 20:28:31 but i get it now Jun 23 20:28:33 thanks Jun 23 20:28:46 the name is kinda misleading though lol Jun 23 20:29:13 perhaps onResumeAndAfterOnCreate Jun 23 20:31:16 wongk-home: I've created these two fragments. The first one is a ListFragment and I've set its space to 200dp. It should have one item (as defined in item.xml), but it is displayed nothing... any idea? Jun 23 20:33:07 elegos: paste the fragement again Jun 23 20:34:18 ActionsListFragment: http://pastebin.com/EAYW5MB7 item.xml: http://pastebin.com/6RAYaYMn Jun 23 20:34:39 i hate SimpleAdapter Jun 23 20:34:46 main layout: http://pastebin.com/VAuS7DGp Jun 23 20:35:03 wongk-home: I hate adapters in general, I never really understood them :P Jun 23 20:35:27 elegos: read up on model-view Jun 23 20:35:32 they're quite simple Jun 23 20:36:02 what I know about 'em is that they allow you to insert "elements" in objects that need them to display them Jun 23 20:36:25 you're thinking about them the wrong way Jun 23 20:36:32 i.e. a list view, it display "objects" as defined in the adapter Jun 23 20:37:21 wongk-home: can I avoid naming the fragment and inserting a listview directly into it in the XML? Jun 23 20:37:43 I don't really need to make that list dynamic Jun 23 20:37:45 then you wouldn't be using fragments Jun 23 20:38:05 but yes, of course Jun 23 20:38:13 wongk-home: I want to have a tablet interface with two columns Jun 23 20:38:23 I thought fragments where there for that purpose Jun 23 20:38:28 exactly Jun 23 20:38:40 a list on the left, a viewer on the right Jun 23 20:39:08 uhm... I should set the layout of the ListFragment, right? Jun 23 20:39:26 typically no Jun 23 20:40:08 wongk-home: how'd you do it? Jun 23 20:40:18 how'd i do what? Jun 23 20:40:33 to insert a listview into the leftish fragment Jun 23 20:40:50 that's why you're using ListFragment, yes? Jun 23 20:41:04 yeah, that was my intention Jun 23 20:41:26 ok, so that answers your question? Jun 23 20:41:44 actually the ListFragment displays nothing Jun 23 20:41:56 but it should have one element loaded by the code Jun 23 20:41:57 it displays an empty list, right? Jun 23 20:42:04 yep Jun 23 20:42:41 setListShown ? Jun 23 20:43:17 why are you overriding onViewCreated? Jun 23 20:43:17 :**) yes it was that, the list was not shown :) Jun 23 20:43:39 you're calling super.onCreate from onViewCreated Jun 23 20:43:44 that's very wrong Jun 23 20:44:08 ops, that was a bad copy/paste Jun 23 20:44:40 that's good :P Jun 23 20:44:42 and yes, that was causing the problem Jun 23 20:44:55 substituded with super.onViewCreated(view, savedInstanceState); Jun 23 20:45:06 much better now :P Jun 23 20:45:32 by your experience, what's a good sp or % value for a tablet's fragment list? Jun 23 20:45:44 for example, how can I see the setting's width? Jun 23 20:46:28 i couldn't tell you Jun 23 20:47:10 ok, I'm gonna try :) Jun 23 20:47:28 and what about a divider between the list and the "main" view? Jun 23 20:47:39 Pardon me, I know this is slightly tangent, topically but... Is there a hotkey which I can use to terminate the current debug session and return to the Java perspective in eclipse? Jun 23 20:48:00 elegos: a resizable one, like a splitter? Jun 23 20:48:57 wongk-home: looking at the ICS tablet design, I just saw it's rathen a border of the entire main window Jun 23 20:49:10 how many things people don't even look at if not interested :) Jun 23 20:50:00 * wongk-home out Jun 23 20:59:42 can I force a LinearLayout fragment to display next to another element rather than under it? I've set the previous element's android:layout_height to "match_parent", but it won't show that way Jun 23 21:01:43 ah stupid, the orientation Jun 23 21:08:03 hi there, could anyone explain me the difference between dalvik heap and native heap? is it correct that dalvik heap contains all the java mem allocations and native heap all native mem allocations like native libraries or native methods (jni/ndk)? Jun 23 21:08:40 yes Jun 23 21:09:10 perfect ;) thx al lot! Jun 23 21:09:26 though native methods and functions aren't in the heap, they're in a memory area allocated by the system when the binary is loaded Jun 23 21:09:59 the native heap has the allocations that they do through malloc() Jun 23 21:10:26 question: what's the best class to extend for a fragment which could have both a listview or a simply descriptive rich text? Jun 23 21:11:17 How can I create a dummy SMS number to where I can send a SMS messag from my app and receive back a reply with a custom message? Jun 23 21:12:11 Is there some SMS gateway to where I can send SMSs and receive SMS replies? Jun 23 21:13:22 sam: so whats does the native heap really contains for e.g.? whats the use case? as you say native system libraries and shared libraries from ndk are allocated by the system when the binary is loaded Jun 23 21:15:49 hotzenpl0tz: they contain the data processed by the native code Jun 23 21:17:39 i see - can i conclude from that that dalvik heap size + native heap size = heap size of application? Jun 23 21:17:47 is there a (graphical) list of all the android resources? I found one, but for Android 2.2... http://androiddrawableexplorer.appspot.com/ Jun 23 21:22:31 A question: Just ordered an galaxy nexus, Im a linux user and I'm aware about the mtp stuff for "data exchange". About testing apps using directly the phone, is there any problem with that phone and linux? Jun 23 21:24:58 Foxandxss: nope, ADB works outside MTP Jun 23 21:25:13 good to know, thanks Jun 23 21:25:27 dont want to spend almost 400€ to use windows to develop :P Jun 23 21:26:01 Chronax: just add an animation and call startAnimation Jun 23 21:28:43 I get that the main way to pass parameters to a DialogFragment is to pass them into newInstance and add them to the arguments Bundle, and that state is evidently preserved neatly, is there any other method available for non-serializable objects? Jun 23 21:31:59 JakeWharton: At what point do I call startAnimation? Jun 23 21:32:02 When adding the control? Jun 23 21:32:05 The custom view? Jun 23 21:32:12 yeah Jun 23 21:32:36 Wait... what? Like... method-chain it? Jun 23 21:33:01 Nope, that doesn't work. Jun 23 21:33:09 robb_www: not really Jun 23 21:33:20 you'll have to provide an alternate method of obtaining those resources Jun 23 21:33:43 you shouldn't be passing anything very large to the Bundle. just enough to determine state and fetch appropriate data Jun 23 21:34:30 JakeWharton: What do I call startAnimation() on? Jun 23 21:34:36 you view Jun 23 21:34:39 your Jun 23 21:35:13 Huh, but after calling addCustomView() won't it be too late to start the animation? Jun 23 21:35:39 it won't be displayed until the UI thread is clear Jun 23 21:35:59 which is the same thread you will be running in currently Jun 23 21:36:13 so any view changes you make won't be reflected immediately Jun 23 21:36:14 So, addCustomView(v) and then v.startAnimation() ? Jun 23 21:36:21 Or the converse? Jun 23 21:36:38 doesn't matter but you should start the animation as late as possible Jun 23 21:36:52 Cool, thanks! Jun 23 21:37:10 you want it to be as close to the last operation on the UI thead as possible so you don't miss frames Jun 23 21:37:23 I dig it. Thanks again. Jun 23 21:54:08 hey Jun 23 21:55:52 If I install ics leak for bionic can i go back? Jun 23 22:00:34 #android-root Jun 23 22:01:50 is there any good emulator in the SDK that emulates a tablet? Jun 23 22:02:05 i've tried xoom but it's so buggy Jun 23 22:02:18 i wanna play with fragments and actionbars Jun 23 22:02:40 any emulator over API 11 will have those natively Jun 23 22:02:51 the support library backports fragments to 1.6+ Jun 23 22:02:53 Is there a simple way to get the currently displayed Fragment in a FragmentPagerAdapter? Jun 23 22:03:50 getCurrentItem() and look it up in whatever data structure backs your adapter Jun 23 22:04:03 the fragment will also have its visible hint set to true Jun 23 22:04:27 Bingo. Jun 23 22:04:36 JakeWharton: If genius was an elected position, I'd nominate and vote for you. Jun 23 22:05:58 how can I make a ListFragment's element have the status of "pressed" once selected? The default behavior is just "click and release". Jun 23 22:06:50 call setSelected() on the view Jun 23 22:07:03 make sure your background state-list drawable has a selected state Jun 23 22:07:47 thanks :) Jun 23 22:08:00 Wish there was a way for me to inject my own method that was called for all fragments after like... onResume(). Jun 23 22:09:17 :( Jun 23 22:09:24 for what purpose? Jun 23 22:10:01 Can I send a SMS message from my device to my own device? Jun 23 22:10:13 yes Jun 23 22:13:46 where should I place a selector XML file inside my sources? Always under layout? Jun 23 22:14:25 in res/drawable/ Jun 23 22:15:00 thanks Jun 23 22:15:25 is there a default selector for listviews? just to not re-invent the wheel for a custom item Jun 23 22:15:39 (background selector) Jun 23 22:15:45 JakeWharton: I need something to happen after each of my fragments has fully loaded. Jun 23 22:16:07 I'm kinda trying to implement something like an MvvM pattern. Jun 23 22:16:27 Wish there was just some way to like... inject a method in after onResume() that would be invoked. Jun 23 22:17:34 elegos: there's a listSelector attribute on the theme which defines what's used Jun 23 22:17:38 and yes there's a default Jun 23 22:17:47 it usually varies between API level and OEM ROMs Jun 23 22:18:23 Chronax: what do you define as fully loaded though? onViewCreated is after onCreateView which is probably about as late as you can get Jun 23 22:18:43 Well, anywhere in that stack. Jun 23 22:18:50 JakeWharton: I'm using a ListFragment with a custom item, and surprisingly @android:drawable/list_selector_background isn't the standard roboto blue Jun 23 22:19:00 and it doesn't seem to have the "selected" state Jun 23 22:19:12 (like the settings app) Jun 23 22:19:48 I may create a custom background selector, but people not using ICS would feel the app as something apart Jun 23 22:23:05 Is there any way for an Activity to be notified when its fragment has reached say... onResume() automatically? Jun 23 22:23:12 From the activity level, without modifying the fragment? Jun 23 22:24:27 activity onResume after super.onResume Jun 23 22:25:07 Will the be invoked after each time a new fragment is loaded? Jun 23 22:25:13 Doesn't seem like it. Jun 23 22:25:14 no Jun 23 22:25:19 Yeah, see. That's what I need. Jun 23 22:25:49 modify the support library and add it Jun 23 22:26:29 heh Jun 23 22:26:35 There must be an easier way, right? Jun 23 22:27:00 Is there any easy way to load uncompiled ninepatch files programatically? Jun 23 22:28:54 modifying the support library seems easiest to me Jun 23 22:29:00 Gross. Jun 23 22:29:01 that's the beauty of it being standalone and open source Jun 23 22:29:08 don't have to suffer at Google's whim Jun 23 22:29:22 I mean... there must be some way to be notified when a fragment's onResume() has completed or something, right? Jun 23 22:29:38 Without modifying that library. Jun 23 22:29:50 doubtful Jun 23 22:35:20 why can "@drawable/list_selector_background_selected" be used by the android framework, but not by a custom selector (with android: after @)? Jun 23 22:35:37 Chronax: there is Activity.onAttachFragment() … a little to early, but maybe you can use that ? Jun 23 22:35:42 target API: 15 Jun 23 22:36:05 Yeah, thanks g00s. Jun 23 22:38:27 is it possible to create a socket from my android device to an application runing on my laptop, having the two devices connected via USB? Jun 23 22:40:09 if you create a network between the two via USB, yes, why not? Jun 23 22:40:51 but how can i do that? Jun 23 22:41:01 I wish I knew :) Jun 23 22:41:27 :) Jun 23 22:43:08 i guess i'm the only one having this problem, and i'm beside myself about it : the new website gives me a headache. the font renders like shit, its too light, fuzzy, and why the fuck is the bg just barely off white Jun 23 22:43:35 they actually tried to take design elements from android and apply it to the web site Jun 23 22:43:44 thats cute and all ... Jun 23 22:44:15 but when i have chrome up from the old docs and compare with the new, the old was (maybe more disorganized) but far easier on the eyes Jun 23 22:44:21 of course, thats all subjective Jun 23 22:44:31 but there must be something wrong with the way this webfont is rendering Jun 23 22:45:54 g00s: what browser+version are you using? Jun 23 22:46:10 mdwright: mac os x mountain lion, latest chrome Jun 23 22:46:20 i tried ff out of desperation - the fonts were darker Jun 23 22:46:34 probably just the antialiasing is done there Jun 23 22:46:46 the font color is #444 which is too bright imho Jun 23 22:46:56 the rest of google's stuff is like #222 Jun 23 22:47:24 I'm becoming crazy finding the right background selector for the listviews (actually ListFragment), so that I can have the same color for the "clicked" event and the "pressed" one ._. anyone willing help me finding it? I want the system one for two reasons: (1) it will melt with the environment (2) I'm a lazy programmer :P Jun 23 22:47:53 g00s: latest canary, beta, stable, etc. Jun 23 22:47:55 ? Jun 23 22:47:56 jesus Jun 23 22:47:57 I've tried with @android:drawable/list_selected_background, but it will fire up a yellow-ish color Jun 23 22:48:00 you're still complaining about that? Jun 23 22:48:04 mdwright: just stable Jun 23 22:48:11 JakeWharton: yeah, because i have to read it Jun 23 22:48:13 fix it in greasemonkey, takes 60 seconds Jun 23 22:48:31 the styling is very complex for the android website Jun 23 22:48:45 its not like you can just say turn all my fonts to this Jun 23 22:49:01 then pre stuff goes to shit, or whatever Jun 23 22:49:15 you can do that quite easily with CSS Jun 23 22:49:23 or even easier with jQuery Jun 23 22:49:39 both of which you can change with greasemonkey Jun 23 22:50:33 greasemonkey is just for ff right ? Jun 23 22:50:37 no Jun 23 22:50:42 chrome has it built in Jun 23 22:50:47 :O Jun 23 22:50:54 the design site has had this look for months Jun 23 22:51:01 same color scheme Jun 23 22:51:15 yeah, i haven't been to the design site in a while Jun 23 22:51:19 just the regular site Jun 23 22:51:42 s.android.com got no love Jun 23 22:52:05 i imagine its level of traffic is many orders of magnitude less Jun 23 22:52:16 where's ADT 20? Jun 23 22:52:23 it was tagged in the repos on Monday Jun 23 22:52:53 JakeWharton: are you sure greasemonkey is in chrome? i see tampermonkey, greasemetal, ... Jun 23 22:53:04 it's built in Jun 23 22:53:11 I can't seem to figure out this problem I am having... Basically, I'm trying to obtain attributes from a style by using obtainStyledAttributes (int resid, int[] attrs) and supplying it an array with 2 items, but when I try to access the 2nd attribute, I get a -1. Here's the code summary: https://gist.github.com/2972687 Jun 23 22:53:11 hm Jun 23 22:53:28 g00s: you have to create a chrome extension, which uses javascript Jun 23 22:53:43 and it interacts with the webpages (ofc) Jun 23 22:53:51 alexfu: the android.R.attr values have to be ascending order by value Jun 23 22:54:02 actually you can just create a .user.js file and navigate to it Jun 23 22:54:09 Chrome will prompt you to install Jun 23 22:54:22 cool Jun 23 22:54:40 btw any idea on the background "issue"? Jun 23 22:54:57 and why list_selector_background_selected is not available in the SDK, even if it's used by a listed element? Jun 23 22:55:11 alexfu: background is 16842964 and textColor is 16842904 Jun 23 22:55:16 you need to put textColor first Jun 23 22:55:41 JakeWharton, I did not know that. Jun 23 22:55:47 alexfu: you can create styles in attars.xml using existing attributes and it'll do the ordering for you Jun 23 22:57:17 alexfu: commented Jun 23 22:57:47 JakeWharton, many thanks Jun 23 23:05:18 ok, I found the background color for Android 4.0: @android:color/holo_blue_dark Jun 23 23:05:53 but now, I'd like to pick the "default" one for the android version, so that it will change depending on the android version... is there any way? Jun 23 23:06:59 elegos, you want the background color to change depending on the version of Android the phone is using? Jun 23 23:08:00 yeè Jun 23 23:08:01 yep Jun 23 23:08:59 I'm using a custom item of a ListFragment Jun 23 23:10:55 elegos, I would use Build.VERSION.SDK_INT and compare it to Build.VERSION_CODES.[SOME_SDK_INT] Jun 23 23:11:13 kind of like.. http://pastebin.com/JJ79vYaV Jun 23 23:11:28 alexfu: you can't from an XML selector Jun 23 23:12:06 elegos, ? are you asking if you can? if so then I don't believe you can. Jun 23 23:12:14 Let me rephrase my earlier question. Short of modifying the support library, is there any way for me to ensure that code will exist in the onResume() event for all fragments? Jun 23 23:12:21 I can't think of any, and I don't think it's possible. Jun 23 23:12:22 Is it possible to start an IntentService from within an OnClickListener? Jun 23 23:13:24 alexfu: I thought there was a "super" selector, default for the os Jun 23 23:13:39 i.e. called the same way through the different versions Jun 23 23:16:33 elegos, no, the drawables and resources in (lets say..) Android 4.0 and Android 2.0 are different. Jun 23 23:17:47 Chronax, What concern do you have exactly with the onResume() method? Jun 23 23:18:28 anybody familer with IntentService? Jun 23 23:23:15 JakeWharton: Is there any way to remove a custom view from the actionbar after adding it? Via the ActionBar methods? Jun 23 23:23:23 set it to null Jun 23 23:23:25 Just set it to null? Jun 23 23:23:26 Hah Jun 23 23:23:27 k Jun 23 23:29:01 hi guys Jun 23 23:30:08 I am calling a web service in the onResume of my activity, it shows a dialog as the background work completes, the web service finishes and the dialog is dismissed - i can see my list view populated in the background but the app has lost focus is dimmed, none of the buttons work etc. Only option is press home button, force close the app and load it up - only ever happens on first run, any ideas? Jun 23 23:30:13 Anyone here managed to compile stuff with Pelya's SDL Port? Jun 23 23:30:22 I'm having trouble compiling said stuff Jun 23 23:31:39 it is reproducable, happens the first time the app is installed, every time Jun 23 23:32:46 ideas? Jun 23 23:37:42 hello? Jun 23 23:46:03 If I said SMS to myself I get billed? Jun 23 23:46:47 i think so Jun 23 23:48:18 I'm using http://sent.ly and for testing purposes I send SMS to myself and then sent.ly will capture the sms and it through HTTP onto my web app and then my web app generates a response that gets captured by sent.ly and it replies to my device with the response from the web app Jun 23 23:48:54 gotta sleep my english sucks big time Jun 23 23:49:42 im not sure what all that meant. but test it. only way to be sure Jun 23 23:50:39 am calling a web service in the onResume of my activity, it shows a dialog as the background work completes, theweb service finishes and the dialog is dismissed - i can see my list view populated in the background but the app has lost focus is dimmed, none of the buttons work etc. Only option is press home button, force close the app and load it up - only ever happens on first run, any ideas? Jun 23 23:53:24 This is a post about it - with pics : http://stackoverflow.com/questions/11173927/android-activity-dims-looses-focus-and-freezes-no-error-messages-and-works-af Jun 24 01:01:27 Would anyone know why getIpAddress of WifiInfo would return 0 when using 3G? Jun 24 01:08:40 Has anyone ever used [bak]smali before? Jun 24 01:09:09 CoJaBo: #smali Jun 24 01:10:21 Yeh, I'm there.. not very active tho it seems, was hoping to find a guide or somethgin Jun 24 01:34:43 is there a more concise way to do this? http://stackoverflow.com/questions/7086734/how-to-get-my-ip-address Jun 24 01:57:21 rockstar8577, no Jun 24 01:57:46 so thats the only way to get your phone's ip address? Jun 24 01:57:52 well best way Jun 24 02:38:45 rockstar8577: why would you want another way? Jun 24 02:38:47 this one works Jun 24 02:40:45 yaay finally avoided all the WindowLeaked exceptions :) Jun 24 02:41:00 romainguy_:just cause it doesn't seem like the proper way. I could be wrong, as i am by no means an expert Jun 24 02:41:12 rockstar8577, if you're looking for public IP, then you need an external source to figure out NAT'd IP Jun 24 02:41:18 otherwise, enumerate network interfaces to see what IP you have Jun 24 02:41:41 pfn, im looking for the ip needed to connect to my device if it were to be a server Jun 24 02:41:43 you can remove any rfc1918 addresses and you can figure one or more of those is accessible from remote **** ENDING LOGGING AT Sun Jun 24 02:59:58 2012