**** BEGIN LOGGING AT Thu Apr 18 02:59:58 2013 Apr 18 03:00:04 what else do you need? Apr 18 03:00:05 prove it Apr 18 03:00:29 everyone knows that vms are slower than native code Apr 18 03:01:26 depends on what you're doing Apr 18 03:01:34 in many cases, the vm being slower is irrelevant Apr 18 03:01:40 once you have a decent JIT it's by no means that cut and dry, as well Apr 18 03:01:47 and in certain cases, memory optimizations of the vm outperform native code Apr 18 03:02:03 java definitely has some inefficiencies - do something stupid with string concat, you're going to pay Apr 18 03:02:21 for math? with jit? you shouldn't see any real measureable difference Apr 18 03:03:13 without jit, sure, you're going to be feeling the virtual layer pretty badly, but android has had jit since 2.1 or so Apr 18 03:03:23 since froyo Apr 18 03:03:55 ok i made my point :) now i must go to sleep. Apr 18 03:03:59 goodnight! Apr 18 03:04:10 he made a point? Apr 18 03:04:17 he made a point he did no research Apr 18 03:04:23 * dragorn shrugs Apr 18 03:04:30 whatever... Apr 18 03:04:35 and it's not "java" Apr 18 03:04:36 night again Apr 18 03:04:37 it's dalvik Apr 18 03:04:46 sshh just let him leave Apr 18 03:04:57 pfn: well yeah, but if you do something dumb in the language it doesnt' matter what it compiles down into Apr 18 03:04:58 :p Apr 18 03:05:13 pfn: in this case, triggering the copy-on-concat string shit was all that came readily to mind Apr 18 03:05:32 pfn: that's hardly unique tho, you can shoot yourself in the leg w/ anything Apr 18 03:06:00 dragorn, sure, but people have a misconception of java, and its vm and how it relates to android Apr 18 03:06:08 dragorn, that applies to the ndk as well Apr 18 03:07:06 dalvik's garbage collector can be a pain point, as GC caused by an alloc in a bg thread will stall the UI thread as well. but not having GC at all would mean a lot more work for developers and probably a lot more memory leaks in general Apr 18 03:07:43 but what about reference counting? Apr 18 03:07:50 what about it? Apr 18 03:07:53 and refcounting gcs suck Apr 18 03:08:09 iOS? Apr 18 03:08:31 What's a good way to find contract work? Apr 18 03:08:38 no gc pauses, and at this point, no manual coding Apr 18 03:08:42 seems like best-of-both Apr 18 03:09:04 allocate as much as you can on stack, recycle objects as much as possible, and you don't have to deal with gc much, either Apr 18 03:09:51 and gc pauses only happen in a collect-the-world scenario Apr 18 03:09:53 at least on the jvm Apr 18 03:10:01 dunno how dalvik implements partial vs. full gc Apr 18 03:10:07 iOS is surprisingly reasonable with ARC. There are places where GC would be nice, but it's easily 95% of the way there. Apr 18 03:10:09 bitmap loading is hard without GC. the inBitmap is awesome and helps, but only if you know all bitmaps are a fixed size and you don't need to inSampleSize them Apr 18 03:10:42 agree with the "allocate as much as possible on stack" Apr 18 03:10:44 meh, I hate april and march for tv, it's so slow, so few shows and episodes Apr 18 03:10:48 not all the way, of course. and there are definitely places I would love to have some kind of user-defined GC pool. Apr 18 03:11:04 recycling objects seems frightening. too easy to not quite completely recycle. Apr 18 03:11:35 groxx, like autorelease or really GC? Apr 18 03:12:00 really GC. autorelease is practically unnecessary with ARC Apr 18 03:12:49 and autorelease doesn't solve the reference-loop problem at all, where GCs can. Apr 18 03:14:30 right-o Apr 18 03:14:33 davcamer, for certain objects, it's quite useful, e.g. bitmaps and handler messages Apr 18 03:15:01 davcamer: done much iOS programming? (briefly - I'll have to head out in a few minutes) Apr 18 03:15:01 especially if you're gonna be allocating a shitton of them Apr 18 03:15:42 groxx: i've done a couple projects that ran for several months, and some other noodling on my own Apr 18 03:16:11 pfn: interesting. i've had some nightmares with bitmaps. never tried recycling. will next time. Apr 18 03:16:55 bitmaps actually have a "recycle" method, but i think pfn is talking about reusing them with BitmapFactory.Options.inBitmap Apr 18 03:17:50 cool. I've got one big one with my job. Android keeps making me miss the iOS toolchain and documentation, though source code is handy sometimes. Apr 18 03:18:08 groxx: yes, i like the source code. Apr 18 03:18:43 groxx: i think the component model (Activity, Receiver, Service) and lifecycle is actually better too. more fitted to mobile. but takes much longer to learn. Apr 18 03:18:54 groxx: (better on Android I mean) Apr 18 03:19:41 groxx: the android toolchain does often make me sad. Apr 18 03:20:01 davcamer: yeah, I really like that setup. it's a shame it's so weird sometimes though - we've had a lot of trouble making relatively-complex app flows cohesive and reliable. though that's mostly the fault of the task stack and its horrible documentation. Apr 18 03:20:54 groxx: oh yes! task stack is hilarious. i get to a point where it seems to all make sense... but then nothing works how i think it will :) Apr 18 03:22:07 I've started to read the code around the task stack :s not fun. enlightening, but not fun. I tend to read it in 20k LoC spurts, and then my brain needs a day or two to recuperate. Apr 18 03:23:20 kudos to you! i haven't worked up the courage/desire to try yet. Apr 18 03:23:51 took me a couple days to find it. why is it hidden in /server/am/ ? Apr 18 03:25:22 anyway. it's interesting - reveals why some guarantees are there, and why some aren't. maaaybe worth reading for 'fun', maybe not :) at some point I intend to try to codify what I've found, and blog about it. Apr 18 03:25:59 but that's in the future, "after the holidays, when things settle down" which never happens :) Apr 18 03:26:19 ha ha. of course. Apr 18 03:26:30 and I should head out - I should probably hang around in here more often, interesting stuff comes up occasionally Apr 18 03:26:46 yeah, i had dreams of running some experiments and writing it down/diagramming the results. but it hasn't happened. Apr 18 03:27:22 /wave at all, have a good night :) Apr 18 03:27:26 yes it does. nice chatting with you groxx. Apr 18 03:38:30 hi there, I want to do a multi selection from default gallery, how can I do this? Apr 18 03:38:40 Or is it possible? Apr 18 03:41:20 press and hold Apr 18 03:42:06 but it doesn't work Apr 18 03:42:28 works on my nexus, the gallery app you call 'default' may not have that feature Apr 18 03:43:09 I use nexus s. If I go to default gallery app, I can do multiple selection Apr 18 03:43:35 but I can't do multiple selection if I call it from my app with Intent.ACTION_GET_CONTENT Apr 18 04:43:37 anyone in here working on wine for android? Apr 18 04:47:01 ahh drunk programming - i'm definitely up for that! Apr 18 04:47:37 :D Apr 18 04:52:19 wine? for android? such a thing exists? Apr 18 04:52:56 i'd rather beer, myself Apr 18 04:53:32 heraclitus: you're joking, right ? Apr 18 05:01:06 I've read some stuff from codeweavers and other sources that state it's possible, certainly not really in development. Yes I understand the issues with the ARM architecture. Apr 18 05:01:35 I just don't understand the practical uses Apr 18 05:02:15 One practical use for students: http://www.mesacc.edu/~johrx98491/TI-Emulator.html Apr 18 05:11:39 heraclitus: TI released TI-Nspire for iPad; don't see the point there Apr 18 05:12:38 Well I don't think that the iPad is the android Apr 18 05:14:01 I tend to only use WINE if it is the only option available Apr 18 05:15:28 good thing, it usually isn't the only option available :) Apr 18 05:15:43 precisely :) except for netflix Apr 18 05:16:28 they are going to html5 :) Apr 18 05:16:35 dunno what codec + drm stuff though Apr 18 05:23:55 I agree that Wine is a last resort. I do have a direct question about android, and while it isn't directly development related, I've not had much luck with answers from #android-root or #android. My friend has a Galaxy S3 that he was using the adb to back up, because he uses linux, and no drivers are available for samsung on linux. One day, after an update (this was about a month ago) he tried to push some files to the phone, and disco Apr 18 05:23:55 vered it had changed to a read only FS. He states he modified no permissions or ownership. Apr 18 05:26:33 he probably tried to push them to the wrong dir Apr 18 05:37:36 Ahh finally... can reply to reviews :)§ Apr 18 05:39:08 heraclitus, Maybe the update unrooted his previously rooted phone and he just needs to re-root it Apr 18 05:41:36 JuiceSSH: the phone was not rooted, to my knowledge. He knows not enough about that to do it himself. I think the wrong directory is more likely, bankai_ He needs to get in the habit of keeping a log of commands he runs. Thanks. Apr 18 06:12:13 anyone know how to build wpa_supplicant in androids build system with multiple wpa_supp drivers? Apr 18 06:21:37 hey guys Apr 18 06:21:50 so ....I am charged with taking on our Android app Apr 18 06:21:59 which was writen a year ago and wasn't maintained Apr 18 06:22:07 I know nothing about Android so...could use some help :) Apr 18 06:22:28 here's my situation: Our app had a search button. But the server-side changed, so search broke in the app Apr 18 06:22:32 this happened a while ago Apr 18 06:22:39 I decided to just remove the search button until we fix it Apr 18 06:22:56 but you know the menu button? Apparently, if you hold down that button in our app, it brings up search again Apr 18 06:23:00 how can I remove that? Apr 18 06:23:11 Where do I look to see the hold-down-the-menu-button stuff? Apr 18 06:27:38 some devices had actual search buttons, i think some samsung devices send the search button even after long-press menu Apr 18 06:27:43 I could be wrong but it might be the "onKeyDown" method Apr 18 06:28:05 KEYCODE_SEARCH Apr 18 06:35:55 http://stackoverflow.com/q/16076079/946409 can you guys help me with that? Apr 18 06:40:55 Pitel_IPEX: what is the problem with using a helper array? Apr 18 06:42:10 I thought there should be some better way, since all the required data are already present Apr 18 07:33:15 hi. whenever i draw a edittext it appears like a line. how can i make it look like traditional text box as in website? Apr 18 07:33:21 help Apr 18 07:37:05 Abhijit: you're going to have to be more specific with examples Apr 18 07:43:50 and... it's debugtime.. Apr 18 08:00:27 Hello, any tips on how to promote an app, how to reach android users? Apr 18 08:13:30 Hello Apr 18 08:14:30 Anyone here willing to help a newbie out with some questions? Apr 18 08:15:52 Proven_Paradox: i guess noone is willign to help out with meta questions Apr 18 08:16:04 so just ask your questions, and see if anyone will answer Apr 18 08:16:36 Alright then. Apr 18 08:17:18 My questions are mostly regarding conventions I guess. Apr 18 08:17:59 The situation: I need to pass information from a class I've created myself between two activities. Apr 18 08:18:34 Right now I'm doing it by storing instances of said class in a global information class that extends Application. Apr 18 08:18:58 It works, but I'm not sure if that's the "right" way to do this. Apr 18 08:19:33 I could also store strings in intent extras that I can use to reconstruct these objects in the new activity. Apr 18 08:19:59 Which approach would be considered better? Apr 18 08:24:28 Hi, Can someone help me with this situation. Apr 18 08:25:40 Activity A , btnClick --> Activity B, btn2Click --> Activity A, back --> Activity B , is this possible? Activity A must be in the third step the same as the activity from the beginning Apr 18 08:37:23 Question 2: is there something that makes it possible to use a custom baseadapter on a linearlayout? Currently i use it on a listview, but i need to disable the scroll inside the listview and add the listview in a linearlayout that is inside a scrollview. Apr 18 08:41:17 Heya folks - is it possible to integrate Facebook comments (as seen on e.g. http://www.escapistmagazine.com/news/view/123361-Nintendo-Announces-A-Link-to-the-Past-2) into a native android app? Apr 18 09:03:08 FrancescoV: at least you can override back key with onKeyDown() Apr 18 09:03:25 public boolean onKeyDown(int keyCode, KeyEvent event) { if ( keyCode == KeyEvent.KEYCODE_BACK ) { Apr 18 09:04:54 Quacked: i know but should it be good/possible to start ActivityA in ActivityB with startActivity(...) if i hold ActivityA in a variable? so that i don't create a new instance of the activity Apr 18 09:18:25 Hi - does anyone know where I can find a chart over what android errors mean? I got "Failure getting entry for 0x... (t=7, e=705) in package 0 (error -75). Apr 18 09:18:58 I can't seem to find anything about this error code right now. Apr 18 09:21:24 Hello, i have an undefined number of button in the same activity that on click open a preference screen. The preference screen is the same for each button, but i need to set different preferences for each button. Apr 18 09:22:10 i already call a preferenceActivity on click, but the problem is that when i change the settings of a button, it changes for all buttons. How can i have separate settings for each button? thanks! Apr 18 09:25:33 uragano2: what do you mean with "change settings of a button"? Apr 18 09:30:25 appel1: sorry, i meant that clicking on different buttons i need to open different preference settings Apr 18 09:32:49 uragano2: how do you create the buttons? in xml or code? Apr 18 09:34:27 hi, is there a way I can keep files in a sandbox on android Apr 18 09:34:44 normally files are stored on the /sdcard partition Apr 18 09:35:02 is there a way to secure a folder in the /sdcard partition Apr 18 09:35:12 appel1: the buttons are in a listview and each row of listview cntains an xml layout that contains the button Apr 18 09:35:22 or store files in a secured partition Apr 18 09:36:50 uragano2: perhaps you could find out what row the button belongs to and use that as an identifier for what preference to open Apr 18 09:37:14 uragano2: or you could set different tags on the buttons and look at that Apr 18 09:42:55 appel1: sorry but i want to understand how it works. What does it use to remember preferences? key? an id? what do you mean with "set differents tags"? thanks Apr 18 09:43:16 uragano2: sounds like I've missunderstood what you're doing =) Apr 18 09:45:16 hello everyone Apr 18 09:57:50 appel1: i have a listview, in each row there is a button. Clicking the buttons i need to open a preferences activity and set preferences for the corresponding row. Now clicking on the buttons i find always the same preferences. I mean that if i click on a button and change preferences Apr 18 09:58:49 and click on an other button i see that the preferences have been chenged there too. They are shared. Apr 18 09:59:49 i need to save different preference for each preferencescreen that i can open clicking on the buttons Apr 18 10:00:45 Show me your preferences code Apr 18 10:01:37 you should save a different preference for each row then... Apr 18 10:06:40 I've declared http://nrby.eu/c/189 as my manifest, yet my WifiWidget class won't recieve anything; what am I going about wrong here? the name of the reciever can be changed to something non-existant yet it will build (and run with the same result) Apr 18 10:07:26 it's a very simple preferences code, i am not understing how it works, sorry. My preferences code is here http://pastebin.com/hdyXsK51. Pressing any button i create a new intent loading this Apr 18 10:11:05 Perroloco: how u can see i tried to save preferencs in database too, but when i tried to set the values it doesn't work :S Apr 18 10:11:11 I have a html source as String but when I parse it with Jsoup it loses foreign characters. What should I do? Apr 18 10:11:31 urgano2, you save the same preferences for each row. You should think of doing in a different way, or you could pass a "intentExtra" so you can manage each row differently Apr 18 10:12:33 this doesnt work for instance: Ḡ Apr 18 10:12:50 it just displays it as a question mark Apr 18 10:14:58 you mean it doesn't save the preference? As I understood, your preferences get saved but all the rows get updated the same Apr 18 10:18:42 is it possible to enable/emulate wifi hardware in the emulator? Apr 18 10:27:34 Perroloco: i mean that i open preferences, i change them, i close and save it in database, then I open the preference screen using an other button but the preferences are the same that i setted pressing the other button. Seems that checkBoxPref.setChecked(Sign.isFollowedSign()); is ignored for example Apr 18 10:44:05 sooo.. sysout of my SimpleAdapter that I use for my ListView displays weird characters fine. But in ListView it's not shown at all. How to fix? :P Apr 18 10:45:48 actually, it prints fine in the ListView too, but on the device its not shown Apr 18 11:11:38 hi can some one help with adding an action bar at my app? Apr 18 11:12:17 becuuse I used tu used the menu bottom form android 10 Apr 18 11:12:28 and now I want tu run it in android 17 Apr 18 11:12:57 and I dont have an menu bottom Apr 18 11:13:12 so I need to creat an actionbar to open the menu Apr 18 11:14:24 Try actionbarsherlock Apr 18 11:15:45 hi i have a table view that wraps its content and have to cells in one row how can i force the smaller view to have the same height as the larger one? Apr 18 11:15:54 but I want to use the default actionbar Apr 18 11:15:56 two cells Apr 18 11:16:11 but It doesnt appear Apr 18 11:17:00 what do i have to change in my menu xml? Apr 18 11:22:09 fdvalencia85, you want actionbarsherlock, or your app will look different on < API11 devices than on >=API11 Apr 18 11:23:50 yea I understand that, but for now I just whant to show the actionbar in my android 4.2 device Apr 18 11:23:55 and its not showing Apr 18 11:27:54 Hi, i have a question. I would like to build a UI like this grid https://www.youtube.com/watch?list=PLhBgTdAWkxeDcgr7lljcTt1bKaHY48Toi&feature=player_embedded&v=fhWaJi1Hsfo#t=1m34s Apr 18 11:28:41 Has someone an idea how to make this? it is made with an adapter of dynamically adding (changing items) any time? Apr 18 11:31:43 I'm interested in this layout with Text and images in stead of video's Apr 18 11:32:58 well I will change my question. how can i add actionbar to my activity? Apr 18 11:38:28 Do you meet all the requirements? https://developer.android.com/guide/topics/ui/actionbar.html#Adding Apr 18 11:40:10 FrancescoV: seems pretty easy to do Apr 18 11:40:49 i am getting a high latency when recording audio through AudioRecord, sending it over a socket connection and playing it back with AudioTrack. please let me know if i am doing anything wrong? http://pastebin.ca/2361625 Apr 18 11:41:56 anyone know what fee the android store take for launching an app? i know the apple store take 30% of rev right? Apr 18 11:42:12 lseactuary $25 Apr 18 11:42:13 lseactuary: 25$ Apr 18 11:42:20 and thats it? Apr 18 11:42:26 yeah one time Apr 18 11:42:29 Francisco, you could use something like this: http://www.androidviews.net/2013/01/pinterest-like-adapterview/ Apr 18 11:42:35 apple store is one time $99 then 30% rev? Apr 18 11:42:39 and then, just create a custom adapter for your views Apr 18 11:42:41 lseactuary: apple takes 30 % of all revenue you make and charges 99$ for a developer account Apr 18 11:42:42 ali__: how should you do it? I want to make this UI with data from a JSONObject with for example 30 items, if a new JSONObject is received with new data, it needs to be updates with the data from new 2nd JSONObject Apr 18 11:42:51 ah Apr 18 11:42:56 but android is just $25? Apr 18 11:42:59 and nothing else Apr 18 11:43:01 correct? Apr 18 11:43:05 Google shouldnt charge $25 for free apps Apr 18 11:43:15 free apps with no ads* Apr 18 11:43:20 ah Apr 18 11:43:23 i want ads Apr 18 11:43:28 I hate ads Apr 18 11:43:30 ;) Apr 18 11:43:32 lol Apr 18 11:43:36 as in i want the number for ads ;) Apr 18 11:43:46 testt: thats the advantage at android, if you don't like paying 25$ just use any other market, or build up the incredible infrastructure you get for 25$ yourself Apr 18 11:43:56 FrancescoV: Perroloco the pinterest type view could be useful but I'd say use something like a treemap Apr 18 11:44:25 I never use any app that shows ads and havent bought any app so far Apr 18 11:44:32 lseactuary: even google charges 30% for all the revenue your app makes Apr 18 11:44:34 btw, I just released a new app. It is a wifi sonar with audio feedback :3 Apr 18 11:44:36 https://play.google.com/store/apps/details?id=com.crashapps.wifisonar Apr 18 11:44:40 interesting Apr 18 11:44:45 testt: damn you're definitely not using my apps :p Apr 18 11:44:47 i think the 25$ for everyone is pretty good. It's not really any amount of money you would consider paying or not if you publish an app, but it prevents every stupid person followed an tutorial and made an app to publish it on the market Apr 18 11:44:48 timroes yeah one can install non-market apps Apr 18 11:44:49 #kakazza well I have change theme to holo, but the only difference I see is that I dont add this line to my itmes of the menu android:showAsAction Apr 18 11:44:51 ali__ and thats any app? as in in-app, free app or paid app? Apr 18 11:44:52 okĂ© tnx for the advice, i will check both ;) Apr 18 11:45:05 lseactuary: paid and in app Apr 18 11:45:14 k Apr 18 11:45:19 what about free with ads Apr 18 11:45:25 #kakazza also I dont use any icons Apr 18 11:45:27 will anyone check the logic of this code? http://pastebin.ca/2361625 Apr 18 11:45:35 lseactuary: just 25$ Apr 18 11:45:38 o Apr 18 11:45:40 ok Apr 18 11:45:47 $25 is to create the account Apr 18 11:45:50 same with apple? Apr 18 11:45:54 $99 for free with ads Apr 18 11:45:55 line 5 should go after line 9 though Apr 18 11:45:56 but Apr 18 11:46:03 $99 + 30% for in-app Apr 18 11:46:05 lseactuary: Apple has $99/year Apr 18 11:46:08 lseactuary: but apple is yearly fee Apr 18 11:46:15 fdvalencia85: And minSdk/targetSdk is correctly set? Apr 18 11:46:18 microsoft is the greediest, its gonna fail Apr 18 11:46:19 ic Apr 18 11:46:20 lseactuary: can you please read the docs it says clearly what the payment scheme is like Apr 18 11:46:21 similar with Windows Phone Apr 18 11:46:23 $100 a year lol Apr 18 11:46:34 which docs? Apr 18 11:47:07 start by registering as a google dev and read the terms Apr 18 11:47:30 k Apr 18 11:48:11 #kakazza I have Apr 18 11:48:11 android:minSdkVersion="10" Apr 18 11:48:11 android:targetSdkVersion="17" /> Apr 18 11:52:12 the the bottom for actionbar doesnt appear :S Apr 18 11:55:50 bottom? Apr 18 11:56:49 button Apr 18 11:57:22 jejej English is not my native language Apr 18 11:57:36 guys please let me know if i am doing anything wrong? please? line 5 on the code must be put after line 9 though. http://pastebin.ca/2361625 Apr 18 12:11:07 this is hilarious http://devopsreactions.tumblr.com/post/48189077287/qas-first-look-at-new-build Apr 18 12:13:21 I solved my probm by adding this line in my activity requestWindowFeature(8); Apr 18 12:14:12 ali__: i have checked some things, the layout from androidviews works in coloms, not rows, and the sample app from the video, uses just a class that extends ViewGroup, that doesn't work with an adapter, do you think it is possible and performance good to gerenate a class like that (without an adapter) Apr 18 12:16:57 fdvalencia85: whats 8 ? Apr 18 12:17:07 cause thats bad practice Apr 18 12:17:40 FEATURE_ACTION_BAR Apr 18 12:18:08 then use the name ref Apr 18 12:18:11 rather than 8 Apr 18 12:18:49 but if i put FEATURE_ACTION_BAR it does not recognize it :S Apr 18 12:19:05 it says like it is no defined Apr 18 12:19:08 Window.FEATURE_ACTION_BAR Apr 18 12:19:13 how can I solve this? Apr 18 12:19:47 requestWindowFeature(Window.FEATURE_ACTION_BAR); Apr 18 12:20:07 then at a glance you know what it is Apr 18 12:20:12 rather than (8) Apr 18 12:20:14 :) Apr 18 12:21:11 thanks StringRay it works :D Apr 18 12:26:26 Chainfire. Is there a way to hide the SuperUser app from drawer? Ive no idea how to hide apps and keep them alive via Packagemanager.. (in shell!) Apr 18 12:31:25 FrancescoV: Even a listView extends a ViewGroup Apr 18 12:31:39 FrancescoV: just because it extends a ViewGroup does not mean it doesn't use adapters Apr 18 12:31:52 FrancescoV: you SHOULD Use adapters and recycle views Apr 18 12:32:30 FrancescoV: Even though the pinterest widget uses columns its still useful Apr 18 12:33:06 hi, i have a quick question: i have a content provider with some contact-associated data, that i'm binding to a ListFragment using a CursorLoader Apr 18 12:33:55 i want to pull in some data from the Contacts provider, as well, for each user, to display in the list Apr 18 12:33:56 pjdelport: whats the question Apr 18 12:34:21 pjdelport: use the contact provider to query data and merge it with yours Apr 18 12:34:44 pjdelport: a good start point would be the samples provided in the SDK Apr 18 12:35:04 ali__: cool, that's what i thought; just wanted to check what the best practices are Apr 18 12:35:05 you can also take a look at the contacts provider code in the platform Apr 18 12:35:33 i'm actually using MIT's SimpleContentProvider for my own stuff Apr 18 12:37:30 I have no idea what that is Apr 18 12:38:42 ali__: https://github.com/mitmel/SimpleContentProvider Apr 18 12:40:00 what about loading other data, like thumbnail loading if i want to use QuickContactBadge? would that also be worth pushing into the content provider, or should that stay in the adapter side? Apr 18 12:40:48 pjdelport: thumnails are also stored in content providers Apr 18 12:41:05 ali__: if i want to flip the items, i have done this before with fragments, but do you think its possible without fragment, else i need a layout with all framelayouts, right? Apr 18 12:41:11 pjdelport: the adapter is just a data to view middle layer Apr 18 12:42:08 FrancescoV: It is possible without fragments. Its just a view right. Applying a transformation matrix and running it through the view property animation framework should do the trick Apr 18 12:42:11 ali__: so architectural pattern is for content providers to call content providers, and consumers to just call the most relevant aggregating provider? Apr 18 12:42:34 (if you want to combine data from multiple content providers) Apr 18 12:43:02 pjdelport: content providers don't exactly call content providers. They just help in storing data and exposing data from one app to the other Apr 18 12:43:46 pjdelport: it should be aggregator service aggregates data from external content providers and put it into the app content provider and then the adapters async load the data from the app content provider into views Apr 18 12:43:57 phew! only if I was paid to do this :p Apr 18 12:45:21 I want to develop an app for my college major, and I am been working with python for 2 years, thought it would be nice if I can use python for the same. What are the possible options for me ? Apr 18 12:46:00 ybl: web app and responsive design :p Apr 18 12:46:00 And I have been lurking on d.android.com for two days, java is a bit uncomfortable for me. Apr 18 12:46:23 ybl: only if you don;t want to make a game Apr 18 12:46:37 ali__: Its an app for rideshare/carpool Apr 18 12:46:38 ybl: i'm also a Python guy new to Android, and I can tell you that the platform is very Java-oriented; you won't really get far otherwise Apr 18 12:46:42 maaaan, what am I doing wrong? I am testing some code with AndroidInstrumentationTestCase2 and this code loads a webpage via a webView. But webViewClient.onPageFinished is somehow never called. What's the matter here? Apr 18 12:46:46 ybl: you'll have to drink the Java Apr 18 12:47:04 whois rpiel Apr 18 12:47:12 pjdelport: but I love python. :'( Apr 18 12:47:19 pjdelport: I don't think so! you can make a great web app as well. Apr 18 12:47:24 what happen when i delete an entry in a HashSet? Will the Index be decreased or is it still on the same index like in an array? Apr 18 12:47:26 ybl: me too. but Android doesn't :P Apr 18 12:48:20 Anyone know the dp for the large icons used in the notification drawer? The small ones I believe are 24dp... Apr 18 12:48:31 misterli: there are no indexes as far as I know I might be wrong here. But it should just recompute the hash function right? Apr 18 12:49:09 misterli: HashSet is not ordered; there's no stable index Apr 18 12:49:11 pjdelport: I have low experience with java, Is there absolutely no other option close to python? Apr 18 12:49:49 ybl: well, the mobile web app route, but that's not really Android Apr 18 12:50:09 ali__: do you think django can do the trick for me( I have no idea how that can happen ) Apr 18 12:50:09 USE MOBILE WEB! Apr 18 12:51:01 ali__: I would need more than that. :L Apr 18 12:51:14 learn java! Apr 18 12:51:27 you could also go the NDK router Apr 18 12:51:28 ybl: you can try https://code.google.com/p/android-scripting/ Apr 18 12:51:31 *route Apr 18 12:51:32 and such Apr 18 12:51:41 depending on what you want to do, that might be all good Apr 18 12:51:57 python to C + NDK Apr 18 12:52:24 Erm, can i take some time from you to help me ? Apr 18 12:52:33 little bit, i promise. Apr 18 12:52:40 who? Apr 18 12:53:00 ybl: oh, hey, it looks like people have been busy: https://ep2013.europython.eu/conference/talks/developing-android-apps-completely-in-python Apr 18 12:53:21 not really that perfrmant Apr 18 12:53:22 Anyone who wants to help. :) Apr 18 12:54:37 help with what ? Apr 18 12:55:04 pjdelport: that duplicated my tab ;) Apr 18 12:56:26 StingRay_: guiding me to build an app. ( possibly with python) Apr 18 12:56:42 your joking right ? Apr 18 12:56:47 ybl: you cannot build apps with python Apr 18 12:57:00 you can build some mobile webfrontend with python (django as you mentioned above) Apr 18 12:57:03 Just be aware that you probably wouldn't get any support in here when going down that route. Apr 18 12:57:32 but thats no app at all, just some responsive web designing (and i guess wrong channel then) Apr 18 12:58:30 timroes: hmm. so python is clearly not an option to go. And now I understand what ali_ meant with "web app and responsive design" Apr 18 12:59:02 ybl: not if you want to create some app :) if you have a webpage that you just want to give some better mobile support it would be an option Apr 18 13:00:42 timroes: I get the idea now, and how that would work with django. But I have to make an app. :( Apr 18 13:01:09 then you want to look into java :) Apr 18 13:01:48 if python is your sole language yet, it's anyway not a harm to learn a non script language, with static typing and such Apr 18 13:04:10 timroes: I have considerable experience with C ( oh lovely C) and C++ Reckon it would not cost much sweat learning Java. Apr 18 13:04:56 ybl: What is sizeof('a') in C and in C++ respectively? Apr 18 13:05:50 yeah if you are aware of static typed languages and object orientation java is just syntax mainly Apr 18 13:06:01 and in contrast to c++ a lot less pain, you will suffer from memory management Apr 18 13:06:06 and a lot of more pain you will suffer from lengthy code Apr 18 13:06:28 kakazza: I dont know. Apr 18 13:06:39 kakazza: that really sounds like an common examn questions :D Apr 18 13:06:56 timroes: I like the way memory management is in the control of the developer in C++. Infact that why I prefer it Apr 18 13:07:09 timroes: :D Apr 18 13:07:10 Even objC for that matter. It makes things for readable for me atleast Apr 18 13:07:15 kakazza: and i bet it is :D Apr 18 13:07:27 in many examns Apr 18 13:07:35 timroes: On an afterthought, is C++ viable ? Apr 18 13:07:48 to code apps? Apr 18 13:08:15 kakazza: well, is it 32 bits ? Just a guess ... Apr 18 13:08:26 no, you will always need some java. there is the NDK allowing you to create parts of your app in c++ (parts having very critical time requirements), but also google clearly states: wrong reason to use ndk: because you like c++ Apr 18 13:08:30 timroes: yup Apr 18 13:08:37 ybl: no its 4 and 1 :) Apr 18 13:08:42 (byte) Apr 18 13:08:48 byte Apr 18 13:08:49 actually, if you use a NativeActivity and such you don't need any java. Apr 18 13:08:50 yea Apr 18 13:08:54 Your app will just be kind of... limited. Apr 18 13:09:45 ybl: I recommend using Java and following the official Guides and Trainings. You'll get a lot more support (especially in here, on StackOverflow and in general) going that way. Apr 18 13:10:24 kakazza: I reckon. Apr 18 13:11:03 timroes: Probably is a common exam question. And a good one imo. Shows that C and C++ are different questions and that C++ is not a superset of C. Which ObjC is, iirc. Apr 18 13:11:18 But let's leave that to ##programming Apr 18 13:11:40 yeah i am happy I don't need to do C/C++ anymore :D Apr 18 13:13:47 my app would manages carpools, using location services, and realtime notifications, via a webserver. That is quite all about it. Apr 18 13:14:25 ybl: just make a webapp Apr 18 13:16:05 ali__: erm, so all my data would be loaded from the web each time I launch of the app ? Apr 18 13:16:46 ali__: that does it I think. Apr 18 13:16:47 yeah its basically just a webpage Apr 18 13:17:52 I would get back to you as soon as I get any problem. Apr 18 13:18:01 Thanks everyone. Apr 18 13:18:16 concrete questions are always very welcome here :) Apr 18 13:19:19 timroes: would you go for Grade M25 for a driveway ? or more the M50 range ? Apr 18 13:19:26 what? Apr 18 13:19:40 oh, thinking about concrete for my driveway :) Apr 18 13:19:44 :D Apr 18 13:19:56 i had to wikipedia it, to see at all what it means :D Apr 18 13:20:02 but in your case I would use M50 Apr 18 13:20:06 Concrete questions. I get it. Apr 18 13:20:09 added another car bay, got hardcore down, just looking at concrete now Apr 18 13:20:12 only if jupiter lines up with venus I would use M25 Apr 18 13:20:48 ah the pun didn't received me till now, didn't know that meaning of 'concrete' :D Apr 18 13:21:05 ybl: there is local storage on the client Apr 18 13:22:13 ali__: I was thinking about having one, but then it could be left to be server-side, Apr 18 13:22:53 ali__: Can I do a local storage anyways ? Apr 18 13:28:53 hi, can i register my app somehow to get the saving event of the native contacts app? i want to sync the contacts with my app. Apr 18 13:30:29 hi all Apr 18 13:30:58 people does anyone here worked with DigestScheme for digest authentication? Apr 18 13:41:32 Hello Apr 18 13:42:12 I am using a FragmentStatePagerAdapter for a ViewPager Apr 18 13:42:40 is there anything like getPrimaryItem in the Adapter class that I could override so the ViewPager can get access this information? Apr 18 13:45:23 mank319: what do you want to achieve? Apr 18 13:46:44 for example i want to programmatically change the "focussed Item" in the viewPager by calling some function of the adapter and then just telling the adapter "notifyDataSetChanged" Apr 18 13:47:04 and I would expect the ViewPager to "ask" the adapter for the Information to display Apr 18 13:47:10 well Apr 18 13:47:13 on the other hand Apr 18 13:47:18 Question: how can you create something like the following design? i need 3 fixed rows (with 5-6 items each row) http://i.stack.imgur.com/D4RA5.jpg Apr 18 13:47:20 the DataSet didnt really change then Apr 18 13:48:03 FrancescoV: viewpager? Apr 18 13:48:15 FrancescoV: the graphic isn't too clear Apr 18 13:50:16 lov: FrancescoV: looks like a viewpager with 3 fragments in the pager at a time Apr 18 13:50:50 Then again, he's talking about rows Apr 18 13:51:10 FrancescoV: You might want to take a look at this: http://stackoverflow.com/questions/9468581/android-can-view-pager-have-multiple-views-in-per-page Apr 18 13:51:44 kakazza: my assumption is that he actually means 'vertical rows' as in columns Apr 18 13:53:36 lov: i know about a viewpager, but i need 3 fixed rows Apr 18 13:54:18 do you mean rows or columns? Apr 18 13:54:26 i need something like a wall with fixed rows (3) and dynamic items from baseadapter Apr 18 13:54:28 rows Apr 18 13:54:48 https://developers.google.com/youtube/images/android-video-wall-example.png Apr 18 13:55:24 somehing like that but without videos, need items but the user must be able to scroll horizontal (there are more items than visible on screen) Apr 18 13:58:49 Hmm, I wonder if horizontal ScrollViews in a ListView would work. Apr 18 14:02:54 I'm still looking, google plus before last update: http://i.stack.imgur.com/AzUCp.jpg Apr 18 14:03:51 I need the same result but with 3 rows and fixed columns/items (5-6) Apr 18 14:07:10 kakazza: jupp it works, I'm using it and all works fine Apr 18 14:07:33 kakazza: it's not in the delegate though, but as a header in the listview Apr 18 14:10:23 Does anyone know what function of viewPager is called when "notifyDataSetChanged" of an Adapter is called? Apr 18 14:13:07 why not debug and see Apr 18 14:13:33 anything relating to getting the visible pages again I would think Apr 18 14:17:41 My print of my ListView shows special characters, but on the device the character is blank. How can I fix that? Apr 18 14:18:12 The source is a string of a parsed html Apr 18 14:19:52 is there really no such things as a "getPrimaryItem" in the PagerAdapter Class? Apr 18 14:19:58 there is a setPrimaryItem function Apr 18 14:20:04 why is the counterpart missing :( Apr 18 14:41:10 Good morning. Apr 18 14:56:48 damnit, how do I build apps out of aosp without having these stupid odex incompatibilities Apr 18 14:57:44 does anyone here have experience with android maps v2 Apr 18 15:40:19 Hi, for me to use google api I need an api key, do I need this Google Play service ? Apr 18 15:49:17 hi, I'm using a listview/cursoradapter combination, depending on the info in the cursor an imageview has to be colored differently, when I use setBackgroundColor all works fine, if I set a colorfilter on it (which is what I need) it mixes up colors in the list, any clue on what happens? Apr 18 15:49:41 yes, you never cleard the last color filter? Apr 18 15:50:01 freedomcaller, I do :) Apr 18 15:50:14 also I shouldn't have to, it would overwrite the previous one ( looked at the code ) Apr 18 15:50:44 wird Apr 18 15:51:04 yes really wierd Apr 18 15:51:14 strange thing is, they start out right but then get changed Apr 18 15:51:20 ( same list item ) Apr 18 15:51:23 suddenly changes color Apr 18 15:51:33 i have a viewpager, and swipe events get canceled if my figer switched between views in the pahe while swiping? why!?!?!??!?!?!?!?! how to fix? Apr 18 15:59:19 in case anyone cares, it stoped happiong when i took it out of a scrollview Apr 18 16:00:13 I have a listView where one row contains a couple of views that I want to be clickable as well.. but right now they are not even with a listeners.. I know there was a flag I need to set but can't recall it.. anyone know the name of it? Apr 18 16:03:00 a flag for what ? Apr 18 16:35:09 wow, hacking my email.apk was quite a pain Apr 18 16:35:17 but it distills into some very short steps... Apr 18 16:37:04 https://gist.github.com/pfn/5414166 Apr 18 16:37:06 phew Apr 18 16:43:27 Hello. Apr 18 16:44:31 I wonder how signatures work in this situation, if I wanted to hack stuff in the resources Apr 18 16:45:15 I have an auto-complete-text-view (edittext with autocompletion). Putting spaces before a word messes up the autocompletion. How do I ignore the space key when the textview is empty? I guess I'd set up a listener for key presses, but that either doesn't work or I'm not doing this correctly. The input is done via soft(ware) keyboard Apr 18 16:46:35 or when getting the string .trim() Apr 18 16:47:28 StingRay_: Yeah, I tried that. It works but the autocmpletion doesn't. Apr 18 16:47:45 the alter the way you "filter" it Apr 18 16:48:19 StingRay_: Alternatively, how do I figure out when to textView.setText(textView.getText().toString().trim()); Apr 18 16:48:22 ?* Apr 18 16:48:34 Doing so on key press doesn't work either. Apr 18 16:48:44 actuall you lost me now Apr 18 16:48:49 actually Apr 18 16:48:59 Hmm Apr 18 16:49:04 Let's put it this way: Apr 18 16:49:28 I have no idea what listener to set up where in order to override an onKeyPress for the soft(ware) keyboard. Apr 18 16:50:04 I can trim() on imeActionDone but that still leaves the autocompletion nonfunctional Apr 18 16:50:08 event Apr 18 16:50:10 onKey Apr 18 16:50:25 http://developer.android.com/reference/android/view/KeyEvent.html Apr 18 16:50:52 Yeah I figure that out, but also that it doesn't work with the soft(ware) keyboard the way I set it up. Apr 18 16:51:18 then you have really lost me Apr 18 16:51:23 on both what your wanting Apr 18 16:51:27 and why your wanting it Apr 18 16:51:33 along with how your attempting it Apr 18 16:51:34 :) Apr 18 16:51:40 * StingRay_ is just….totally lost Apr 18 16:52:00 Hmm... Apr 18 16:52:27 normally, you say why and what….then how your attempting Apr 18 16:52:33 you just jumped to how Apr 18 16:52:38 hi in webkit I load html. I have onclick handler for input type button (no form). The javascript tries to open url using file:///android_asset scheme. I have set javascript enabled but it does not open the html file. do I need to also setJavaScriptCanOpenWindowsAutomatically Apr 18 16:53:24 So I've got a searchbox. It has autocompletion. Autcompletion strings are like "abc", "daf", "Eafij", "315kf"... However, when the searchbox contains " ab" it doesn't autocomplete to abc (because of the extra space(s)) Apr 18 16:53:32 basically from javascript on click in html itself I am trying window open and show asset Apr 18 16:53:41 I need to fix that so that extra spaces in the beggining don't affect autocompletion. Apr 18 16:54:31 My thought is either trimming every time a key is pressed, or not letting space be pressed while the searchbox is empty. Apr 18 16:54:57 trimming every time would be the worse choice because it's taking up more performence. Not that it's very critical though... Apr 18 16:55:24 so kinda like a while(mystring.startsWith(" ")){mystring.subString(1,myString.length);} kinda thing ? Apr 18 16:55:33 I've tried to set up a listener for keyboard events but that doesn't work with the software keyboard. Funny, it only works with certain keys like backspace. Apr 18 16:55:53 StingRay_: Well why not use String.trim() for that? Apr 18 16:56:07 cause trim removes all spaces Apr 18 16:56:11 not just leading ones Apr 18 16:56:23 there must be ltrim/rtrim Apr 18 16:56:40 even if not you could implement them in like 2 lines .. the loop you said is probably the worst possible way to implement it :p Apr 18 16:57:01 StingRay_: I'm thinking more of a onKeyPressListener(int key) { if(key == ' ') { EditText et = (EditText) findViewById(R.id.edittext); if(et.getText().toString().length == 0) return true; } return false; } Apr 18 16:57:12 ah Apr 18 16:57:24 Well I need to trim only leading spaces Apr 18 16:57:51 I think I would aim more at the filter being good enought to do what I want Apr 18 16:58:03 rather than capture keys etc Apr 18 16:58:56 Filter? Hmm... How do I do that? Apr 18 17:01:26 Alright. Is the lock screen part of the launcher? Is the only way to make a custom lock screen in a different way than with an alarm clock hack? Apr 18 17:01:53 its not part of the launcher, ive changed my launcher without any effect on the lock screen Apr 18 17:02:40 Yes, me too and that's what I assumed. Apr 18 17:03:50 the print of my ListView (resultList) shows special characters fine, but it displays it as blank on my device. Any ideas? http://pastebin.com/U7ALyV4C Apr 18 17:05:26 hi all Apr 18 17:05:41 'Ello karakuri Apr 18 17:06:16 i made an appwidget, and i want to launch my app when the user clicks on it, but if my app is already in the background, I want it to just be moved to the frint Apr 18 17:06:26 how do i do that? Apr 18 17:06:49 what do i set on the intent / pendingintent that will cause this behavior? Apr 18 17:07:08 Isn't that default behaviour? Apr 18 17:07:17 not for my app, apparently Apr 18 17:09:01 soryy708, can you not just use .addTextChangedListener, trim inside there? Apr 18 17:10:28 TextWatcher Apr 18 17:12:37 brx_: Hmm... Maybe I could do that. Apr 18 17:12:44 brx_: atm I'm trying to set up a filter Apr 18 17:13:07 roger that Apr 18 17:15:08 sadly, I'm tethered to my phone and in order to test my code I have to run it on my phone. Bye bye tethering, bye bye internet, bye bye IRC! Apr 18 17:17:27 soryy708: the problem is the user may already have gone deeper inside my app and I don't want to bring up the main activity again if they have done so Apr 18 17:17:36 (there is login involed, etc) Apr 18 17:17:42 *involved Apr 18 17:24:35 Anyone? Could it be a charset problem? Apr 18 17:28:39 can SoundPool load .mid (midi files)? Apr 18 17:28:42 and play them? Apr 18 17:34:00 testt: istr it can Apr 18 17:35:16 JesusFreke for some reasons I cannot make it play midi Apr 18 17:35:46 maybe it can't then :) Apr 18 17:35:59 ... Apr 18 17:36:19 I thought it could, but it was a vague recollection of something I thought I remembered hearing :) Apr 18 17:36:46 according to http://stackoverflow.com/questions/4716010/dynamically-re-reading-a-midi-file it can but it throws an error message Apr 18 17:37:00 What error? Apr 18 17:39:26 looks like it *should* be able to. http://developer.android.com/guide/appendix/media-formats.html are you sure it's the right format? Apr 18 17:46:25 is it possible to use a ListPreference in a normal activity? Apr 18 17:49:57 the print of my ListView (resultList) shows special characters fine, but it displays it as blank on my device. While it shows the symbol TM (trademark), it doesnt show the symbol Ḡ Any ideas? http://pastebin.com/2PWEB5QB Apr 18 18:03:02 The source says Ḡ but when I do Jsoup.parse() the print shows the actual symbol Apr 18 18:06:24 anyone ever built a custom seekbar just using code/states to mod the existing one ? Apr 18 18:08:18 StingRay_: no, but I made a custom one using just View or something Apr 18 18:08:27 it was pretty simple (needed a vertical slider) Apr 18 18:08:46 yeah, I would have thought since I just want to replace visuals that it would be easy Apr 18 18:08:51 guess not :) Apr 18 18:10:11 I'd imagine it has theme attributes for different drawables Apr 18 18:10:34 Is there a fancy way to say "sending data over an HTTP POST request" ? Apr 18 18:10:52 well I wanted a code solution Apr 18 18:11:08 and it appears themes uses states that draw on fixed id's Apr 18 18:11:17 like slider + background Apr 18 18:11:41 neways, seems to be a dead in the water idea…reading on SO Apr 18 18:17:17 maslen: what are you really asking? Apr 18 18:18:09 maslen: webservice ;) Apr 18 18:18:52 evan: I have to describe it in a paper, and was wondering if there was a fancier name for it. Apr 18 18:23:07 this is annoying Apr 18 18:25:31 print of the ListView item shows {word=Ḡ, number=1} , but the word appears empty on device Apr 18 18:25:36 if you can see that G symbol Apr 18 18:25:52 Sure we can. Apr 18 18:26:02 Does the font maybe not support it? Apr 18 18:27:04 hmm Apr 18 18:27:12 I dunno Apr 18 18:27:20 havent changed fonts Apr 18 18:28:11 And I'm not sure what characters are supported :) Apr 18 18:28:13 do you know of any ROMs that have toasts that aren't click-through? Apr 18 18:29:13 I have this strange request to make my toast notifications click-through, and I'm pretty sure that's how toasts are by design, right? Apr 18 18:29:33 I'm just wondering if Sense or TouchWiz changed that or something? Apr 18 18:29:36 kakazza: I tried setting Ḡ in a textview in string.xml and it came out blank Apr 18 18:29:38 so you could be right Apr 18 18:30:07 pragma-: I've not yet seen a non-click-through Toast. Apr 18 18:30:50 pragma-: i test against a lot of devices and have never seen them not click through, though perhaps it's something i wouldn't notice. however if a window or view has a certain flag (FLAG_SECURE i think?) then it will be disabled while something else is drawn on top of it Apr 18 18:31:05 for example if there is a toast on top of the install app window, the INSTALL button will be disabled while the toast is showing Apr 18 18:31:13 Quacked: http://stackoverflow.com/a/5727423 Apr 18 18:32:45 I think thats the problem Apr 18 18:32:58 When I changed typeface I got a square instead of just blank Apr 18 18:34:59 thanks, kakazza Apr 18 18:41:32 anyone know the "normal" state to add to a statelist for edit text, eg state_focused …. state_default/normal ? Apr 18 18:43:19 ah, enabled does it :) Apr 18 18:48:20 Hello Apr 18 18:50:13 hello Apr 18 18:50:53 Can someone explain to me why my timestamps don't match what my code is doing? http://pastebin.com/MunWx9Uq Apr 18 18:53:12 ACTION_SCREEN_OFF starts an alarm that fires a notification after time has expired. The alarm time is written as " 25 seconds remaining". However, the Completed timestamp isn't 25 seconds later than the starting timestamp. The time span between the alarm starting & the notification is documented after "Completed". Apr 18 19:01:36 what would be the best way to goto previous activity in case of exception Apr 18 19:02:02 finish() Apr 18 19:02:22 specifically when previous activity got some data as intent extra from its predecessor Apr 18 19:02:31 ok, thanks lov Apr 18 19:02:36 will see into it Apr 18 19:05:08 code for above problem can be seen here: http://pastebin.com/RSxc7aVG Apr 18 19:08:33 Rescue9: I don't see you comparing timestamps in there - but in general, alarms are not guaranteed to fire at precise times Apr 18 19:09:47 so if you're comparing something like the milliseconds it *should* fire at, vs the milliseconds when it *actually* fires, it'll basically never be the same. Apr 18 19:11:44 do you have to edit a udev file to get USB adb to work on Linux? I seem to remember having it work out of the box, but maybe that was over TCP. can't remember... Apr 18 19:12:18 andkore: typically yes Apr 18 19:12:24 well Apr 18 19:12:32 you can also run the adb daemon as root Apr 18 19:12:35 I'm not worried in milisecond differences. I'm worried because it's a good number of seconds off each time. Apr 18 19:12:40 but that's not recommended, for obvious reasons :) Apr 18 19:12:45 right Apr 18 19:13:18 don't see any devices on root either Apr 18 19:13:38 oh nm Apr 18 19:13:46 had to restart the adb server. duh Apr 18 19:14:05 groxx: for example... look at line 19. The completed statement was stamped 9.609 seconds after the alarm was started. however, the alarm was supposed to fire 20 seconds later (not 9) as per line 18 Apr 18 19:23:47 hey guys Apr 18 19:24:32 will the onDestroy method called if a application crash? Apr 18 19:28:11 no Apr 18 19:29:45 Rescue9: sorry, not sure. I haven't dealt with alarms yet :/ Apr 18 19:30:09 not finding anything immediately enlightening either Apr 18 19:30:12 Hmmm.... the funny thing is that it's doing kindof what I want.... just not what I want. Apr 18 19:31:36 maybe this is the same thing? http://stackoverflow.com/questions/10865691/alarmmanager-triggers-pendingintent-too-soon (change flag_update_current to flag_cancel_current) Apr 18 19:33:02 didn't see that one groxx. I tried googling last night but didn't find anything. I'll give that a try. Thanks man Apr 18 19:33:58 groxx: did you get your resource issue worked out? Apr 18 19:37:17 hiho anyone have good android custom listview tutorial? Apr 18 19:38:21 So if form data for POST is this: MC=1&X2f1=tm&X2ssy=S%F8k+Synonym&X2f2= .. can that be used as a direct url somehow? Apr 18 19:39:07 evan: no luck. adding a 3rd XML file magically fixes it, but I'm hanging onto that branch of code so I can keep investigating. Apr 18 19:39:14 I want to type it directly into the address field Apr 18 19:40:55 evan: I did find a strange coincidence though - in the resources.arsc file, the rounded_teal_button_normal drawable (that won't draw) is the first entry. In all other instances, it's not, and it's something else that we don't use (ActionBarSherlock styles, for instance). Possibly this is a normal / frequent occurrence, but we never noticed. Possibly it's entirely unrelated - I'm grabbing at straws. Apr 18 19:42:03 Nevermind, I don't need it Apr 18 19:43:47 My string is ™, but when I do httpClient.execute(httPost, resHandler) I get no response. Any ideas? Apr 18 19:44:18 I see on the site that it uses %99 if the search is for ™ Apr 18 19:45:36 I tried setEntity to include utf-8, but that didnt help Apr 18 19:48:15 here is my http request: http://pastebin.com/Cf0jZ2BJ Apr 18 19:51:11 Quacked: maybe capitalize 'utf-8'? Apr 18 19:53:01 and / or maybe org.apache.http.protocol.HTTP.UTF_8 is more proper. These are not really informed ideas, though :) Apr 18 19:55:07 actually yeah - try HTTP.UTF_8. it's in the same set of constants as the DEFAULT_CONTENT_CHARSET which is used if you don't include the encoding. Apr 18 19:57:27 onSaveInstanceState() is called only when the syatem have to quickly shut down app ? Apr 18 19:58:03 bluesm: it's called all over the place, including e.g. when you rotate the device. Apr 18 19:58:26 grog: ill give it a go in a minute.. thanks Apr 18 20:00:38 groxx: so why we use it to assign something to Bundle object? Apr 18 20:01:55 bluesm: I'm not quite sure what the question is... Apr 18 20:03:19 hi Apr 18 20:03:40 i have a dobut abous Messages to communicate activity<-> service Apr 18 20:03:47 i want to send about 12 strings Apr 18 20:03:50 how can i do it? Apr 18 20:04:29 all in an objecT? Apr 18 20:04:44 by service, do you mean service over internet? Apr 18 20:04:48 or internal service? Apr 18 20:04:55 groxx: To save additional state information for your activity, you must Apr 18 20:04:56 implement onSaveInstanceState() and add key-value Apr 18 20:04:56 pairs to the Bundle object Apr 18 20:04:57 local service Apr 18 20:05:16 i use the Messenger and send messages Apr 18 20:05:42 I would imagine you could just save them as public static strings I guess Apr 18 20:05:42 groxx: why here if i could done this in onPause or onDestroy? Apr 18 20:05:47 and i am waiting this function: obtain(Handler h, int what, int arg1, int arg2, Object obj) Apr 18 20:06:14 Maybe on onStopped Apr 18 20:06:43 why are you using Object explicitly? That's usually bad style Apr 18 20:06:58 who? Apr 18 20:07:13 ok well is anyone here familiar with the stock launcher's source code? Apr 18 20:07:17 you, in the fnction you pasted Apr 18 20:07:24 Cause I ran into a huge problem on it I can't fix Apr 18 20:07:39 bluesm: you add things there so you can recreate the Activity if it gets destroyed. This can happen if you leave the app, or rotate it, or slide open the keyboard, or a large number of other cases. Views are generally handled for you, but not things like instance variables. Apr 18 20:07:45 i am asking only Apr 18 20:08:00 i need to send a message that contains about 12 strings, and i am asking wich is the best form Apr 18 20:08:04 the best way* Apr 18 20:08:48 joker_89: probably .obtain with an ArrayList of your strings. Apr 18 20:09:12 groxx: i do understand. But i wonder why here. Not in onStop. Apr 18 20:09:16 Yeh, I was gonna say, you should probably just array it Apr 18 20:10:36 Ok so is anyone here familiar with the stock launcher's code? Apr 18 20:11:30 bluesm: at least partially because onStop isn't guaranteed to be called in older Android versions - the app can be killed after onPause. Apr 18 20:12:44 bluesm: http://developer.android.com/reference/android/app/Activity.html has some more details. you should read it if you haven't, it's important stuff. Apr 18 20:14:08 c.close() called in function loadWorkspace causes custom launcher program to crash. Anyone have any ideas? Apr 18 20:14:40 Hello :) Apr 18 20:14:46 hi Apr 18 20:15:03 What's up hetti? Apr 18 20:15:41 I use ArrayAdapter with android.R.layout.simple_dropdown_item_1line My issue is that the suggestion are almost white and its very hard to see them Apr 18 20:15:47 How can i fix it Apr 18 20:15:48 ? Apr 18 20:16:23 That's a good question, unfortunately I don't even know what a suggestion is. Apr 18 20:17:04 Are you referring to a list item? Apr 18 20:17:28 leor: I would assume that they mean sugguestion as a recoloring of a text string to make it noticeable Apr 18 20:18:13 Suggestion is a string that comes from http request throught json and then you can select it to put into MultiAutoCompleteTextView Apr 18 20:19:10 hmmm.... wouldn't know. I never had an issue with text color, and I never touched any themes. Apr 18 20:19:58 Neither have I, and I never use json, so I can't help ya there Apr 18 20:20:08 this is more or less what i have http://pastebin.ca/2361970 Apr 18 20:20:32 i found this bug : http://code.google.com/p/android/issues/detail?id=5237 Apr 18 20:20:50 but those fixes as i try don`t help me. Apr 18 20:21:12 Are there any knows issues with trying to inflate a custom layout from within a DialogFragment? Apr 18 20:21:34 leor: not really Apr 18 20:21:38 grog: HTTP.UTF_8 didnt help Apr 18 20:24:27 Have you tried switching out the list_item for the dropdown_item? Apr 18 20:25:17 StringRay_, is there any reason the class does not allow a context? How do you get a layoutinflater if the savedInstanceState is null? Apr 18 20:25:22 you mean use the android.R.layout.simple_list_item_1 ? Apr 18 20:26:01 Yeh Apr 18 20:26:08 My string is ™, but when I do httpClient.execute(httPost, resHandler) I don't get the correct response. Any ideas? here is my http request: http://pastebin.com/Cf0jZ2BJ Apr 18 20:27:19 Kdog59: yes i try and the result is still the same, The color of the text is white and cannot see them Apr 18 20:27:22 I know it sounds stupid, but many times it's the stupid things that make all the difference in coding Apr 18 20:28:36 can you put res/layout/simple_dropdown_item_1line.xml on pastebin? Apr 18 20:28:51 Cause I think there might be a variable in there that is screwed up Apr 18 20:33:54 Kdog59: http://pastebin.com/KESHxjrh Apr 18 20:35:07 its from android sdk Apr 18 20:36:43 did you get this out of res/any/layout/simple_spinner_item.xml? Apr 18 20:36:46 hetii: just set the test color to what you want Apr 18 20:36:57 when your setting the value Apr 18 20:37:21 myTextView.setText(value); myTextView.setTextColor(col); Apr 18 20:37:28 ? Apr 18 20:37:57 StringRay_: Hey Sting, you know anything about the stock launchers code? Apr 18 20:39:17 Kdog59: i click in eclipse with ctrl into last part of android.R.layout.simple_dropdown_item_1line, and it show me this file Apr 18 20:39:49 is there any way to do this sort of thing in the xml layout files ? android:text="hello"+ "@string/focus" Apr 18 20:40:02 StingRay_: the text color in MultiAutoCompleteTextView is ok, Apr 18 20:40:10 the white is in suggestion list Apr 18 20:40:30 oh, well that has an adapter right ? Apr 18 20:40:39 yep Apr 18 20:40:48 and that adapter has a getView ? Apr 18 20:40:49 ok well I can't seem to find the problem, but the paste had something saying it was from a whole different file Apr 18 20:41:07 you can do what you want in getView Apr 18 20:41:11 or bindView Apr 18 20:41:17 based on whatever adapter it is Apr 18 20:42:07 StingRay_: here is my code so you can see what i use http://pastebin.ca/2361970 Apr 18 20:42:39 hetii: "Sorry, it appears that Pastebin.ca is having some technical difficulties at the moment." Apr 18 20:42:42 thats all i get :) Apr 18 20:42:53 oh Apr 18 20:43:20 Gaz`: no Apr 18 20:43:31 quick question, why do you seem to alternate between pastebin.ca and pastebin.com? Apr 18 20:43:32 StingRay_: http://pastebin.com/6TewfLqW Apr 18 20:44:35 groxx: ok thank you very very much Apr 18 20:44:35 thx evan Apr 18 20:44:59 hetii: yeah, well either do your own layout Apr 18 20:45:00 or Apr 18 20:45:14 aAdapter.getView() <--- override and do what you want Apr 18 20:46:48 but fyi, thats a horrid way to do autocomplete Apr 18 20:46:50 can someone help me with a F/C problem on a custom launcher? Apr 18 20:47:19 StingRay_: What is a good way ? Apr 18 20:47:53 Is it possible to somhowe fix the android xml for this list ? Apr 18 20:47:56 well not creatiing a new adapter for every change is a start Apr 18 20:49:37 well in some point you have right, i should update it instead creating new. Apr 18 20:51:27 even if you follow the stock autocomplete tut on d.android.com it's a good start Apr 18 20:55:03 hello Apr 18 20:55:17 my android emulator won't rotate to landspace.. the rotate button doesn't work Apr 18 20:55:48 landspace Apr 18 20:57:04 StingRay_: i check the stock autocomplete there but they use array that are based in resource list Apr 18 20:57:07 JakeWharton: Hello Jake, why when i call "invalidateOptionsMenu()" using a OptionsMenu with a expanded item, the new created options menu keeps the item expanded? (I'm using ActionbarSherlock). Apr 18 20:57:34 because menu items keep state Apr 18 20:57:40 the native action bar does this Apr 18 20:58:59 ufk: has it worked in the past? Apr 18 20:59:05 no Apr 18 20:59:25 so menu.clear() does not affect that? The strange thing is that i call call collapseActionView() it does not collapse Apr 18 20:59:41 ufk: are you using the right button? it's a bit esoteric: http://developer.android.com/tools/help/emulator.html#KeyMapping Apr 18 20:59:47 i'm just wondering why i can't rotate my emulator Apr 18 21:00:00 ufk: not hitting the right key? Apr 18 21:01:10 there's a key? Apr 18 21:01:15 there are buttons on the right side of the emulator Apr 18 21:01:39 oh, must be some fancy new stuff i haven't looked at Apr 18 21:01:44 used to have to hit some key combo Apr 18 21:01:58 ufk: they don't rotate the emulator. try control key + F11 Apr 18 21:02:18 or ctrl + F12 Apr 18 21:02:45 hetii: I'm affraid to say if you cant really mod that to what you want, you should do some java tutorials Apr 18 21:02:54 i'm on a mac f11 f12 does other things :( Apr 18 21:03:02 JakeWharton: is there some way to make it collapse on invalidateOptionsMenu()? Apr 18 21:03:06 hold the FN key too Apr 18 21:03:18 cool!!!! Apr 18 21:03:18 ufk: not if you set options to be FUNCTION keyes Apr 18 21:03:19 thanks Apr 18 21:03:23 paulovap: change the ID Apr 18 21:03:27 np :) Apr 18 21:03:42 have a nice day Apr 18 21:03:47 or night :) Apr 18 21:03:51 StingRay_: well i like to know what i change and for what :> Apr 18 21:04:06 my point exactly Apr 18 21:05:21 JakeWharton: thank you, i will look into that! Apr 18 21:08:01 Hmm, I read on various blogs that 9 patch graphics only scale up, not down, causing unwanted effects if they are very high res and Android tries to use them on say, ldpi or mdpi. (Romain Guy also wrote that scaling 9patches causes unwanted behaviour.) Apr 18 21:08:25 Is there any official source for this? I could not find it (or missed it) in the 2D Graphics article on android.com Apr 18 21:09:45 kakazza: well all my 9patches are minimum size Apr 18 21:10:00 I think thats the prob with many people, they do them a little large Apr 18 21:10:18 when the details and/or excluded scale details are actually small Apr 18 21:19:51 kakazza: what were these, unwanted effects ? Apr 18 21:19:58 out of interest Apr 18 21:20:19 since I scale 6x6px to full device resolution sometimes Apr 18 21:23:04 why/how would you scale a 9-patch down? Apr 18 21:23:33 Not my app. I don't do graphics. Apr 18 21:24:04 A friend showed me on his ldpi device. His fist mistake was putting them in -hdpi/, putting them in drawables/ made it a bit better. Apr 18 21:24:06 birbeck: well you would have a scaled / smaller version Apr 18 21:24:17 He has details on the unscaled parts of the 9patch. Apr 18 21:24:20 for many reasons Apr 18 21:24:24 It's not just a background. Apr 18 21:24:24 if the 9-patch is density independent, make it as small as possible including any margin or padding Apr 18 21:24:47 same applies for density dependent ones, just follow standard rules for spacing Apr 18 21:26:11 unless you are making them for each density, design then at mdpi and put them into drawable-nodpi Apr 18 21:26:30 Is nodpi different from just drawables/ Apr 18 21:26:32 ? Apr 18 21:26:38 not really Apr 18 21:26:42 drawable/ is mdpi Apr 18 21:26:48 but only xml should go into drawable Apr 18 21:26:50 So yeah, there's a difference Apr 18 21:27:08 So 9patches go into mdpi? Since the guide says to put them there. Apr 18 21:27:12 -nodpi is a classifier to tell the system that it is density independent Apr 18 21:27:18 only xml should go into drawable ? Apr 18 21:27:44 yes Apr 18 21:27:47 StingRay_: yeah. mdpi drawables should go in drawable-mdpi Apr 18 21:28:16 hang on, BUT… if no qualifier is found in any other folder… it chooses nearest ? Apr 18 21:28:22 It doesn't matter if you put them in drawable/ or drawable-mdpi/ .. But it makes it easier to manage if you put xml in drawable/ and png's in drawable-mdpi/ Apr 18 21:28:30 StingRay_: sorta Apr 18 21:28:43 And .9.png goes into drawable/ aswell? Apr 18 21:28:47 No Apr 18 21:28:48 ldpi will actually use xhdpi since it scales .5 Apr 18 21:29:14 9-patches either go in -mdpi, -hdpi, -xhdpi, ... or in -nodpi Apr 18 21:29:24 I'd imagine most ldpi are too old to know about xhdpi, but not sure :p Apr 18 21:29:26 https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch " It must be saved with the extension .9.png, and saved into the res/drawable/ directory of your project." Apr 18 21:29:46 kakazza: the first part is right :) Apr 18 21:29:54 documentation bug Apr 18 21:30:09 And where can I find the correct doc, then? There must be a source to this knowledge/ Apr 18 21:31:13 put the one designed for xhdpi into xhdpi, the one for hdpi into hdpi, and so on Apr 18 21:31:25 just follow the simple rule of only xml in drawable, density dependent drawables in the respective classifiers, non-density dependent images in -nodpi Apr 18 21:31:51 it doesnt matter if it is .9.png or .png, it either is density dependent or not Apr 18 21:31:51 if you rely on the framework to do the scaling, which is fine to rely on, then make sure the strechable regions are appropriately sized to be scaled. for example 1 pixel at xhdpi scaled down to ldpi might not exist Apr 18 21:32:02 so make sure to use 2 or 3 pixels for the stretchable region Apr 18 21:33:20 great more confusion Apr 18 21:33:28 That doesn't seem to be well documented then. Apr 18 21:33:34 cause I thought 9patch scale down was pixel binning Apr 18 21:34:02 Like any other drawables, you should supply for mdpi, hdpi and xhdpi Apr 18 21:34:07 Just cus scaling sucks Apr 18 21:34:15 heh Apr 18 21:34:20 with a 9-patch, you specify the regions that can _stretch_ not _shrink_ Apr 18 21:34:30 I have not yet seen an FOSS app using -nodpi. Do you guys use it? Apr 18 21:34:30 you would never scale one down Apr 18 21:34:51 this conversation is getting out of wack with my brain Apr 18 21:35:04 all my 9patches look nice Apr 18 21:35:15 but, that doesnt apply to densities. its perfectly legal to design evertyhing at -xhdpi and let the os scale it, including 9-patches.... though not a GOOD practice Apr 18 21:35:16 the scale areas are none detailed Apr 18 21:35:36 kakazza: yes, i use it Apr 18 21:36:08 kakazza: all Google apps use it also Apr 18 21:36:08 For? Apr 18 21:36:12 It can work, sure.. But the result is better if you scale it in photoshop, and fix it up before saving Apr 18 21:36:43 kakazza: its a rare need, but for background images, etc, that you do not want to be scaled. perhaps because you are doing the scaling yourself Apr 18 21:37:07 Hmm, ok. Guess I'd have to see it in use. Apr 18 21:38:04 StingRay_: i put such changes: http://pastebin.com/r08jYCpi Apr 18 21:38:55 But now its my suggestion work strange, sometimes i got unexpected items in my list, somtimes i cannot select item from list Apr 18 21:38:57 etc... Apr 18 21:39:45 My string is ™, but when I do httpClient.execute(httPost, resHandler) I don't get the correct response. Any ideas? here is my http request: http://pastebin.com/Cf0jZ2BJ Apr 18 21:41:58 Quacked: you may need to notify your adapter that the list has changed. also i would recommend keeping a reference to the asynctask in progress so you can cancel it Apr 18 21:42:16 you could have a race condition there if a new request finishes before a old one Apr 18 21:43:01 hetii: you should follow the d.android.com tutorial Apr 18 21:43:10 oh oops, i didnt see the notifyDataSetChanged() there Apr 18 21:43:24 StingRay_: with point ? Apr 18 21:43:41 and read tutorial on async Apr 18 21:43:51 :) Apr 18 21:44:00 point of your posting on the ui from doInBackground Apr 18 21:44:04 lov, got a sec? Apr 18 21:44:20 and the d.android.com autocomplete is 95% what you want Apr 18 21:44:22 :) Apr 18 21:45:26 lov lov lov Apr 18 21:46:23 lov is all you need. Apr 18 21:47:06 birbeck: its not possible to start a new one before old is complete Apr 18 21:47:10 where do you define the drop shadow of a DialogFragment? Apr 18 21:47:31 Quacked, are you using EntitiyUtils.toString() on the response object? Apr 18 21:47:54 nah, the response object is a string since I use BasicResponseHandler Apr 18 21:48:42 ahh i see Apr 18 21:50:38 birbeck: was that meant for hetii btw? Apr 18 21:54:45 every google hit says to use httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs, "UTF-8")); Apr 18 21:54:49 and thats what Im doing Apr 18 21:57:09 how do you keep an html element the same size in the same position when the user zooms in or out Apr 18 21:57:31 so basically regardless of whether or not the user zooms, i want a "home" button on the browser page Apr 18 21:57:49 a button that will stay put , not resize, and look the same no matter what Apr 18 21:57:58 on android browsers Apr 18 21:58:16 lov, let me knwo when i can pm you -_- Apr 18 21:58:20 yea i know this channel is mostly google koolaid/android sdk but whatever it's still an android dev question lol Apr 18 21:58:31 I'm trying to add my first jar to an android app (aws-java-sdk-1.4.1). When I place this file in my eclipse /libs dir, add it to the build path, Eclipse hangs when trying to run the app in the emulator. When I remove it, all is well. What am I missing? Apr 18 22:00:05 Protip: ADT automatically picks up jars in libs/ Apr 18 22:01:34 SimonVT: in this case, I think it's the jar itself that is causing the issue. But it's my first one. Apr 18 22:02:03 SimonVT: I actually tried it with and without adding it to the build path. Both made eclipse hang. Apr 18 22:03:34 I doubt that AWS has made a bad jar. It's probably something I'm doing. Anything obvious I've done? Apr 18 22:06:08 can anyone recommend a simple jar that I can try to add to see if it's just the was jar or if it's some local config issue? Apr 18 22:12:19 benlieb: jsoup Apr 18 22:19:20 screw it Apr 18 22:19:50 spent too much time on this little bug :P Apr 18 22:21:20 huh, why would intel announce html5 tooling Apr 18 22:21:47 intel.com, best viewed with an Intel CPU. Apr 18 22:22:19 s/optimized for internet explorer/optimized for intel/ Apr 18 22:22:30 no, for iOS / Android / WP8 Apr 18 22:22:35 how do I redirect domain to 192.168.1.2 ? Apr 18 22:22:38 among others Apr 18 22:22:50 on HTC Desire Apr 18 22:22:54 rooted Apr 18 22:24:28 I cannot edit /etc/hosts Apr 18 22:24:32 read only fs Apr 18 22:24:47 hey guys Apr 18 22:25:03 I got some help yesterday but was unable to find a match within my codebase Apr 18 22:25:23 my problem is...my app had a search button. But the server's search changed and so the app's search results broke Apr 18 22:25:35 dokma: have you run 'adb remount' before trying to edit it? Apr 18 22:25:39 I just decided to hide the search button until I get a better fix Apr 18 22:26:06 groxx: no I just tried mount -o rw,remount / Apr 18 22:26:12 however, some devices apparently have a search button. And also some devices let you hold down the menu button to apparently send a search button keypress Apr 18 22:26:13 dokma: adb setprop Apr 18 22:26:16 yo Apr 18 22:26:16 not hosts Apr 18 22:26:22 I didn't know this. So apparently, some people hit that and the search still comes up Apr 18 22:26:31 I was told to look for onKeyDown and KEYCODE_SEARCH Apr 18 22:26:40 but I couldn't find those in any of the .java files in the project Apr 18 22:26:42 * kaneda^ pokes lov Apr 18 22:26:53 FernandoMiguel: let me dig out what exaclty I need to do with it Apr 18 22:33:58 how do I check to what ip a domain will resolve to in a HttpClient POST request? Apr 18 22:35:17 dokma, why can't you remount r/w? Apr 18 22:35:31 zener-corruptor: I did Apr 18 22:35:37 that is ok now Apr 18 22:35:38 ProgramMax: you can override the onKeyDown method Apr 18 22:35:41 and you still can't edit the hosts file? Apr 18 22:35:43 now I need to resolve a domain to an ip Apr 18 22:35:49 I can Apr 18 22:35:50 and I did Apr 18 22:36:04 now I just want to verify from the app that the domain resolves to the given ip Apr 18 22:36:14 look at what is returned! Apr 18 22:36:26 I don't have an onKeyDown method Apr 18 22:36:30 from what? Apr 18 22:36:32 use a web browser, whatever Apr 18 22:36:45 ahh... good idea Apr 18 22:36:45 I see something ihe manifest file... android.app.default_searchable Apr 18 22:37:32 kaneda^: I've got like 5 minutes Apr 18 22:39:50 hey, has anyone used codenameone ? Apr 18 22:39:58 I was wondering if it was possible to do OGL development in it Apr 18 22:40:04 are you using onSearchRequested ? ProgramMax Apr 18 22:40:49 oh, I do see a "onSearchRequested" Apr 18 22:41:04 inside a onComplete Apr 18 22:41:26 and also inside a onCreateView Apr 18 22:41:41 ahhhh yeah, here it is Apr 18 22:41:56 perfect. Thank you :D Apr 18 22:42:09 :) Apr 18 22:43:48 SearchManager foo = (SearchManager)getSystemService(Context.SEARCH_SERVICE); Apr 18 22:44:39 not sure if there might be some chunk of code I can just comment out for now Apr 18 22:44:42 we'll see Apr 18 22:46:35 I sometimes see foreign apps og google play that are unusable without knowing the language. Why dont they just publish it for their own country? Apr 18 22:46:42 s/og/on Apr 18 22:47:39 Are they region specific apps (like a train station app) or are they just in another language? Apr 18 22:47:58 probably just in another language Apr 18 22:48:16 Probably why then :) Apr 18 22:48:22 :P Apr 18 22:48:49 Just wondering whether to publish this crossword helper global when its only in one small language Apr 18 22:49:48 Probably blanket just clicked away like a mad man. :P Apr 18 22:50:04 huh? Apr 18 22:50:35 Sorry started to say something else, didnt mean to put blanket in there Apr 18 22:50:42 :D Apr 18 22:51:47 hrmm, strange... Apr 18 22:51:58 I double click AndroidManifest.xml in eclipse, it opens Apr 18 22:52:04 I remove that searchable stuff from it Apr 18 22:52:17 save it Apr 18 22:52:26 but git isn't noticing a difference in the file? Apr 18 22:52:33 Is that actually saved elsewhere or something? Apr 18 22:52:53 Did you save the file? Apr 18 22:53:16 did you commit the file with the searchable stuff in it? Apr 18 22:53:21 hrmm thought I did...I ran the app, it asked me to save, I saved it and saw a difference Apr 18 22:53:26 I think I actually had two tabs open at once Apr 18 22:53:29 of that manifest Apr 18 22:53:40 it saved when I ran the app, but the second tab...maybe I saved it later Apr 18 22:53:47 just opened it back up and the file was the original Apr 18 22:53:54 changed again and git sees the difference Apr 18 22:54:12 We helped with just our presence alone :P Apr 18 22:54:40 Indeed :D Sorry for making you a cardboard programmer. But I appreciate it Apr 18 22:55:54 I've added a jar to my app, and it compiles and runs in eclipse, but in the emulator I get a java.lang.NoClassDefFoundError. Why can the class be found by Eclipse but not android? Apr 18 22:57:53 put the jar in your libs folder Apr 18 22:58:43 You guys are very helpful. Thank you :) Apr 18 22:59:21 bankai_: it's in there. Apr 18 23:03:07 did you guys read the other day, that android was originally meant for cameras ? Apr 18 23:03:12 O.o Apr 18 23:03:14 Is this normal behavior. Did I miss something? Apr 18 23:03:58 g00s yes, but it was its original concept idea, not actually in fruition at that time. Apr 18 23:04:38 its funny now that, some cameras are coming with android Apr 18 23:04:57 from cursory use, I'm pretty impressed with facebook's chatheads Apr 18 23:05:18 I like it a lot, if you use facebook chat as a common mode of communication Apr 18 23:05:26 pfn: I agree Apr 18 23:05:38 I was very impressed that something like that came from facebook Apr 18 23:07:00 every big company's bound to have great talent Apr 18 23:07:10 I'm not surprised, I'm more surprised that no one has designed something similar sooner Apr 18 23:07:28 I like it, but it's facebook.. so practically useless for me, and many others. Apr 18 23:07:40 Come out with an sms app that does that (that isnt as ugly as ninja sms) and then we can talk Apr 18 23:07:47 I rarely sms Apr 18 23:07:51 I usually gtalk Apr 18 23:08:04 I whatsapp Apr 18 23:08:12 I have whatsapp, too, also rarely used Apr 18 23:08:21 Shady SMS is convenient Apr 18 23:08:32 I'm close to my sms app release Apr 18 23:08:34 :) Apr 18 23:08:43 StingRay_: tell us more :) Apr 18 23:08:44 I only use google voice for sms Apr 18 23:08:52 so all sms apps are useless for me :-/ Apr 18 23:09:12 I would like google to make sms + all the other chat aps they have, and put them together.. but babel doesnt appear to be so Apr 18 23:09:15 it does rules boxes, gdrive integration, designed by me, custom themeable, regex rule matches etc Apr 18 23:09:16 loads Apr 18 23:09:21 I use default sms app for the rare occasion somebody doesnt have whatsapp Apr 18 23:09:28 full AES Apr 18 23:09:39 retains ownership of files Apr 18 23:09:54 uses data to send attachments rather than mms Apr 18 23:09:57 erm Apr 18 23:10:04 loads more that I just cant remember Apr 18 23:10:04 fun Apr 18 23:10:24 gdrive int to store conversation? Apr 18 23:10:32 oh and another biggy Apr 18 23:10:37 I use SMS and E-Mail, because I know only two people using WhatsApp Apr 18 23:10:38 it's left or right handed Apr 18 23:10:49 single hand operation Apr 18 23:10:49 I dont get why people use whatsapp... Apr 18 23:10:52 kakazza: yeah, it varies a lot Apr 18 23:10:57 Most sms are included, and unlimited. Apr 18 23:11:00 sms plans* Apr 18 23:11:01 I use gtalk and twitter Apr 18 23:11:05 Delvien: specially given their practices Apr 18 23:11:09 G pliznuss Apr 18 23:11:14 and the law suites Apr 18 23:11:36 Delvien: better image quality than in sms, group chat is possible (major plus), got alot of emoticons that look the same for everybody Apr 18 23:11:55 man, lockscreen widgets are the best thing ever Apr 18 23:12:09 but it uses data.. which is argueably more expensive than sms. Apr 18 23:12:22 pfn: if only it was possible to have more than one on every page.. like widget locker has done for a long time Apr 18 23:12:24 Maybe where you live. Apr 18 23:12:31 Delvien: here most people also have data plans Apr 18 23:12:42 Quacked, make your own widget host that hosts other widgets? Apr 18 23:12:51 :p Apr 18 23:12:54 Yes, same, but more data you use, the more $ it can cost :P Apr 18 23:13:16 Delvien: messaging doesnt take much data though Apr 18 23:13:19 I use IRC Apr 18 23:13:27 shmooz: Cool, what's that? Apr 18 23:13:33 :p Apr 18 23:13:45 its not for little boys, never you mind ;) Apr 18 23:14:31 I've been avoiding HYPE since ICQ came out Apr 18 23:14:57 avoided ICQ AOL Yahoo AIM MSN MySpace FaceBook and Twatter Apr 18 23:15:19 Quacked IDK, i just dont see the benefit over sms , how often does someone group chat :P Apr 18 23:15:26 and I don't feel I missed a thing Apr 18 23:16:05 Delvien: I discuss crap with a bunch of people all the time in group chat Apr 18 23:16:07 shmooz twitter is alright.. the others... i agree Apr 18 23:16:16 Delvien: I even have a group chat for my family :P Apr 18 23:17:36 its also completely free on wifi if youre roaming in a different country Apr 18 23:17:43 where sms is insanely expensive Apr 18 23:17:51 I'm an american, I dont travel :P Apr 18 23:17:58 hah Apr 18 23:21:13 hmm.. I followed an example for a httpclient.execute(httpPost, reshandler) where it catches two different exceptions and set boolean error = true; and cancel(true); in both of these. But why is there an if (error) in onPostExecute? I don't see how that can be reached. Apr 18 23:22:12 hi Apr 18 23:22:36 how can i have a local service in another thread without uisng an intent service? Apr 18 23:22:46 because my service is always running in background Apr 18 23:23:16 have a service and do stuff in a thread Apr 18 23:23:34 create a thread? Apr 18 23:24:20 that's annoying, the camera lockscreen widget can't be removed? Apr 18 23:24:36 joker_89, huh? if you need background work, you need a thread Apr 18 23:24:59 but the thread is a service Apr 18 23:25:11 na Apr 18 23:25:36 no, threads are irrelevant to services Apr 18 23:25:46 orthogonal, rather Apr 18 23:25:51 so before create my service Apr 18 23:25:56 i need to create a thread Apr 18 23:25:58 services are lifecycle containers, any lifecycle methods run on the main thread Apr 18 23:26:09 if you want your service to do stuff in the background, you have it do it in a thread Apr 18 23:26:39 and direct calls you make to it, either via binder or intents, they all run on the main thread Apr 18 23:26:56 i use binder and the Messages for communication Apr 18 23:26:59 unless you spawn off an async task explicitly Apr 18 23:27:14 pfn: https://play.google.com/store/apps/details?id=com.wordpress.chislonchow.deviceadminkeyguard&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS53b3JkcHJlc3MuY2hpc2xvbmNob3cuZGV2aWNlYWRtaW5rZXlndWFyZCJd Apr 18 23:27:21 and finally i can close my activity and reopen as a singleton activity Apr 18 23:27:35 is there any option to say that a activity is a singleton? Apr 18 23:27:54 a singleton in what sense Apr 18 23:28:02 you can specify your task is SINGLE_TASK or SINGLE_TOP or whatever Apr 18 23:28:47 i open my activity and then the actvity binds to the service. then i destroy my activity and the service is running (like whatsapp), and i create a new activity and bind to the service Apr 18 23:29:55 what's that have to do with singleton Apr 18 23:30:07 with singleTop? pfn Apr 18 23:30:26 Quacked, thanks for the link Apr 18 23:31:24 Quacked, I like having the camera widget in any case Apr 18 23:31:36 able to take pictures fast is a plus Apr 18 23:32:56 I agree Apr 18 23:33:18 I have my camera to the right and my own countdown timer to the left :P Apr 18 23:33:28 speedy access to time my pizzas :D Apr 18 23:34:10 countdown timer? Apr 18 23:34:15 I'd like a stopwatch widget on the lockscreen Apr 18 23:34:41 its only counting down :P Apr 18 23:34:50 starting countdown timer thats shown in notification list Apr 18 23:34:58 I'd like one that can either count down or up Apr 18 23:35:03 i don't know how to run a service in a new thread Apr 18 23:35:14 the service itself does not run in a new thread Apr 18 23:35:26 pfn: https://lh4.ggpht.com/Nukk8cRqFMn0PGeXJR2Soy5p55XE6IRH5Xncp06GuOycRG2lbU6CKbHWVIBe_MhhTA=s0 Apr 18 23:35:32 the calls to your service should be explicitly started on a new thread by the service Apr 18 23:35:43 what :S Apr 18 23:36:38 pfn: what would you use stopwatch for? Apr 18 23:36:52 Timing stuff? Apr 18 23:37:08 SimonVT: hehe.. Im wondering what HE would use it for Apr 18 23:37:10 what else do you normally use stopwatches for Apr 18 23:37:14 timing what :P Apr 18 23:37:19 I'm using it to time my espresso shots currently Apr 18 23:37:31 aha Apr 18 23:37:52 I'm thinking about making a sound-based timer Apr 18 23:38:11 beeping on certain intervals? Apr 18 23:38:16 no Apr 18 23:38:56 what then? Apr 18 23:39:13 it starts when it hears the pump start? Apr 18 23:39:49 hehe Apr 18 23:39:50 funn Apr 18 23:39:55 funny* Apr 18 23:40:24 ok..whats a good date time picker lib ? Apr 18 23:40:59 I'm looking for consistancy across versions Apr 18 23:41:38 I use SimonVT's numberpicker for picking hours and minutes Apr 18 23:41:42 My UI colors are fucking awesome :) Apr 18 23:41:45 you can just add a row of date as well :P Apr 18 23:41:49 only a blind person could respect it ;) Apr 18 23:42:21 I just swallowed my tongue Apr 18 23:42:58 NumberPicker can display strings instead of numbers.. You just get a number when you request the value Apr 18 23:44:11 so numberPicker is just the spinny thing ? Apr 18 23:44:26 so I would just use a few of them for date time whatever ? Apr 18 23:44:40 https://developer.android.com/guide/topics/ui/controls/pickers.html Apr 18 23:44:49 well now i create a thread and bind the service... Apr 18 23:44:58 but if i want to stop my service? Apr 18 23:45:04 anyone know much about webviews? I'm getting some really weird behaviour. About 2 mins after loading a url, shouldOverrideUrlLoading gets called with "about:blank" as the url. I don't *think* the page is actually doing this, can't find any javascript which might be causing that. Any ideas? Apr 18 23:52:38 Quacked, detecting the sound the machine is making and starting the timer based on the different sounds being emitted Apr 18 23:53:07 neat Apr 18 23:53:35 are there any apis for matching sounds? Apr 18 23:53:44 I don't think so Apr 18 23:53:58 but basically, the goal is to support vibe pump espresso machines Apr 18 23:54:00 since that's what I have... Apr 18 23:54:26 I use nespresso, hehe Apr 18 23:54:37 I dont want to use more time than that on my coffee :P Apr 18 23:54:49 shazam it! Apr 18 23:54:55 pragma-, basically Apr 18 23:55:03 pragma-, but a little more application-specific Apr 18 23:55:32 Quacked, takes a few minutes to produce a shot with care... sure Apr 18 23:55:45 I'm not much a fan of nespresso Apr 18 23:55:53 50c per nespresso cup @ 5g is rather steep Apr 18 23:55:57 didnt think you would be, having a real espresso machine Apr 18 23:56:19 yeah, its a bit steep.. but soooo convenient.. hee Apr 18 23:56:29 I dont brew regular coffee anymore either Apr 18 23:56:35 such a hassle :P Apr 18 23:56:35 interesting idea :) is the machine noisy? seems like you could just detect volume-pressure-level and start the timer on a sharp increase. Apr 18 23:56:40 when I can buy boutique coffee beans for something like $18/340grams Apr 18 23:57:00 groxx, it's "noisy" but it has a particular sonic signature at varying points of coffee extraction Apr 18 23:57:07 hi Apr 18 23:57:32 what type of service i need to run my gps and do some calculations and then send to my activity? Apr 18 23:57:35 pfn: fun project. I wish you luck! Apr 19 00:01:09 groxx, Quacked http://www.youtube.com/watch?v=_wn4mFwMvSo Apr 19 00:01:25 example of the sound signature changing from first turning the lever up vs. coffee beginning to extract Apr 19 00:01:48 and of course, every machine is somewhat different in the sounds it emits, but it follows a similar progression Apr 19 00:01:58 initial machine on, pressure ramping up, pressure steady, off Apr 19 00:03:58 mmmm, what a yummy looking shot Apr 19 00:03:58 Quacked, nespresso sure doesn't look that good :p Apr 19 00:04:42 I found http://jgilfelt.github.io/android-actionbarstylegenerator/ but wondering if there was something better Apr 19 00:04:54 pfn: purdy lookin. Apr 19 00:05:21 http://www.youtube.com/watch?v=-ocUYtRfpS8 Apr 19 00:05:27 by comparison, nespresso looks like water ;-) Apr 19 00:05:42 nespresso tastes like old beans. because it is. so it's better than what most people drink, but doesn't match good coffee. Apr 19 00:06:00 hi, i'm trying to implement sqlite support in my app. i'm using a simplecursoradapter to display data that i'm reading in over the usb port. the problem is that my app crashes when i turn off the screen after reading in the data and then turn it back on. it says "trying to requery an already closed cursor". i would prevent the requerying, but it's happening in Activity.java Apr 19 00:06:01 Real men just short ground coffee and be done with it. Apr 19 00:06:09 snort Apr 19 00:06:10 does that mean i need to make the cursor "available" on onPause? Apr 19 00:06:20 what's this "grind" you speak of? just eat the beans. Apr 19 00:06:24 pragma- piff, I inject it into my penis. Apr 19 00:06:29 snort the beans Apr 19 00:06:40 when I say inject it, i mean full size beans Apr 19 00:06:55 obviously Apr 19 00:07:09 whatsapp uses a service or intentservice? Apr 19 00:07:41 joker_89: for? Apr 19 00:07:48 intentservice is just a service that starts a thread Apr 19 00:08:03 and it processes intents serially Apr 19 00:08:03 because i want to do something similar Apr 19 00:08:15 joker_89, read the book java-concurrency-in-practice Apr 19 00:08:24 joker_89, then come back and consider your service needs Apr 19 00:08:37 i read that intet services are for afinite task and services for a long task Apr 19 00:09:15 in some measures. but there's a lot more to it than that. Apr 19 00:09:15 and services run in the same thread and intentserivces in a new thread Apr 19 00:09:22 intentservices are services Apr 19 00:09:37 but an intentservices can work hours and hours? Apr 19 00:09:45 to clean code before publishing app or not to clean code before publishing. thats the question... Apr 19 00:09:45 so saying that intentservices are for short-lived tasks while services are for long-lived really is meaningless Apr 19 00:09:59 Quacked, are you publishing the code? if not, it doesn't really matter Apr 19 00:10:02 except personal pride Apr 19 00:10:04 jojker_89 have you read http://developer.android.com/guide/components/services.html ? Apr 19 00:10:16 pfn: yeah, were talking about personal pride here :P Apr 19 00:10:23 intent services are meant to service individual intent messages that come in Apr 19 00:10:25 i read it grog Apr 19 00:10:27 and queue them up or exit Apr 19 00:10:32 services do nothing Apr 19 00:10:46 if you want your service to do something in the background, it's up to you to implement such a mechanism Apr 19 00:11:02 also, you cant kill intentservices in the middle of a process Apr 19 00:11:05 i want to destroy my activity and the services runs Apr 19 00:11:12 services don't "run" Apr 19 00:11:18 not in and off themselves Apr 19 00:11:25 they are just lifecycle units Apr 19 00:11:32 like whatsapp or facebook app Apr 19 00:11:39 that are created, started, stopped and destroyed outside of an activity's lifecycle Apr 19 00:11:43 i close the applications and always i have a service in background Apr 19 00:11:52 the service itself does not run Apr 19 00:11:54 period Apr 19 00:12:03 read the book java concurrency in practice Apr 19 00:12:05 come back when done Apr 19 00:12:12 i know the lifecycle Apr 19 00:12:34 :) . Anyone can have a check to this post? It is related to canvas work unexpectedly in a callback. Apr 19 00:12:38 joker_89: go for normal service and return START_STICKY; so itll restart if android kills it Apr 19 00:13:00 i do this Apr 19 00:25:22 I followed an example for a httpclient.execute(httpPost, reshandler) where it catches two different exceptions and set boolean error = true; and cancel(true); in both of these. But why is there an if (error) in onPostExecute? I don't see how that can be reached. Apr 19 00:26:28 cancel doesn't stop asynctask callbacks, does it not Apr 19 00:26:41 this is the tutorial: http://www.mysamplecode.com/2011/09/android-asynctask-httpclient-with.html .. line 125 Apr 19 00:28:04 I cant make it display that toast :P Apr 19 00:28:13 which toast Apr 19 00:28:25 line 126 Apr 19 00:28:25 anyway, looks like it's a mistake Apr 19 00:28:59 oh? Apr 19 00:31:00 Quacked, did you try declaring the boolean inside the AsyncTask? Apr 19 00:31:28 uhm, why? Apr 19 00:31:38 i cantsee whyit isnt working,just a guess Apr 19 00:32:16 does onPostExec get called after onCancelled? Apr 19 00:32:19 no, the issue is that I dont understand line 125 on that link Apr 19 00:32:28 brx_ nope Apr 19 00:32:31 onPostExec shouldnt be called after onCancelled Apr 19 00:32:40 Quacked, then it sounds like a mistake in example Apr 19 00:32:43 happens all the time Apr 19 00:32:55 :) Apr 19 00:33:06 Calling this method will result in onCancelled(Object) being invoked on the UI thread after doInBackground(Object[]) returns. Calling this method guarantees that onPostExecute(Object) is never invoked. Apr 19 00:33:11 as confirmed by asynctask documentation Apr 19 00:33:36 good stuff Apr 19 00:33:37 thanks Apr 19 00:34:52 https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-ash3/536911_525806150820697_114569751_n.jpg Apr 19 00:35:14 I wasn't distracted, i saw it happen, and it still sucks Apr 19 00:35:37 sucks Apr 19 00:37:40 I'd like to remove the warning "This RelativeLayout layout or its LinearLayout parent is possibly useless" on line 17 here: http://pastebin.com/S52hC8Cr Apr 19 00:37:47 Is it really useless? I dont think it is :P Apr 19 00:38:57 try gving it a weight Apr 19 00:39:27 you gave its peer LL a weight Apr 19 00:39:35 ohno, sry Apr 19 00:39:43 RelativeLayout no likey weight Apr 19 00:39:48 yes, it's useless. it's also senseless to mix fill_parent and match_parent. use just the latter. Apr 19 00:39:59 why is the height 0? Apr 19 00:40:30 and why is the outer width wrap and the inner width match? Apr 19 00:40:38 Eclipse says to use 0dp instead of match_parent when using weight Apr 19 00:40:49 i didnt realize you could just use weight on one element and its peer elements not have one Apr 19 00:41:11 erm Apr 19 00:41:15 Quacked: Apr 19 00:41:17 and I assume you didn't think about what that meant Apr 19 00:41:20 crap, theres StingRay_ Apr 19 00:41:29 kill the linearLayout housing the relative one Apr 19 00:41:37 and use weight on the relative Apr 19 00:41:46 same attribs as the parent linear Apr 19 00:41:53 then no warning Apr 19 00:41:58 relativelayout dont respect weight Apr 19 00:42:00 I thought Apr 19 00:42:01 as you have got nested view that does nothing Apr 19 00:42:12 weight is an attrib of layout params Apr 19 00:42:14 not a view Apr 19 00:42:29 and in this case the parent would be your vert lin layout Apr 19 00:42:34 so yes it should be fine Apr 19 00:42:35 :) Apr 19 00:42:59 i think thats what it's complaining about Apr 19 00:43:06 is sees pointlessness Apr 19 00:43:07 :) Apr 19 00:43:15 quite cleverer that is Apr 19 00:43:17 :) Apr 19 00:45:33 "Students at the University of Iceland have written an Android app that helps you avoid dating your cousins. The app accesses the Icelandic national genealogical database that contains information on all living citizens and their ancestors going back 1,100 years. Tapping two phones together will bring up an alert if you share a common grandparent." Just one of the consequences of having a population small enough (and well documented enough) to have a we Apr 19 00:45:40 uh, lol? Apr 19 00:47:08 Is that a big problem in iceland? lmao Apr 19 00:47:11 sounds like a brilliant idea, no one wants to bone their cousin Apr 19 00:47:24 StingRay_: looks to be working Apr 19 00:47:32 wow...shocker Apr 19 00:48:55 "RelativeLayout does not pay attention to android:layout_weight. (That's a property of LinearLayout.LayputParams, but not of RelativeLayout.LayoutParams.)" Apr 19 00:48:56 grr Apr 19 00:48:59 that had me confused Apr 19 00:49:22 but fine when you think that layoutParams are a View > ViewGroup thing Apr 19 00:49:40 and in your case, RelativeLayout > LinearLayout Apr 19 00:49:55 so Apr 19 00:50:23 relatvieLayout (using parent params (LinearLayout.LayoutParams)) > LinearLayout Apr 19 00:51:07 but sure, something that needs relativeLayout.layoutParams, like the views in your relativeLayout, would not respect it Apr 19 00:51:17 wow, been typing on a clicky keyboard so much, it feels so weird to type on a non clicky at the desk Apr 19 00:51:35 StingRay_: I see.. thanks Apr 19 00:52:12 just think of them as parent centric Apr 19 00:52:14 :) Apr 19 00:53:30 anyone know anything about the wifi internals to android and can help debug a connection issue with a ported driver? Apr 19 00:53:33 btw, I'm only 75% sure that what I said is true Apr 19 00:53:34 :) Apr 19 00:53:38 hmm.. my min build is 7, will I get errors if using match_parent? :/ Apr 19 00:53:49 StingRay_: I only understood 75 % of it anyways, so its all good Apr 19 01:03:33 you only got 75% of what I siad ? Apr 19 01:03:38 dam…really ? Apr 19 01:04:00 its 3 am :/ Apr 19 01:04:07 2.04am Apr 19 01:04:19 I dont get what Im saying myself Apr 19 01:04:20 :D Apr 19 01:04:23 whats the dif: linearlayout vertical vs linearlayout horizontal Apr 19 01:04:38 ok think about it this way, a View or ViewGroup child is a "letter" Apr 19 01:04:44 zhej: displaying items downwards or from left to right Apr 19 01:04:52 layout params are "stamps" Apr 19 01:05:00 parent viewGroups are countries Apr 19 01:05:05 Quacked: hmm, do you mean vertical text? Apr 19 01:05:23 does the stamp need to be relative to the letter, or the country destination ? ;) Apr 19 01:06:47 haha Apr 19 01:07:40 good metaphor Apr 19 01:07:43 sigh Apr 19 01:07:52 and with that I bid ye farewell Apr 19 01:07:59 seeya Apr 19 01:08:00 :) Apr 19 01:08:05 gnite Apr 19 01:08:11 latah Apr 19 01:08:17 zhej: do you know what a linearLayout is ? Apr 19 01:08:28 StingRay_: hmm, little bit Apr 19 01:08:35 displays things linearly Apr 19 01:08:41 good Apr 19 01:08:53 do you know what a viewGroup and a View are ? Apr 19 01:08:59 i'm learning android dev in eclispe in class, only introduced to linearlayout today Apr 19 01:09:18 and no Apr 19 01:09:27 find out :) Apr 19 01:09:40 then if you know what vertical and horizontal are Apr 19 01:09:47 you have answered your own question Apr 19 01:09:58 but gained/learned in the process Apr 19 01:09:59 :) Apr 19 01:10:13 hmm, will ask teach tomorrow Apr 19 01:10:36 zhej: be careful Apr 19 01:10:42 there are two types of student Apr 19 01:10:48 ^? Apr 19 01:10:59 huh? Apr 19 01:11:01 those who learn, and those who are taught Apr 19 01:11:12 be one who learns ;) Apr 19 01:11:13 uuuuuuuuuuh Apr 19 01:11:15 ^+1 Apr 19 01:11:47 speaking of which ;), i've got a quick question Apr 19 01:12:26 i'm trying to port a Pong game I wrote in java to android as my first android game Apr 19 01:12:32 StingRay_: u on that bruce lee "be like water" type of thinking huh Apr 19 01:12:35 i like it Apr 19 01:12:44 boytoy_: far from Apr 19 01:12:51 but I have trained many people :) Apr 19 01:13:01 Lord_D: lolol, i did that in python b4 Apr 19 01:13:04 not in android dev !!! Apr 19 01:13:13 i'm stuck on creating a timer to loop the game update. http://stackoverflow.com/questions/16095557/android-creating-a-timer-loop-for-a-pong-game Apr 19 01:13:14 lulz Apr 19 01:13:14 kewl Apr 19 01:13:25 StingRay_: no worries StingRay_ , i make an effort to understand Apr 19 01:13:49 zhej: haha. i'm using it as a learning experince. it was fun to write in java Apr 19 01:13:58 Lord_D: why do u need a timer? Apr 19 01:14:16 Lord_D: lemme b more specific, what is this 'timer' used for? refreshing? Apr 19 01:14:18 Lord_D: you can runOnUiThread Apr 19 01:14:23 yah Apr 19 01:14:49 in java i used a timer to update game UI Apr 19 01:15:25 ah, i see, then idk too much, when i did it, called a method to clear and redraw Apr 19 01:15:53 StingRay_: and run a loop through there? Apr 19 01:16:19 a loop ? I mean you can do your calc in thread and when appropriate Apr 19 01:16:48 either use a handler or update ui though runOnUi Apr 19 01:16:53 from that thread Apr 19 01:17:00 but look at handlers Apr 19 01:17:28 btw, I'm not an android dev Apr 19 01:17:37 so could be talking 99% bollox Apr 19 01:17:38 :) Apr 19 01:18:33 lol Apr 19 01:18:53 handler looks promising. gonna do some google-fu Apr 19 01:18:59 thanks Apr 19 01:19:21 now if 3d graphics in VFX or Console games is your query, then ya, I dont talk bollox Apr 19 01:22:14 lol. i'll get back to you on that one. i'm trying 2d first Apr 19 01:22:50 oh I can do that too, concept stuff Apr 19 01:22:53 ;) Apr 19 01:27:32 Hello everyone, I'm having a problem with setting an onClickListener causing a null pointer exception. I have the pastebin code here: http://pastebin.com/QzH46ddx Apr 19 01:27:37 thanks in advance for help! Apr 19 01:29:41 where's the NPE ? can you show a ST? Apr 19 01:30:18 line 111 and 113 ? Apr 19 01:30:24 wtf? Apr 19 01:31:05 your creating a button, then your throwing it out by then instancing a button from the layout ? Apr 19 01:31:19 oh and thats probably where your getting a null result btw Apr 19 01:31:25 not cause of what I just said Apr 19 01:31:55 but because R.id.processOrder is not in the layout Apr 19 01:32:01 cause there is no layout at that point Apr 19 01:32:14 setContentView(R.layout.activity_main); is the xml inflate and assign Apr 19 01:32:30 your doing that AFTER your wanting to findViewsBy* Apr 19 01:32:32 so I should be inflating the xml file much earlier? Apr 19 01:32:39 so there are no views to find Apr 19 01:32:52 setContentView(R.layout.activity_main); needs to be used before findViewBy* Apr 19 01:33:02 * StingRay_ is off for a ciggy Apr 19 01:33:07 alright, thank you much! Apr 19 01:35:07 hey guys....got a trickier question Apr 19 01:35:20 so I was able to set a special background for highlighted items in a listview Apr 19 01:35:31 and I was able to set the text color of a highlighted item in a listview Apr 19 01:35:35 now it gets a bit trickier Apr 19 01:35:54 for my listview items, I have a .setCompoundDrawablesWithIntrinsicBounds call Apr 19 01:36:05 I'm putting an image on the list item Apr 19 01:36:17 is there any way I can set a different image for the highlight state? Apr 19 01:37:42 why not Apr 19 01:58:54 pfn I'm not sure what you're saying Apr 19 01:58:59 I'm sure it is possible...some how Apr 19 01:59:03 I don't know how, thouh Apr 19 01:59:05 *though Apr 19 01:59:23 with the background of the highlight state and the text of the highlight state, I set it in the xml Apr 19 01:59:39 just like a "when the state is selected, use this renderer" Apr 19 01:59:57 problem is, this is different per item Apr 19 02:00:11 I can't just tell every item to use the dark smiley face when highlighted Apr 19 02:00:17 only item 1 gets the dark smiley face Apr 19 02:00:24 item 2 gets a dark hand Apr 19 02:00:52 I call .setCompoundDrawablesWithIntrinsicBounds for each of those items, providing a different image to display Apr 19 02:01:00 I tell it the non-selected image to use Apr 19 02:01:13 so...is there any way I can tell it the image to use for selected state? Apr 19 02:05:10 ProgramMax: basically you can do ANYTHING you want to ANY view Apr 19 02:05:21 in an adapters getView/bindView etc Apr 19 02:07:33 inside the getView is where I set the image Apr 19 02:07:44 I can detect which item is selected Apr 19 02:07:50 and set a different image, I think. Right? Apr 19 02:08:05 that would be covered in the "ANYTHING" i just mentioned Apr 19 02:08:12 but I'm supposed to do like: if(convertView != null && convertView.getId() == this_item){ view = convertView; Apr 19 02:08:22 so will it like...remember the first image that was set? Apr 19 02:09:06 now you lost me Apr 19 02:09:30 it will remember ? Apr 19 02:09:36 so...you get that call any time an item becomes visible, I think. But the listview tries to memorize how you set it last time Apr 19 02:09:46 and I think you are supposed to reuse what it memorized from last time Apr 19 02:09:55 which is the convertView parameter it passes in to you Apr 19 02:10:01 that is a sort of optimization Apr 19 02:10:36 well view recycling yes Apr 19 02:10:44 that's what it is called? Okay Apr 19 02:10:49 glad you know this and are helping me :) Apr 19 02:10:49 but thats to not have to inflate Apr 19 02:10:51 I appreciate it Apr 19 02:11:05 you still set all your content Apr 19 02:11:19 oh oh Apr 19 02:11:20 okay Apr 19 02:11:27 so each time I can just detect which item is selected Apr 19 02:11:29 if it is this item Apr 19 02:11:30 just that if the view is passed in the scope, then it's cause it has a view that is no longer on-screen in memory Apr 19 02:11:33 set a different image Apr 19 02:11:36 yeah, you're right Apr 19 02:11:53 does that same thing work for like...the item that was just pressed? Apr 19 02:12:03 to have a separate pressed state and highlight state? Apr 19 02:12:40 lost me again Apr 19 02:12:58 sorry...I don't know enough to be able to ask the questions intelligently Apr 19 02:13:42 well think of it this way Apr 19 02:13:53 if convertView == null, then inflate Apr 19 02:13:57 if not… use Apr 19 02:14:05 in both cases, set your data Apr 19 02:14:13 with any conditions you want Apr 19 02:14:21 I need to figure out how to determine which item of the list is selected Apr 19 02:14:28 that's my first problem Apr 19 02:14:43 my second problem is...you know the selector drawables... android:state_selected="true" is one Apr 19 02:14:50 android:state_pressed="true" is another Apr 19 02:14:57 I want to have a black image for the selected Apr 19 02:15:00 and a white image for the pressed Apr 19 02:15:14 so my second problem is "Is there a way to know which item was pressed?" Apr 19 02:15:21 I guess there is...onClick or whatever Apr 19 02:20:24 you use a drawable selector xml for the states Apr 19 02:20:38 or if you wanted a code based one, stateListDrawable Apr 19 02:20:57 you dont really want to detect that yourself in an click event Apr 19 02:21:43 I don't know a way to do this with drawable selector xml Apr 19 02:21:57 I understand how to use a drawable selector xml for things that are the same for each item in the list view Apr 19 02:22:05 like the highlight background, which is the same for all items Apr 19 02:22:07 or the text color Apr 19 02:22:18 but I don't know how to do it differently depending on the item Apr 19 02:22:54 assaign a different stateListDrawable Apr 19 02:23:15 I haven't yet looked into that. I will google it Apr 19 02:23:20 I really appreciate your help with all this :) Apr 19 02:26:06 So, my device has 'do not install APK built on a different architecture', yet what GPlay installs doesn't work anyways, is there a way to force a different arch APK to be installed? **** ENDING LOGGING AT Fri Apr 19 02:59:58 2013