**** BEGIN LOGGING AT Sat Feb 04 03:00:03 2017 Feb 04 03:53:48 i am unable to minimize or exit my app. my first two activities are for sign in puropose, so they redirect to 3rd screen if those credentials are already present. i am using finish() and System.exit(0) to exit from 3rd screen but they always end up showing 3rd screen. how can this problem be solved? Feb 04 03:54:36 exit is incorrect Feb 04 03:54:53 what should be used then? Feb 04 04:00:30 how are you moving to the third screen from the other two Feb 04 04:01:50 it automatically checks if credentials are saved in sharedpreferences, if they are then it forwards to next activities Feb 04 04:03:29 oh so the third screen exits back into itself? Feb 04 04:03:31 is that the issue Feb 04 04:03:40 yes Feb 04 04:04:17 could be the System.exit then Feb 04 04:04:38 not working Feb 04 04:04:45 I don't think you're supposed to use that Feb 04 04:05:39 not for mobile Feb 04 04:06:43 abhi__: Why not make the current 3rd screen the main activity. When this launches, if the user isn't logged in, it shows the other activities. This is much simpler. Feb 04 04:07:09 It sounds like your 1st and 2nd screens are secondary screens, not primary screens. Feb 04 04:07:58 makes sense Feb 04 04:08:07 TacticalJoke: yes, that would be much better. this will even save redirects Feb 04 04:08:55 ok, i got it working using finishActivity(), i think it closes all activies at once even first and second one. Feb 04 04:09:16 sorry, finishAffinity(); Feb 04 04:10:01 Though, i would go with solution provided by TacticalJoke. Thanks Feb 04 04:17:20 or you could chain your activity start and finish with onresult Feb 04 04:17:49 when third activity is finished, onresult on the second handles it and finish itself if necessary, and so on Feb 04 04:18:44 but maybe you need to rethink your UX, 3 activity for login might be too much, or maybe use some fragment, some dialog, etc, it's up to you Feb 04 04:21:01 adq: only 2 activities are for login, first one if for authentication, second for is for choosing username. i think it's ok as this will be only for one time Feb 04 04:21:23 word Feb 04 04:24:47 anyone know what the 100.0f in the accepted answer is for? http://stackoverflow.com/questions/7608464/android-custom-ui-with-custom-attributes Feb 04 04:27:26 It's a default value for when a real value isn't present. Feb 04 04:27:40 100.0f is arbitrary, though. Feb 04 04:27:49 oh ok, that makes sense Feb 04 04:27:54 thanks! Feb 04 04:28:28 I can't believe that bottomsheetbehavior is so hard to change the behavior for Feb 04 04:28:36 just to modify 4 lines of code I had to copy/paste the entire class :( Feb 04 04:30:51 man reading this whole activities stuff makes me laugh lol Feb 04 04:35:56 TacticalJoke you there? Feb 04 04:36:04 Yeah. Feb 04 04:36:12 im not sure if you said anything yesterday after i left Feb 04 04:36:34 you asked me what i meant about selecting and deleting something Feb 04 04:37:01 Yeah, jus that. I realised you left after that. Feb 04 04:37:02 just* Feb 04 04:38:57 yeah sorry i stepped out for the night. what i was saying is, if i have a LinkedList of N size displayed in a ListView, when its presented in the ListView, i store the items inside the ViewHolder as well as the Views, and if i want to delete something, i have to LinkedList.remove() by object. instead of by iterator like in standard c++, and i assume that searches the list and compares, Feb 04 04:38:57 which makes me wanna puke. you seem like youd know something more than i do about java and lists, so idk if theres anything going on behind the scenes Feb 04 04:39:04 im pretty fluent in c++, but not so much java Feb 04 04:39:57 becasue from what i read, iterators are invalidated when a LinkedList is modified in anyway. unless i read wrong, but i assume thats because the iterators lie in the middle and dont store the node itself inside them like a standared c++ iterator Feb 04 04:40:26 they have next and previous nodes instead of a node itself from what i saw Feb 04 04:41:50 im not sure if internally java has something special in terms of lists and objects or what, but. i just find it pretty bad to only have a remove by object and index Feb 04 04:42:17 you can remove using the iterator Feb 04 04:42:19 does java by some chance, internally, store where objects are in a list, inside the object itself? Feb 04 04:42:34 chek i understand that, but i read they are invalid if a LinkedList is modified Feb 04 04:42:58 emceelovin: (nice nick by the way Superbad reference?) LinkedList is pretty much assuredly the wrong structure for whatever you want to do Feb 04 04:43:00 unless the way it was modified by calling that method Feb 04 04:43:10 CedricBeust exactly lol. nickname for a long time Feb 04 04:43:55 the fact that there are so many ways to do something that should only be done one way, annoys me Feb 04 04:44:25 I lack some context, can you summarize what you're trying to do? Feb 04 04:44:34 CedricBeust random access is really never a concern for me. inserting/deleting is usually the concern most of the time Feb 04 04:44:51 Even if these are you only concerns, LinkedList is a bad choice Feb 04 04:45:04 well i really dont know my wya around java, and dont care for it, what else is there? Feb 04 04:45:05 your types are reference types anyway Feb 04 04:45:37 so an arraylist is vaguely like vector in C++ Feb 04 04:45:40 to me, everything seems bad in java, but i have no choice with android Feb 04 04:45:45 thats what i figured Feb 04 04:45:52 yeah I don't like it either Feb 04 04:45:57 i assumed ArrayList was equivalent to std::vector Feb 04 04:46:11 and LinkedList was equivalent to std::list likewise Feb 04 04:46:18 no, in fact ArrayList where T is a primitive non-reference type isn't even allowed Feb 04 04:46:21 but a name like ArrayList just makes no sense and sound stupid Feb 04 04:46:21 another javaism Feb 04 04:46:30 it's called that because it's a type of List Feb 04 04:46:45 emceelovin: ArrayList is an implementation of List, one which happens to use an array under the hood. Feb 04 04:46:51 std::vector in a way is kinda the same. most people would think why std::vector, but it is what it is Feb 04 04:46:54 i just think java is cancer Feb 04 04:47:09 makes sense. i did notice that List was the base class for them all, so i get it Feb 04 04:47:34 LinkedList is not equivalent to std::list (as far as I remember from std anyway). Bottom line: don't use LinkedList in Java, use ArrayList Feb 04 04:47:42 i just dont know java enough i guess, but its so insane to think that an iterator is invalid if a list is modified Feb 04 04:47:49 LinkedList seems like std::list to me Feb 04 04:47:56 thats what i figured. so what is it lol? Feb 04 04:48:29 Modifying collections as you traverse them is dangerous, but it can be made safe if you use an iterator Feb 04 04:48:34 between androids bastardized api and java, i almost comitted suicide like 15 times since i started iwth android Feb 04 04:48:53 i always used the preferred method. just java is foreign to me in a lot of cases still Feb 04 04:49:18 i wasnt talking about modifying them as i traverse them thohgh. i know how to handle that. at least in c++ Feb 04 04:50:05 You know that you can always program your own data structures with the properties you want, right? Feb 04 04:50:15 Android didn't bastardize anything, you can use 100% compatible API's Feb 04 04:50:18 I'm also curious about what CedricBeust is asking. I'd ask why you're using LinkedList for the data backing a ListView. Feb 04 04:50:19 Java in Android Feb 04 04:50:21 Melatonina yeah i actually ended up writing my own linked list Feb 04 04:50:22 if I need to modify the value of one field in an android parent class, but the field is private not protected, is it more hacky to use reflection to change the value, or copy/paste the entire class? Feb 04 04:50:40 kind of torn on what to do Feb 04 04:50:49 Even in C++, you pretty much hardly ever, ever, use a linked list Feb 04 04:51:06 really Feb 04 04:51:13 i was just about to say the saem thing lol. Feb 04 04:51:16 i use them fairly often Feb 04 04:51:50 you can do all sorts of insertions/removals/splices/etc without needing to move-construct the rest of the list, for instance Feb 04 04:51:51 i dont have a problem with a LinkedList with a ListView. its actually really fast since, from what i read, when you use LinkedList.get(), the current position is stored Feb 04 04:51:56 boomber: It's probably more sensible to go the copy-and-paste route. The reflection path entails your code potentially breaking when the Android code changes. Feb 04 04:52:15 so the incrementing of the current position with sucessive gets() is hardly noticeable while i gain O(1) insertion/deletion Feb 04 04:52:26 Though Facebook does it with the Android framework. There are things they can't change because of Facebook (and probably others). Feb 04 04:52:48 emceelovin: Why are you using LinkedList here at all? Feb 04 04:52:49 chek yeah. std::list is a beast. even with c++11. Feb 04 04:53:14 because i have 1000 items. idk how java handles the internal data structure, but im not gonna assume its gonna be efficient Feb 04 04:53:25 and im gonna treat it like its a regular dynamic array constnatly reconstructed Feb 04 04:53:57 LinkedList should be getting you a linked list Feb 04 04:54:04 TacticalJoke: makes sense, just feels so ugly :l Feb 04 04:54:06 But what else is the reason? Having 1k items alone is not reason to use a linked list. Are you saying you're adding and deleting items a lot? If so, how often? Feb 04 04:54:07 it's just the elements are all references instead of actual values Feb 04 04:54:15 TacticalJoke potentially yes Feb 04 04:55:16 like i said, if my ListView is displaying like 20 things, the fact that LinkedList.get() stores the current position, scrolling through the LinkedList really isnt noticeable AT ALL. its really fast still. even if i fling it insanely hard Feb 04 04:55:44 say i fling it hard enough to cause get() to move 50 times. thats picoseconds Feb 04 04:56:02 so, what's the problem? Feb 04 04:56:05 ArrayList.get is gonna be faster than any linked list's `get`. ArrayList.get simply queries an array. Feb 04 04:56:29 yes i understand that, but like i said im not randomly accessing other than the scrolling. which is helped out by get() storing the current position Feb 04 04:56:31 Well, for the int one. Feb 04 04:56:45 i understand the differences between the two data structures. just java is weird Feb 04 04:56:57 if c++11/14 were a woman id marry it Feb 04 04:57:16 still not sure why there isnt a standard socket implementation, but its whatever i guess Feb 04 04:57:40 you could create a C++ interpreter in Java and program against that Feb 04 04:57:54 that just seems like a lot of time i dont wanna invest lol. i only care about this one app really Feb 04 04:58:04 Hi. I want to see and control my phone with my laptop. Is there a way to do that strictly from the phone. With a USB cable of course. Feb 04 04:58:09 i dont plan on making a whole lot more honestly. except like one, byut maybe that will change Feb 04 04:58:13 emceelovin: LinkedList is not O(1) deletion. What if you need to delete the last item? Feb 04 04:58:35 well i dont know how LinkedList is fully. im talking about std::list Feb 04 04:58:38 well, what's the use case that is causing the problem? Feb 04 04:58:40 LinkedList is doubly linked? Feb 04 04:58:43 how would where the position is inside the list matter? that makes zero sense Feb 04 04:58:45 emceelovin: Java is very efficient manipulating an ArrayList. Like I said, it should be your default choice. Feb 04 04:59:07 i guess ill switch it. ill just go read more about it, but i really dont want to. i just hate java Feb 04 04:59:12 tripelb: Control your phone how? Feb 04 04:59:12 yeah why is deleting the last element not O(1) on LinkedList? Feb 04 04:59:19 what chek said Feb 04 04:59:36 maybe it isnt doubly, but i read it was and its cyclic Feb 04 04:59:41 How about deleting an element in the middle of a LinkedList? What order is it? Feb 04 04:59:42 soooo Feb 04 04:59:56 And two: ANDCHAT IRC client no longer works on freenode, snoonet because something has changed. I suspect marshmallow. I hope someone adopts it. It is Abandonware. Feb 04 05:00:01 it's O(1) if you delete from an iterator, guys! Feb 04 05:00:02 if you dont have anything representing this middle item, then of course youd have to search for it Feb 04 05:00:13 but who doesnt store anything in a list somewhere with an item or anywhere? Feb 04 05:00:32 If that iterator is positioned on that element, sure. But what time did it take you to get there, Melatonina ?\ Feb 04 05:00:32 Melatonina right, thats the only way ive ever known to delete something. which in c++, stores the actual node pointer itself Feb 04 05:00:43 CedricBeust who doesnt store iterators with objects? Feb 04 05:00:48 i ALWAYS do Feb 04 05:00:53 but i cant in java, apparently Feb 04 05:01:00 You're missing the point. LinkedList's random access is O(n). Period. Feb 04 05:01:01 if i add anything into the list, it gets an iterator Feb 04 05:01:10 tripelb: I think #android might be a better place for these questions. This is for Android-app development. Feb 04 05:01:10 im not missing that. im well aware of how a linked list works Feb 04 05:01:16 ArrayList's random access is O(1) Feb 04 05:01:17 not just LinkedList, but a linked list itself Feb 04 05:01:20 http://imgur.com/a/JCl4F some screens i'm working on, kinda mimicked youtube apps for the preview screen: http://imgur.com/a/Cg623 still need minor adjustements Feb 04 05:01:22 i understand that too Feb 04 05:01:40 Then use an ArrayList. And if you feel you should use a linked list, defend your case. Feb 04 05:01:42 heres my thing, if i have a ListView, each row WILL have the object im listing attached to it. via the viewholder Feb 04 05:02:02 CedricBeust: I'm saying that when people say "deleting from a linked list is O(1)", that's what they are referring to. Feb 04 05:02:06 because its fast to insert/delete when i dont need random access? Feb 04 05:02:38 Deleting from a linked list is O(n), not O(1). Feb 04 05:02:38 TacticalJoke: the idea is that I can see the phone screen in the laptop (and not just in portrait), and use the laptop keyboard and touchpad. I have seen many ways mentioned that do some (or all) of these things. I want to do not just from the phone. (I was told not is possible but by a somewhat snotty and superior boy. Feb 04 05:02:51 100% of the time, at least in c++, i WILL have an iterator that internally points to the node, that will not be invalidated if i modify the list at any point(unless its that item, but then thats just random if that happens) Feb 04 05:03:00 always measure and profile Feb 04 05:03:01 CedricBeust since when? Feb 04 05:03:16 Again, for the iterator to point to the right element, you'll have to walk the list n times. So it's O(n) Feb 04 05:03:19 ive never seen a case, or a piece of code, where someone doesnt delete with an iterator Feb 04 05:03:20 maybe/probably the bottleneck is not where you think it is, but it's still good to take in account bigo Feb 04 05:03:22 CedricBeust: well, I've just said what it's meant with that sentence. Feb 04 05:03:31 emceelovin: Hmm, I'm not sure. I read on Google that it's possible. Feb 04 05:03:38 Oops, that's to tripelb . Feb 04 05:03:42 emceelovin: Because you're biased by the std way of doing things and exposing iterators for everything. Feb 04 05:03:43 TacticalJoke: to do this involves developer mode and commands. This then is the correct channel Feb 04 05:03:45 Iterators are not free. Feb 04 05:03:58 well java sucks Feb 04 05:04:06 yeah I'd suggest writing your own container at this point Feb 04 05:04:07 tripelb: This is Android-app development only, so I seriously question that. Feb 04 05:04:09 emceelovin: you already said it Feb 04 05:04:10 emceelovin: Not, that's not java. It's basic computer science. Feb 04 05:04:16 uh... Feb 04 05:04:24 who randomly deletes from a linked list though is my point Feb 04 05:04:28 i think youre misunderstanding... Feb 04 05:04:49 somewhere someone selected something, that SHOULD have, inside the object, its position into what its stored in Feb 04 05:04:50 this discussion is pointless Feb 04 05:04:54 which, in c++, would be an iterator Feb 04 05:05:09 std::erase(object->iterator) O(n) Feb 04 05:05:11 done. Feb 04 05:05:13 -_- Feb 04 05:05:15 O(1) Feb 04 05:05:25 now you made me type O(n) sob Feb 04 05:05:38 watch your tongue lol Feb 04 05:05:40 No, in a linked list, it's O(n). Again, this is not language dependent, it's a language independent truth about linked lists. Feb 04 05:05:44 well i called myself sob Feb 04 05:05:50 ummmm Feb 04 05:05:57 no? Feb 04 05:06:09 emceelovin: I don't think he understands how iterators work in C++ Feb 04 05:06:11 at all Feb 04 05:06:16 sure doesnt seem like it Feb 04 05:06:37 emceelovin: in the last 45 seconds you didn't say "Java sucks" Feb 04 05:06:42 lol Feb 04 05:06:46 I used to be a member of the C++ committee back when Stepanov proposed the STL. I think I can claim to a reasonable understanding of how it works. Feb 04 05:06:47 do you want me to>? Feb 04 05:06:56 you should get your money back Feb 04 05:07:06 Regardless, what I'm saying is universal. Nothing to do with Java, C++ or the STL. Feb 04 05:07:13 so where are you getting O(n) for removal using an iterator? Feb 04 05:07:17 its an EXTREMELY common thing to SetWindowLongPtr HWNDs in win32. the equivalent of setTag Feb 04 05:07:19 TacticalJoke: I have been dismissed. If it uses dev tools and dev mode the #android channel will dismiss me too. -- If anyone else else has some I terest let me know. !!! Feb 04 05:07:39 check: you have a linked list of 1237 elements. What's the amortized cost of deletion? Feb 04 05:07:55 and its ALWAYS a pointer to an object, which is inside a list, which stores an iterator with it. if its selected, you std::erase that iterator and poof. its gone O(1)stantly Feb 04 05:08:14 tripelb: I know what you mean. IRC is full of awful people. I'd answer if I could, but I don't know. I think there's a chance nobody in here will answer either. Feb 04 05:09:11 shouldnt they call it sti these days Feb 04 05:09:14 to be scientific Feb 04 05:10:04 it's O(1) dude Feb 04 05:10:11 CedricBeust, i dont understand how adjusting next/previous pointers in a list is O(n) Feb 04 05:10:22 yes Feb 04 05:10:24 If you thinking is full of awful people maybe you should try a different hannel or server. I am hire fond of #ubuntu and #ubuntu-offtopic there was an sdx? sda? channel of a different name that folded. Feb 04 05:10:42 emceelovin: It's not about adjusting, you need to get to the i'th element and your only way is walking through each element. Hence O(n). Feb 04 05:10:53 you literally just take the current nodes prev, and set its next to the current nodes next and vice versa Feb 04 05:10:54 you don't need to get to the i'th element Feb 04 05:10:54 TacticalJoke: ^^^^ Feb 04 05:10:56 as opposed to ArrayList's O(10 Feb 04 05:10:57 tripelb: All of IRC. Feb 04 05:10:57 you already have an interator to it Feb 04 05:10:59 Every server. Feb 04 05:11:00 CedricBeust yes i understand this Feb 04 05:11:07 iterator* Feb 04 05:11:08 which is ALWAYS from some kind of choice somewhere in a UI Feb 04 05:11:18 if i click an item in a list, in windows, i instnatly have an iterator to it in the list Feb 04 05:11:21 You gotta be shitaki me. Feb 04 05:11:32 tripelb that was probably the coolest thing ive heard today Feb 04 05:11:36 Or you're totally young Feb 04 05:11:36 maybe ever Feb 04 05:11:47 I'm 32. I've been on IRC since about 12. Feb 04 05:11:51 im 29. 30 in april Feb 04 05:11:56 I'm well aware of how awful IRC is. Let's not be in denial. Feb 04 05:11:57 same here lol. i stopped for a while though Feb 04 05:11:57 Bla I am here for tech. Feb 04 05:12:15 i remember when this is all i use to do, and then the channels i was on died and the game i played died, but now its back again Feb 04 05:12:25 Anyway, I was actually saying it in empathy for you, tripelb. Not sure why you're turning it around against me. Feb 04 05:12:39 emceelovin: I used to like Usenet more. Feb 04 05:12:40 CedricBeust: did you consider that you walk the list for other reasons too? that some element is more important than others? Thus you could have the correct iterator as result of other computations. In that case you only would consider O(1). That, obviously, the only real life case when you would use a linked list for deletion performance. Feb 04 05:12:45 Especially trolling the awfuls on Usenet. Feb 04 05:12:49 Maybe there is an art in the room who might else. Else, another day. Feb 04 05:12:49 my ISP always had shitty usenet limits :( Feb 04 05:12:54 like 2gb. i went through that in like 15 minutes Feb 04 05:13:04 Same here, but I never really used it for binaries. Feb 04 05:13:10 it was so awesome downloading stuff from the ISP cache servers Feb 04 05:13:14 its basically being on LAN with your ISP Feb 04 05:13:29 Oh I see. You are those kind of users. Yawn. Feb 04 05:13:56 Those kinds of users? Feb 04 05:14:49 CedricBeust: as I said, that's what people mean when they say that "deletion by iterator is O(1)". You already have the iterator, period. If you don't have it, that's another topic. Feb 04 05:15:21 Melatonina exactly. which i always assume is what people understand, because who randomly deletes something in a list? its something, to me, that happens very very seldomly Feb 04 05:15:40 im not saying it doesnt happen. im sure it does, but I almost ALWAYS have the iterator Feb 04 05:15:45 99.9% of the time Feb 04 05:15:59 what matters is choosing wisely the data structure based on the frequency/most expected operations Feb 04 05:16:24 i wrote a TCP server for my project, and i plan on it getting nailed with connections. which i want insertion/deletion performance, and i store iterators in my client_context's Feb 04 05:16:31 emceelovin: Are you able to give more info about you 1k data set and app? Feb 04 05:16:32 like if someone never delete or rarely, O(1) or O(n) or O(n²) won't matter much Feb 04 05:16:36 Melatonina: No matter how many special cases you come up with, random access in a linked list is O(n). Period. Can't believe this is even a discussion Feb 04 05:16:47 Yeah, I can't believe it either Feb 04 05:16:53 yes, random access is Feb 04 05:16:56 Nobody talked about random access Feb 04 05:16:56 but this isn't about random access Feb 04 05:17:13 Melatonina: This is as useless a statement as "Deleting an element that I already have a pointer to is O(1)". Feb 04 05:17:13 who mentioned random access? its kinda implied that people understand that a linked list isnt based on the fact that they chose a linked list... Feb 04 05:17:28 he already has an iterator to all of the things to delete Feb 04 05:17:28 LOL Feb 04 05:17:35 that happens like 100% of the time in a normal app Feb 04 05:17:45 christ Feb 04 05:17:59 No, you don't usually associate iterators to elements in a list. That's insane. Feb 04 05:18:05 you do Feb 04 05:18:07 ? Feb 04 05:18:08 well Feb 04 05:18:11 maybe *you* don't Feb 04 05:18:12 CedricBeust: "deleting an element what I already have a pointer to from an ArrayList is not O(1)" is not a useless statement Feb 04 05:18:23 who in their right mind wouldnt do that. ESPECIALLY and MAINLY in a graphjical app? Feb 04 05:18:26 List of 10,000 elements, you're going to create 10,000 iterators, each of them pointing to that element? How about just using a pointer? Feb 04 05:18:30 (I mean, a generic list backed by an array) Feb 04 05:18:32 ................ Feb 04 05:18:37 an iterator HAS a pointer in it Feb 04 05:18:41 in the standard library Feb 04 05:19:00 Ok I'm going to eat a salad, it will be more worth my time than this discussion. Feb 04 05:19:04 rofl Feb 04 05:19:19 CedricBeust: I agree with you Feb 04 05:19:59 im seriously in a parallel universe Feb 04 05:20:17 you really think that storing an iterator with an object is expensive? Feb 04 05:20:25 in c++ its 4 bytes extra on x86 Feb 04 05:20:27 please go back and close the stargate or the wormhole or whatever it is Feb 04 05:20:48 what was that thing that chick went through but never went through? forgot the name of that movie Feb 04 05:21:07 How do people crosses universe boundaries, usually? Feb 04 05:21:24 no they built that machine with the ball, and it was suppose to be some kind of travel thing Feb 04 05:22:45 but anyway, the fact that 4 bytes extra is a matter to a language that has SO MUCH metadata on objects, is really funny Feb 04 05:23:04 I need a salad too Feb 04 05:23:32 lol.. Feb 04 05:23:45 no wonder android/android apps suck. this mentality is cancer Feb 04 05:24:01 stage 4 terminal malignant Feb 04 05:24:16 you relate a lot of things to 'cancer' Feb 04 05:24:27 well cancer is severely bad, so Feb 04 05:24:47 i would say the majority of android apps "suck" because companies dump far too much money in their iOS version and get their iOS devs to "port" their app over Feb 04 05:25:06 i would say AS does not help sometimes Feb 04 05:25:09 i mean they arent THAT bad, but a lot could be better Feb 04 05:25:20 it's like, the whole universe preventing me to make my apps Feb 04 05:25:31 i actaully dont mind AS. i like it Feb 04 05:26:03 i keep forgetting to set it to multicore build though. can it even do that? Feb 04 05:26:04 it's a crazy ide, very good features, very nasty issues Feb 04 05:26:13 my 100 file project in VS builds in like 5 seconds Feb 04 05:26:18 use something else then Feb 04 05:26:27 yeah. maybe i dont notice it because like android, is hidden behind so much hardware lmfao Feb 04 05:26:46 emceelovin: you can make android apps in VS too Feb 04 05:26:57 i swear the tooltip that highlights lines yellow purposely plays games with me Feb 04 05:27:07 ill go to click next and itll go away. like hohoho, almost got it! Feb 04 05:27:28 Melatonina i know, but i figure id use the native IDE Feb 04 05:27:34 i wouldnt want to write win32 apps in android studio Feb 04 05:28:01 emceelovin: there is no native IDE. Android Studio doesn't run on Android Feb 04 05:29:13 i meant native to the developing im doing Feb 04 05:29:14 it's native to the sdk Feb 04 05:29:21 i figured that was implied Feb 04 05:29:29 im pretty sure i know it doenst run on android lol. Feb 04 05:45:02 emceelovin: what kind of Android application are you working on, if I may ask? Feb 04 05:57:46 I've some code like https://jsfiddle.net/e8hnk3on/ in a page, however, for some reason, the columns are strangely alligned http://imgur.com/a/9o0lm Feb 04 05:58:12 http://imgur.com/a/9yj6Y Feb 04 05:58:21 you made them that way Feb 04 05:59:18 well, why in the fiddle, they're correctly centered in the page, and in the other page aren't? you see the second rew seems like shifted Feb 04 05:59:32 and that happens only when I use space-around/between Feb 04 06:01:26 alex88: wrong channel? Feb 04 06:01:32 oh god Feb 04 06:01:35 sorry guys Feb 04 06:01:36 :D Feb 04 06:01:39 np Feb 04 06:01:43 I joined but didn't switch :/ Feb 04 06:01:48 sry again Feb 04 06:02:00 no need Feb 04 06:02:24 if it makes you feel better, do it Feb 04 06:02:43 pinch your cheek Feb 04 06:03:38 ahah :D Feb 04 06:17:40 a couple of weeks ago, some oem was mentioned for killing processes aggressively when the user pressed home - anyone remember who ? Feb 04 06:19:53 in android studio, is there a way to make a layout assume, or act as if it was(because it will be) inside a HorizontalScrollView? other than putting it in one until youre done designing and deleting it Feb 04 06:20:00 in the designer of course Feb 04 06:23:26 start pretending there is no Designer Feb 04 06:23:58 use only the XML editor and exercise your imagination Feb 04 06:24:05 that is a good point to. ive done what im doing before, because it repeats in my project, but i was just curious Feb 04 06:25:04 I really almost never watch you. I don't know for sure but I don't think so. Feb 04 06:25:41 sounds like you need a beer Feb 04 06:25:47 or youve had too many beers Feb 04 06:26:41 I don't drink alcohol Feb 04 06:27:03 that sucks Feb 04 06:27:16 emceelovin, you can use tools:showIn="@layout/alayoutwithanhorizontalview" Feb 04 06:27:43 hmmm Feb 04 06:27:47 thank you adq Feb 04 06:27:49 it will only be visible in the layout editor (if it previews correctly....) and not be available at runtime nor compiled Feb 04 06:28:07 i find tools: very useful Feb 04 06:28:18 its just interesting at how it assumes every layout is a main layout in the designer Feb 04 06:28:32 are you a drunkard? Feb 04 06:28:35 there should be options for "child" layouts or a way to set it as if its going to be inside a container Feb 04 06:28:50 Melatonina depends. what do you concider a drunkard? Feb 04 06:29:18 someone who think that not drinking alcohol sucks Feb 04 06:29:22 consider* Feb 04 06:29:26 i prefer to not talk about the layout editor, too many regressions though good stuff like blueprint but basic things still don't work properly Feb 04 06:29:29 afk Feb 04 06:29:30 why so judgemental towards alcohol? Feb 04 06:29:39 I am not Feb 04 06:29:43 seems like it Feb 04 06:29:57 you are the one who is judgmental about not drinking it Feb 04 06:30:05 or well, people who drink it are bad people it seems. nothing wrong with having a drink here and there and enjoying life Feb 04 06:30:21 its a joke not a penis. dont take it so hard Feb 04 06:30:31 i dont care if people dont drink lol. Feb 04 06:30:51 nothing wrong. I just don't like the taste of most alcoholic drinks Feb 04 06:30:56 including expensive ones Feb 04 06:31:03 neither do i, or most people, you just have to suck it up for the result Feb 04 06:31:19 well, THAT sucks Feb 04 06:31:22 the people who drink those at a bar are stupid. 4 dollars for a drink is ridiculous Feb 04 06:31:34 you can get like 2-4 beers for that price Feb 04 06:31:43 (at the bar) Feb 04 06:32:16 I enjoy some liquor in desserts Feb 04 06:32:19 that's all Feb 04 06:32:28 liquor is very strong, so i almsot always dont enjoy it Feb 04 06:32:29 but I don't eat desserts anymore Feb 04 06:32:34 i just find it useless in deserts at least Feb 04 06:32:47 if im not getting a good buzz or drunk, drinking ofany kind is useless Feb 04 06:32:54 all or none for me Feb 04 06:33:11 again, that sucks Feb 04 06:33:17 how so Feb 04 06:34:47 lots of people actually enjoy the taste of different kind of wines, beers and liquors. I guess they are actually the ones who enjoy drinking alcoholic drinks. If one just drinks for the booze, it's quite sad. Some diazepam would be a better choice Feb 04 06:35:06 more cheap, more healthy Feb 04 06:35:17 i do love wines, and i do understand people enjoy craft beer and the taste of liquor. i just dont know how Feb 04 06:35:27 liquor just has that taste and its ugh Feb 04 06:35:36 i extremely LOVE the taste of champagne Feb 04 06:35:54 ok. That's good Feb 04 06:36:17 my family is heavy on wine Feb 04 06:36:33 i think thats why. my dad use to give it to me here an there growing up. beer once in a while, but mostly wine Feb 04 06:44:48 Hey. Did Google remove all the documentation for building Android apps on the command line? All I can find is documentation on Android Studio. Feb 04 06:45:48 gs6: https://developer.android.com/studio/build/building-cmdline.html Feb 04 06:46:04 I have been trying to use Android Studio. It is slow and obscures how things work. If things don't go exactly according to the guide, it's hard to troubleshoot. Feb 04 06:46:24 gs6: you work on linux, right? Feb 04 06:47:09 Melatonina: Yes Feb 04 06:47:16 I knew it Feb 04 06:47:50 it's not Android Studio. It's linux. I never heard people complaining about having so much problems with Android Studio on Windows Feb 04 06:48:33 Is there any documentation on how to set up the file hierarchy? Android Studio creates a ton of shit in the project directory Feb 04 06:48:55 Like 2513 files Feb 04 06:50:19 Doesn't google work on Linux? They should port it to Linux too. With an emulator or something, at least Feb 04 06:50:30 Port what? Feb 04 06:50:39 Google Feb 04 06:50:49 Port Google? What does that mean? Feb 04 06:50:58 Hi Feb 04 06:51:01 lol... Feb 04 06:51:05 lol Feb 04 06:51:27 I assumed that was the reason why I'm googling for you Feb 04 06:51:36 i remember one time, like 10 years ago. maybe 12-13 idk. i went into #redhat and asked if linux supported pointers Feb 04 06:51:53 What was the reason? Feb 04 06:51:54 good times Feb 04 06:52:13 I can google too if anyone needs. Feb 04 06:53:00 Soon we'll have such a job where people are paid to google Feb 04 06:53:11 There already are Feb 04 06:53:14 soon? Feb 04 06:53:21 Oh already Feb 04 06:53:32 Let me google that Feb 04 06:54:08 what about alexa? Feb 04 06:54:24 she sounds hawt Feb 04 06:55:00 "Ok Google" is made by people in Pakistan who listen to your mic and google for you Feb 04 06:55:24 that's why often it doesn't work. They just don't know English very well Feb 04 06:55:52 lol jesus.. Feb 04 06:55:59 lol Feb 04 06:56:21 "Ok, Google" *pakistanis remotely running to answer the request" Feb 04 06:56:50 "ed" falls down. "sir, we just lost 'ed'!" Feb 04 07:00:13 Is there something like android 'Handler' in Java? Feb 04 07:02:08 if not, its probably not hard to make your own Feb 04 07:04:41 purplex88: it's likely that any GUI framework for Java has something like Handler Feb 04 07:05:15 purplex88: an event loop is needed for something like Handler to make sense Feb 04 07:06:05 a message/event queue isnt necessarily a graphical term though Feb 04 07:06:14 its very common for producer/consumer in threading etc. Feb 04 07:06:41 id assume its closer tied to the threading section of java or anything before graphical Feb 04 07:07:24 its just a queue on a thread thats in an alertable wait state really Feb 04 07:08:01 Yes, plain threads don't have a message queue by default Feb 04 07:09:02 right, so you probably have to make one yourself in java id assume. i dont really know java a whole lot Feb 04 07:09:38 all you need to do is wake the thread up if you queue something. not a whole lot to it Feb 04 07:10:06 there is synchronization of course, but thats implied Feb 04 07:11:18 purplex88: I sometimes use this, where T is some Runnable or something similar: https://gist.github.com/anonymous/b9c94e85587b416a14b113b805729fae Feb 04 07:12:36 purplex88: the main loop of my video player begins like this: https://gist.github.com/anonymous/f8ad4bec4e6c5fe228e16275a8b09616 Feb 04 07:13:04 that seems kinda inefficient quickly glancing at it Feb 04 07:13:14 but then again this is java, so that might be how it has to happen Feb 04 07:13:33 it may be or not. I never investigated. I meets my current requirements Feb 04 07:13:37 it Feb 04 07:13:40 Nice. I was only curious how its done in java but I'll end up with using Handler or runonUIThread Feb 04 07:13:47 just seems pretty dumb copying everything thats done out instead of just looping and grabbing stuff out of a say, LinkedList, lol Feb 04 07:13:58 not gonna get into the linkedlist debate again. Feb 04 07:14:25 once you dequeue an item you can work on it and free up the lock on the queue instead of copying everything out Feb 04 07:14:25 emceelovin: most of the times there is just one command to be fetched. Feb 04 07:14:30 i see Feb 04 07:14:37 emceelovin: that runs once per frame Feb 04 07:14:41 i just dont like the "for now" stuff really when stuff is easy to make efficient the first time around Feb 04 07:14:47 i see Feb 04 07:15:39 just one of the biggest rules in multithreading is not holding onto a lock any longer than you need to Feb 04 07:16:00 im just nit picky i guess even with small snippets Feb 04 07:16:34 Yep Feb 04 07:16:50 No, I'm sure it can be written much better. It's just that I have to learn so many things with Android. And I'm not a Java expert either Feb 04 07:16:59 I never read a Java book, to be honest Feb 04 07:17:09 either have i. i pretty much just learn java as i go because im forced. Feb 04 07:17:21 guess what? java sucks lol. Feb 04 07:17:22 If I had to write that in another language I would write something different Feb 04 07:17:24 its been like hours Feb 04 07:17:31 all day long Feb 04 07:17:56 Melatonina: are you using it for java project? Feb 04 07:18:18 the only time i wanna hear or see java is if im drinking it. which is rare Feb 04 07:18:32 for my Android application. I didn't think a Looper was appropriate Feb 04 07:18:37 why are you even in this channel if all you're going to do is bitch? Feb 04 07:18:49 I only learned Java because of Android Feb 04 07:18:52 looper is such a funny word Feb 04 07:19:14 bankai_ ignoring is pretty easy on irc Feb 04 07:20:03 its not bitching if its true though is what i always say Feb 04 07:21:01 purplex88 im in that same boat, and im sure a lot of people are. nobody with 1% of a brain would learn it by choice Feb 04 07:21:18 Melatonina: was it an overhead when you only needed a simple queue? Feb 04 07:21:56 purplex88: what do you mean? Feb 04 07:22:57 emceelovin java + android have plenty of collections / concurrency tools, if you cant find what you need its probably your fault ;) Feb 04 07:23:03 Melatonina: Can the looper do the same thing that you own queue does? Feb 04 07:23:43 g00s im new =/ Feb 04 07:23:51 purplex88: almost. The difference is that Looper is more appropriate to implement something that just waits for events Feb 04 07:24:17 purplex88: in my case, I had to implement a video player whose main task is playing back frames Feb 04 07:24:34 purplex88: with a decent timing Feb 04 07:24:41 I see Feb 04 07:24:49 purplex88: and reacting to commands (events) is slightly less important Feb 04 07:25:13 otherwise I would have used Looper Feb 04 07:26:07 Probably that's why I am careful about using external libraries, but only when they are really needed. Feb 04 07:28:36 so a handler, with basically one case label, was too heavy for your case? Feb 04 07:31:59 emceelovin: Looper doesn't matches the logic of something like a video player. Feb 04 07:32:38 well you said it only ever runs once per frame Feb 04 07:33:02 doesnt seem a whole lot different than case frame_done:. unless i misunderstood you Feb 04 07:35:15 emceelovin: it just doesn't make sense to write a loop in the Loopers fashion for a video player. I could choose to delay the execution of a n-th command if the first (n-1) took all the idle time. Feb 04 07:35:54 that class is cheap. I don't see the problem Feb 04 07:37:31 I have lots of things to do in my application but the video player is working as expected and is more docile than ExoPlayer too. Feb 04 07:41:18 Now, I am curious say if you need to optimize a game code written in C++, you can go down to assembly level but if you need to optimize android code, do you go down to just java level or even byte code? Feb 04 07:46:19 purplex88: you go native, probably Feb 04 07:46:33 purplex88: Android devices are not Java machines Feb 04 08:42:11 hi. what does java.lang.SecurityException: Package {package-name} is currently frozen! mean? Feb 04 08:45:13 Hmm, probably "disabled" in the app menu? Feb 04 08:57:14 think am delusional, but having retrofit setup from a static wrapper class seems to be slower then instantiating it on an activity Feb 04 11:10:10 mhmm ive a custom arrayadapter (listview) which gets an empty arraylist in onCreate(). In onResume i fill the list and use notifyDataSetChanged to update the adapter. But this does not fill any data. If i give dummy data in onCreate and then modify the list in onResume it works. Any idea why? Feb 04 11:17:09 misterli: it needs to know the size of data Feb 04 11:17:39 by dummy data i guess you mean an empty array Feb 04 11:17:44 ah okay. Which means that even if i update the list (and a new item is inserted/extended) it wont update the last element Feb 04 11:18:04 Nope, not emty but worthless values Feb 04 11:18:23 but an array? Feb 04 11:18:39 Is there any way to update the arraylist and add/remove items and notify the arrayadapter anyway? Or do i need to set/add a "new adapter" everytime the nCount values changes? Feb 04 11:18:50 ArrayList() yeah Feb 04 11:19:06 yes it just needs size from that Feb 04 11:19:16 ok, means if the size changes it wont update Feb 04 11:19:42 but theres an effective way to do this as i recall doing it some months ago Feb 04 11:19:56 Cool, which way? Feb 04 11:20:20 And what is the reason for this behaviour? Feb 04 11:21:28 does it work if you pass it "new String[size]"? Feb 04 11:22:05 since its an arraylist i have to convert it back to an array or overwrite the getCount() in the adapter, right? Feb 04 11:22:51 Since an ArrayList has (not sure) not a fixed size and get rebuild everytime i add or remove an element Feb 04 11:23:44 can you show how are you implementing the adapter? Feb 04 11:28:57 okay, one moment. Feb 04 11:28:59 !nopaste Feb 04 11:31:37 http://pastebin.com/N54rzyEZ Feb 04 11:32:04 bulsListAdapter must be = new ArrayList<>(); just tried to null it before Feb 04 11:36:02 tried to overwrite getCount() but same issue: public int getCount() { return lights != null ? lights.size() : 0; } Feb 04 11:40:15 misterli: does this https://github.com/codepath/android_guides/wiki/Using-an-ArrayAdapter-with-ListView help? Feb 04 11:41:12 you set the data to adapter and it will use it Feb 04 11:41:40 Not really :-) I understand the concept of the listview and adapter, but i dont get it why it shouldnt update the list if the size changes. notifyDataSetChanged() should inform the list that the data has changed and repaint the widgets in case if the size / values doesnt match? Feb 04 11:43:00 sounds more complicated than i thought Feb 04 11:43:09 haha ;) Feb 04 11:43:33 afaik if the size matches it just update the (visible/RecycleView) item in the row. Feb 04 11:43:40 If the Size changes it should repaint the whole list, shouldnt it? Feb 04 11:44:12 Else the getCount() method shouldnt make any sense in the adapter Feb 04 11:51:29 By the way.. Using a new Adapter and assign it to the listview again works, but repaints completly and flickers (and of course the click listeners doesnt work while updating) Feb 04 12:17:44 misterli: you dont need to set a new adapter Feb 04 12:18:55 misterli: your problem is you overwrite the variable Feb 04 12:19:06 misterli: on line 79 of http://pastebin.com/N54rzyEZ Feb 04 12:19:26 means clear() and refill is the way to go Feb 04 12:19:32 if you were to do lights.clear(); lights.addAll(response.values()); it would work fine Feb 04 12:19:35 I just found a solution which "works", but not sure if it works well Feb 04 12:20:10 if your BulpsListAdapter is based off an ArrayAdapter then it has clear() and addAll() methods Feb 04 12:20:27 If its a custom adapter, then dont use either of these methods Feb 04 12:20:32 simply have it own its data Feb 04 12:20:45 http://pastebin.com/LxSZYkLW it checks if the list size changed and create in case, else update Feb 04 12:20:58 whatr? Feb 04 12:21:04 this is crazy Feb 04 12:21:26 ok all of this is not required Feb 04 12:21:36 you are really making things hard for yourself Feb 04 12:21:37 sounds as dirty/crazy as clear the list and fill it back :-P Feb 04 12:22:03 no not really Feb 04 12:22:04 shouldnt it take more memory to clear the list and refill instead of creating a new one and let the gc do its job? Feb 04 12:22:05 you dont need to do that either Feb 04 12:22:57 Okay, ill try to do your way Feb 04 12:23:02 your talking about the wrong things here, unless this list gets to 5,000 items or something it really wont make that much difference Feb 04 12:23:08 can you pastebin your adapter Feb 04 12:23:34 Okay, one second Feb 04 12:24:07 http://pastebin.com/qQ2Uucbe Feb 04 12:24:34 :( Feb 04 12:24:54 :-( ? Feb 04 12:24:56 it makes me sad Feb 04 12:26:42 adapter is not optimized yet. was just a quick test since i dont know the Philips SDK yet Feb 04 12:32:16 misterli: ok, so first off, you might as well right your own adapter Feb 04 12:32:33 second you want to have stable ids' Feb 04 12:32:51 this will help maintain the items Feb 04 12:33:06 Okay Feb 04 12:33:21 since these update regularly I'd suggest RecyclerView using DiffUtil over ListView Feb 04 12:33:43 this way only the views on the screen change when their models change Feb 04 12:34:10 You mean using a RecyclerView as Parent and ListView as child in the layout Feb 04 12:34:17 no Feb 04 12:34:24 RecyclerView replaces ListView Feb 04 12:34:30 think of RecyclerView as ListView2 Feb 04 12:34:35 Ah, okay. Got it Feb 04 12:34:54 And RecylerView only render elements visible on screen +2, correct? Feb 04 12:34:59 misterli: I also hope your going to manage that thread better, because right now, thats terrible Feb 04 12:35:05 one more on top, one more at bottom Feb 04 12:35:36 really? thought interrupt() shouldnt be use anymore. This is why i set the lightsrunningboolean to false in onDestroy/onDetached Feb 04 12:35:38 misterli: yup, it does the best job so you dont need to think about it, thats the idea, Feb 04 12:36:17 haha, we've a project which took month and paid more then 100 tsd dolars where the developers used a recyclerview in a stream and the memory load was huge/horrible Feb 04 12:36:19 Hi, I am trying to build an apk for noise (https://github.com/copperhead/Noise). When running gradle tasks (or build or whatever) I run into the following gradle error: https://bpaste.net/show/f345ffc37dae Feb 04 12:36:58 misterli: well that sounds like misuse Feb 04 12:37:20 Its a custom Launcher based on the TrebuchetLauncher with a Stream on the Left Workspace which holds about 400 elements Feb 04 12:37:35 and those elements get fetched with retrofit from a restapi Feb 04 12:38:25 but afaik there is no better way then using recyclerview for a list which contains lots of elements, correct? Feb 04 12:38:39 correct Feb 04 12:38:43 So I figured out how to create an android project with the "android" commnad-line tool that doesn't have over 2500 files in it to start with like with Android Studio Feb 04 12:39:08 gs6: good for you Feb 04 12:39:29 ill check the solution you gave me and come back in 15 minutes. Thanks again for using your time to help finding a solution Feb 04 12:39:40 Yeah, I asked about it earlier. Just thought I would provide the answer since nobody answered me Feb 04 12:40:12 gs6: sorry, wasnt awake then ;) Feb 04 12:40:19 You just have to download the SDK tools without android studio; that comes with the "android" command-line program Feb 04 12:40:35 And you can install everything else with the included sdkmanager tool Feb 04 12:40:51 tasse: is that run from within AS or on the Command Line with the gradlew command? Feb 04 12:40:58 It's like 1000x faster than Android Studio Feb 04 12:41:39 I don't think I can download gradle with the sdkmanager tool. I think it was specifically packaged with Android Studio Feb 04 12:42:00 I'm just using ant right now. I guess I'll switch to gradle when I figure out why I need it Feb 04 12:42:00 gs6: its a seperate install you can get from gradle.org Feb 04 12:42:16 ant? seriously Feb 04 12:42:24 havent used that in years Feb 04 12:42:39 "android create project" creates a build.xml and whatever else is needed so that "ant debug" just straight-up makese an APK Feb 04 12:42:56 lol Feb 04 12:42:57 * Napalm pukes abit thinking about Ant Feb 04 12:43:10 What's bad about it? I haven't done any Android development before Feb 04 12:43:14 Seems pretty simple Feb 04 12:43:33 I guess it's bad if you have a complicated build process? Feb 04 12:43:34 just the horror's i remember, the hours of crap Feb 04 12:43:38 Huh Feb 04 12:43:48 yea, is mega slow too Feb 04 12:43:52 Like I said, all I did was "ant debug" and it made a debug APK Feb 04 12:43:59 In like 5 seconds Feb 04 12:44:04 nothing better than Gradle and AS for large Android projects Feb 04 12:44:15 I'm hoping to make a small project Feb 04 12:44:17 Napalm, gradlew Feb 04 12:44:42 Like god damn Android Studio, why do you make a project directory with over 2500 files? Feb 04 12:44:49 tasse: go to your home directory and rename .gradle to .gradle_old Feb 04 12:44:54 its a directory/folder Feb 04 12:45:28 The "android create project" command makes an android project directory with 18 files Feb 04 12:45:29 tasse: then you need to check your gradle wrapper config file and see if its using the most recent version Feb 04 12:45:52 ok will do Feb 04 12:45:58 its currently using 2.14.1 Feb 04 12:46:05 as defined by the repo i am building from. Feb 04 12:46:38 tasse: then when you do run it next add --debug and --stacktrace to the command line Feb 04 12:46:46 Napalm: Do you develop on Windows? Feb 04 12:46:50 or even --full-stacktrace Feb 04 12:47:04 gs6: both windows and linux Feb 04 12:47:14 Android Studio runs like garbage on my computer Feb 04 12:47:20 It's so laggy Feb 04 12:47:32 no lag at all here Feb 04 12:47:37 Even on Linux? Feb 04 12:47:42 ok will do Napalm Feb 04 12:47:56 gs6: you running it on Linux? Feb 04 12:48:01 Yeah Feb 04 12:48:02 heh Feb 04 12:48:29 I mean, it's not like lag over 1s, but it's noticeable Feb 04 12:48:47 Sometimes the menus can take over 1 s though Feb 04 12:48:54 And startup time is about 10 s Feb 04 12:49:45 Someone in here earlier said Android Studio works well on Windows Feb 04 12:49:59 And that Linux users are always having problems Feb 04 12:50:26 AS is just rebadged Intellij IDEA Feb 04 12:50:29 I didn't have any development problems except for the lag and uh... lack of understanding of how my tools work Feb 04 12:50:53 perhaps you should check out performance tips for IDEA on Linux Feb 04 12:50:59 Since what happens when I click "run" in Android Studio is currently black magic to me Feb 04 12:51:20 Okay, thanks for the tip Feb 04 12:51:33 I might also try running it on Windows Feb 04 12:52:09 gs6: with or without Instant-Run turned on? Feb 04 12:52:15 theres a big difference Feb 04 12:52:18 Not sure what that is Feb 04 12:52:41 Forgive me. I only spent about 30 minutes using Android Studio Feb 04 12:52:48 ok, without it, gradle builds, the artifact of the build (apk) gets installed to the device over adb Feb 04 12:52:51 So many options! Feb 04 12:53:11 I was using an emulator Feb 04 12:53:18 then "adb shell am" is used to launch an intent to start your app Feb 04 12:53:19 Obviously that part was slow Feb 04 12:53:27 gs6: emulator? are you crazy Feb 04 12:54:06 No, I just followed the instructions. It was easier than connecting a real device Feb 04 12:54:12 gs6: well from day one, i've never liked the built in emulator, although its now much better, I use Genymotion for my development needs and then run it on real devices. Feb 04 12:54:18 Well Feb 04 12:54:25 Once I got the command-line tools... Feb 04 12:54:31 i want to make a app that show some a different home screen when used a different password. (1 show original home, 1 password show a dummy screen and all other show password failure) Feb 04 12:54:48 I installed an x86 image with the sdkmanager and that runs really fast on the emulator Feb 04 12:55:02 I installed a really old image, like platform 10 Feb 04 12:55:06 nooo Feb 04 12:55:08 lol Feb 04 12:55:08 Starts up in like 2 seconds Feb 04 12:55:16 s/password/pattern/ Feb 04 12:55:23 i thought you were about to tell me it was ARM Feb 04 12:55:24 lo Feb 04 12:55:25 lol Feb 04 12:55:28 And it's as fast as a real phone Feb 04 12:55:34 No, the ARM is slow af Feb 04 12:55:46 It defaults to arm if you just install the platform Feb 04 12:55:48 yup Feb 04 12:56:03 kuldeep: so? what are you asking/ Feb 04 12:56:10 I installed the oldest platform 'cause I'm trying to create a backwards compatible app Feb 04 12:56:19 It has the side benefit of being super fast Feb 04 12:56:21 gs6: you like pain right? Feb 04 12:56:32 I'll probably eventually test on the latest platform too Feb 04 12:56:38 Yeah, I like pain Feb 04 12:56:49 Does the body good Feb 04 12:56:53 Napalm, oh yea, sorry. Feb 04 12:56:54 gs6: because thats what your going to get with backwards compatiblity to APIv10 Feb 04 12:56:55 im asking what part do i need to look at? and is the required api's available. Feb 04 12:57:02 Napalm: Oh, we'll see Feb 04 12:57:15 I'm not dead-set on 10 Feb 04 12:57:22 Just going to work my way up as I find things I need Feb 04 12:57:45 Would hate to do a bunch of work on the latest platform and find out it's not backwards compatible at all Feb 04 12:58:04 kuldeep: still not sure what you want? just create an activity and 3 fragments, 1 is your pattern/password screen, the second and third are your two different home screens. Feb 04 12:58:16 If I start with an old platform, every time it breaks I will know I depend on something newer Feb 04 12:58:43 Anyway, my app is mostly just going to use ListViews Feb 04 12:58:45 kuldeep: now have your activity show the pattern fragment, once pattern is entered, based on entry value choose which fragment to create and load Feb 04 12:59:20 gs6: replace ListView with RecyclerView Feb 04 12:59:30 Why Feb 04 12:59:35 believe me, you'll benefit in the end Feb 04 12:59:46 Napalm, i want to add the login screen to android "settings" -> "security" -> authentication mechanism to unlock phone Feb 04 13:00:00 gs6: it has defined behaviour across all versions of the API Feb 04 13:00:23 kuldeep: right, so its not an app your trying to make Feb 04 13:00:38 Napalm, home screen? Feb 04 13:01:06 Napalm: ListView doesn't? Feb 04 13:01:14 nope Feb 04 13:01:31 Napalm, based on the dummy password or actual password, it show a dummy home screen or actual home screen. "actual" means the home screen shipped with device. Feb 04 13:01:32 gs6: ListView is the devil, im telling you now, dont say I didn't warn you Feb 04 13:01:47 Okay, lol Feb 04 13:01:57 I'm reading the differeces atm Feb 04 13:02:11 kuldeep: i think you'll only be doing that with modified OS image Feb 04 13:03:11 Napalm, i once readed somewhere that i can install multiple home screen. and the os is shipped with atleast one home screen. Feb 04 13:09:48 kuldeep: yes, you can make your own Home screen app Feb 04 13:10:09 kuldeep: but making it unlock and lunch different ones Feb 04 13:10:16 thats a difference proposition Feb 04 13:11:46 Napalm, basically two different part of the app: part1) pattern matcher. dummy or actual. part2) dummy home. Feb 04 13:12:21 and actual home is already shipped with device. Feb 04 13:14:30 ok, you can do it so your "pattern matcher" is actually the home screen Feb 04 13:14:42 but the pattern matcher then doesnt lock the device Feb 04 13:15:59 kuldeep: to make your activity accessible as the replacement home screen add this intent-filter to your activity in your manifest http://pastebin.com/iDizVW3P Feb 04 13:16:23 then after launching your app, press the home button and you'll be given a choice of your current home app or your app Feb 04 13:16:32 you can set your app up as the default Feb 04 13:24:31 thanks Napalm seems like im getting some idea Feb 04 13:25:43 here you go Napalm : https://bpaste.net/show/f92f0c234c42 Feb 04 13:28:46 cant find anything weird so far.. Feb 04 13:29:09 tasse: yea, same thoughts here Feb 04 13:45:51 hello, is there and ADB command to list all launchable activities Feb 04 14:41:46 Hello. I want to make an app with empty activity. any clue why it does not work? like if I would have the completely empty activity class and activity declared in manifest. what happens is, that when I click on the app in launcher, nothing shows, like nothing at all Feb 04 14:44:49 afaik it should be plain white Feb 04 16:19:02 having build error due to assertError in javac. the call stack includes LambdaToMethod.java Feb 04 16:26:26 found that PorterDuff.Mode.ADD crash on one of my cheap test devices -_- Feb 04 16:26:34 other mode, no issue Feb 04 17:07:52 ok, another problem.. ive a json which must be converted back to a List but since the JSON is bad formatted (no key/value for the LightID) its hard to push it in the PHLights.setId(). I tried using a custom TypeAdapter.. but doesnt work as excepted. Tried to use a parent class called "LightsOverview" which contains a private String lightId; Private PHlight phLight; but this is not what it should be at Feb 04 17:07:52 the end. Any idea how to convert it to a proper List or a set or whatever? http://pastebin.com/F0mFTkgh Feb 04 17:08:20 (using gson, retrofit 2) Feb 04 17:15:54 okay. Forget the Question. This wa sjust stupid. Using a Map does work of course. Feb 04 17:21:32 i guess this is free now . pretty cool https://www.google.com/analytics/data-studio/ Feb 04 18:00:44 * raoul11 thepooshes thepoosh Feb 04 18:00:50 םיןאיקרק Feb 04 18:00:53 ohithere Feb 04 18:00:59 sup? Feb 04 18:01:35 how was sabbath thepoosh Feb 04 18:01:45 it was ok i guess Feb 04 18:01:52 how's life treating you? Feb 04 18:01:57 avg Feb 04 18:02:05 fridge died /: Feb 04 18:03:00 didn't that already happen last week? Feb 04 18:04:08 any reason I should avoid doing things in an activity class's constructor? Feb 04 18:04:36 constructor? Feb 04 18:04:55 I have a class extending AppCompatActivity Feb 04 18:05:13 do things in the appropriate activity's lifecycle methods Feb 04 18:05:23 oncrate/onstate/onresume etc Feb 04 18:05:30 ok Feb 04 18:11:02 hey thepoosh , finish the resume ? Feb 04 18:11:16 passed it on to the university and got the job Feb 04 18:11:25 but there are a few small things to do Feb 04 18:12:01 raoul11 was it a newer (last 10 years) model? the don't make them like they used to. actually a growing movement to track down older models and refurb them because they are much better (washing machines too) Feb 04 18:12:11 thepoosh oh congrats! so you are moving on then ? Feb 04 18:12:16 its actually quite an oldy g00s Feb 04 18:12:20 like 20+ Feb 04 18:12:24 it's a side job TAing one course Feb 04 18:12:30 am gettin a tech guy tommorow Feb 04 18:13:09 advances in refrigeration and a/c could change the world Feb 04 18:13:50 imo its one of the best fridges on this planet Feb 04 18:14:26 cept its hoggin power like a ladyboi hogs somethin on a fullmoon party, and i have to do a 100$ fix every 2 years Feb 04 18:15:20 g00s: raoul11 asked me what is superbowl sunday Feb 04 18:15:20 there is a high entanglement between those kind of products and the number of years covered by the waranty, FYI Feb 04 18:15:24 it's a business you know Feb 04 18:15:40 (same for android OS update promise ;)) Feb 04 18:15:49 ladyboi ... fullmoon party ... what lol Feb 04 18:15:58 thepoosh knows Feb 04 18:16:28 when he was still flirting with secularism Feb 04 18:19:24 so thepoosh was a wild one Feb 04 18:19:39 yeah Feb 04 18:23:24 thepoosh any cool new android things this week ? Feb 04 18:23:36 hmmm... Feb 04 18:23:40 'thepoosh weekly' Feb 04 18:23:44 thinking more about constraint layout Feb 04 18:23:54 also, databinding is the shit! Feb 04 18:24:09 oh so you are using that now Feb 04 18:24:14 i haven't tried it yet. Feb 04 18:30:08 thepoosh have you used https://www.google.com/analytics/data-studio/ Feb 04 18:30:30 not yet, we met with the google guy in charge of it Feb 04 18:30:40 but haven't started yet Feb 04 18:30:44 he promissed it's amazing Feb 04 18:32:07 you can grab data from a few places. its kinda restricted that way, the most generic seems to be spreadhseets n google docs Feb 04 18:41:34 I have a linearlayout horizontal with 3 children (textview) that has layout_weight="0.3" so each view uses the 33%. the thing is that if the text of first textview is longer, it occupies more than the 33%. is there a way to force the views to respect the their weight? Feb 04 18:43:18 did u set 0dp on the layout_width/layout_height? Feb 04 18:43:27 whichever u want to constrain? Feb 04 18:43:27 gdrc look at tv maxlines or #lines attributes Feb 04 18:43:38 what have I missed? Feb 04 18:43:44 width now i see its horizontal Feb 04 18:44:47 thanks, raoul11 Feb 04 20:14:49 gdrc, 0.3 make it 30% not 33% Feb 04 20:15:12 yeah indeed, thanks Feb 04 20:15:17 except if you also changed the sumWeight Feb 04 20:15:26 but 0.3333 should be ok Feb 04 20:15:37 other wise you can simply give each of them a weight of 1 Feb 04 20:15:47 and you will have an exact 33.3333333..% Feb 04 20:16:07 the value you give to weight does not matter if you did not specify sumWeight Feb 04 20:16:18 sumWeight is implicitly the sum of all those weight Feb 04 20:17:15 settings 0dp is just a minor optimization and has nothing to do againt the weight Feb 04 20:17:18 against* Feb 04 20:19:04 0dp is not the same as wrap_content. weight distributes leftover space between views, not total Feb 04 20:19:38 oh for sure, usually it's with match_parent or 0dp Feb 04 20:19:52 or fill_parent :') Feb 04 20:20:30 Weight can also make views smaller Feb 04 20:21:13 i never looked up why they recommand 0dp, is it to save a layout measurement pass or something? Feb 04 20:21:56 For the case where you just have 1 view with weight it's just for saving a measurement pass Feb 04 20:22:09 If you have multiple views with weight it makes a difference on the resulting size Feb 04 20:22:17 ok Feb 04 20:25:50 E.g. if you have a two views that's both wrap_content and a weight of 1. View1 measures at 20 px, View2 measures at 30 px. If the container is 100 px there's 50 px left (100-30-20) to be distributed between the two. So one ends up being 55 px, the other ends up being 45px. If they're both 0dp they both get 50 px Feb 04 20:27:41 You could also have one measured at 50 px and the other measured at 150 px. Now there's 100 px too much that needs to be distributed. -50 px for each means that View1 ends up being 0 px and View2 ends up being 100 px Feb 04 20:31:18 word Feb 04 20:31:20 thx Feb 04 20:32:19 np, hope it makes sense :) Feb 04 20:47:16 does webgl in a webview work on all devices above 5.0 now? trying to make a game work with crosswalk for older devices but it's a real pain. no community and outdated docs. Feb 04 22:22:22 why is the Nexus 9 so unusably slow... Feb 04 22:27:19 NVIDIA Tegra processor? 2g ram? Feb 04 22:27:41 my N7 was pretty slow Feb 04 22:28:55 the 9 is about as bad Feb 04 22:29:14 No idea, seems to be fscked flash controller again. Feb 04 22:29:23 Mine runs fine a lot of the time... but then it just stops. Feb 04 22:29:36 Usually when I/O happens... Feb 04 22:30:11 yeah,go figure... Feb 04 22:30:41 Funny thing is, it doesn't show up on the benchmarks... CPU is one of the fastest out there Feb 04 22:30:46 But the UI performance is just awful Feb 04 22:32:06 it's terrible, can't even really use it for testing Feb 04 22:32:12 much less daily use Feb 04 22:33:14 Mine isn't that bad, I still use it for YouTube and reddit trolling Feb 04 22:33:30 all my tablets for testing only Feb 04 22:33:32 About N7 2013 level Feb 04 23:03:35 when returning a result from an activity, should I see onActivityResult or onResume first? Feb 04 23:11:01 chek, https://github.com/xxv/android-lifecycle result first Feb 04 23:11:32 whoa that's a much better chart than the one I've been looking at Feb 04 23:11:36 thanks Feb 04 23:23:55 god damn it man Feb 04 23:24:28 really feeling the pressure here, no Android designer, unreasonable deadlines, useless fucking features, bloated features.. Feb 04 23:24:33 garbage API Feb 04 23:25:17 app's so big it has TWO login screens, there are two places where you can login Feb 04 23:25:27 it's like a damn crypt Feb 04 23:30:48 Odaym lol androcrypter Feb 04 23:31:40 i mean like a crypt like a tomb Feb 04 23:31:51 where you go into several doors underground Feb 04 23:31:59 there must be like..20 activities Feb 04 23:32:53 43* Feb 05 00:33:36 is calling getContentResolver().query() from UI thread safe ? Feb 05 00:34:22 yes its just a context provider Feb 05 00:35:21 sasser: i don't think is a good design make query from ui thread Feb 05 00:35:38 is better to use a CursorLoader, what do you think ? Feb 05 00:36:38 that uses ui thread anyway Feb 05 00:38:29 sasser it use a background thread to make the query. Feb 05 00:38:50 CursorLoader: A loader that queries the ContentResolver and returns a Cursor. This class implements the Loader protocol in a standard way for querying cursors, building on AsyncTaskLoader to perform the cursor query on a background thread so that it does not block the application's UI. Feb 05 00:39:36 sounds like u know the answer Feb 05 00:39:43 hop to it Feb 05 01:19:00 capella :O https://news.slashdot.org/story/17/02/04/0516249/mozilla-binds-firefoxs-fate-to-the-rust-language Feb 05 01:19:38 Hello, i was wondering Feb 05 01:19:59 how i could add an onClick to a custom list adapters Feb 05 01:20:52 g00s that means manishearth finally got getURL().rs approved \o/ Feb 05 01:21:10 String[] example = new String[] { "1", "2", "3","4", "5", "6", "7", "8", "9" }; Feb 05 01:21:13 it was the pilot iir, I saw the code Feb 05 01:28:21 Hello! Feb 05 01:28:51 I know this will sound like terrible UI design, but I need to be able to disable a button *without* greying it out Feb 05 01:29:45 just say view to VIEW.INSIVIBLE Feb 05 01:30:22 It will only show on the screen for about half a second, while it is animating out, so greying it out or making it disappear looks a little odd, but if the user clicks it for whatever bizarre reason then I don't want the click animation to happen Feb 05 01:30:38 (And maybe a second before it animates out as well) Feb 05 01:33:01 set animation to fade_out? Feb 05 01:36:28 set onclicklistener for the button to .setVisibility(false)! Feb 05 01:36:32 ; Feb 05 01:38:25 how much java should one know before they should get into android dev? since i used php and bash and such for over a decade and node and python for the past 6 months i have a head start Feb 05 01:39:28 java's pretty simple Feb 05 01:40:40 the problem with starting to learn android for you probably won't be the java part... it's the lifecycles probably Feb 05 01:40:50 getting osed to the framework Feb 05 01:41:23 for the animation, (if you want it programmatically) you could use fadeOut.setStartOffset(time); fadeOut.setDuration(time); Feb 05 01:42:15 HactarCE, easiest would probably be to just bail out at the beginning of the click handler... Feb 05 01:42:30 HactarCE, other option is to make your own button style Feb 05 01:43:28 yeah im learning about the activity lifecycle and its extremley interesting to me. Feb 05 01:44:20 Ok Feb 05 01:44:58 Rather than try to get rid of the animation, I made it display a toast that says "Are you TRYING to break my app?" Feb 05 01:45:22 Thanks though :) Feb 05 01:45:24 -.- Feb 05 01:46:07 I feel like if someone puts in the amount of effort required to push that button while it's sliding off the screen, they should be rewarded with something! Feb 05 01:46:21 fair enough Feb 05 01:46:38 you could just remove the click handler though Feb 05 01:46:43 that's also effective Feb 05 01:46:56 Eh... it'd be really annoying to put it back though Feb 05 01:47:03 why? Feb 05 01:47:06 But that probably is the best option Feb 05 01:47:07 Because I' Feb 05 01:47:14 Because I'm not storing the click handler in a variable Feb 05 01:47:24 I just add it on during onCreate Feb 05 01:47:31 I could extract that into a method though Feb 05 01:47:47 easy enough to move it to a field, but suit yourself :) Feb 05 01:48:19 Yeah, that does get rid of the animation. thanks :) Feb 05 01:50:06 need to sleep, good night Feb 05 01:50:16 gn Feb 05 01:50:49 anyone that is still here, how could i add an onClickListener to a custom listview/adpater? Feb 05 01:51:00 gn Feb 05 01:51:13 ixx, You want an onClickListener for each element? Feb 05 01:51:19 yes Feb 05 01:51:34 (iix) String[] example = new String[] { "1", "2", "3","4", "5", "6", "7", "8", "9" }; Feb 05 01:52:20 if i make a method for it to be like .addList("Title") Feb 05 01:52:28 would i be able to work it out? Feb 05 01:52:45 is there a banking channel g00s? I want to talk about cost-of-supplies accounting Feb 05 01:53:53 Do you have `View getView(...)` defined? Feb 05 01:53:58 In your adapter, that is Feb 05 01:54:39 ixx? Feb 05 01:54:41 public view getView( Feb 05 01:54:46 yea Feb 05 01:55:22 In there you should be able to add an onClickListener to whatever your root view is for each list item Feb 05 01:57:25 so how could i add it so each list button had its own onclick? Feb 05 02:02:49 (sorry for late reply) you can do that in getView Feb 05 02:02:54 capella no idea ... Feb 05 02:03:05 Use the usual findViewById thing Feb 05 02:03:17 ah, k 😏 was playing Feb 05 02:03:47 You'll probably have to do something like `rootView.findViewById` Feb 05 02:03:57 @ ixx Feb 05 02:05:24 i have it as convertView.findViewById(R.id.appName); Feb 05 02:06:00 that's for the text Feb 05 02:20:44 finally capella .. unlimited bacon ! http://blogs.plos.org/ecology/2017/02/01/invasive-wild-pigs-leave-a-swath-of-destruction-across-u-s-and-they-keep-spreading/ Feb 05 02:22:26 I'm eating them things as fast as possible, you know? Reducing methane sources for the climates Feb 05 02:24:26 capella you have some open space by you to herd them :) Feb 05 02:24:44 time for trip to GA :D Feb 05 02:26:28 I've been doing my part co. combatting feral warming for 2 years http://www.seriouseats.com/2014/04/why-you-should-be-eating-more-wild-pigs-right-now.html Feb 05 02:27:51 Them peckers in Abilene keep driving over at 3am and dropping their excess off in Dallas Feb 05 02:28:59 but will they bring a case of Clausthaler and throw a proper party?...... nooooooooooooo-oooooooooooo Feb 05 02:31:27 i'll pass eating stuff from tx Feb 05 02:32:01 clearly, there is something in the water down there ;D Feb 05 02:48:26 capella is your future finance job on the list? http://www.zmescience.com/other/economics/china-factory-robots-03022017/ Feb 05 02:49:13 need to invent a robot the just moves around the area and collects up wild pigs for bacon Feb 05 02:51:29 We're using 16$ robots on the line that replace 28$ human techs already, yet San Francisco and others want to mandate 15$ salaries for entry level jobs... I think I see an issue Feb 05 02:53:51 😆 Shit Capella says Feb 05 02:56:14 capella sounds like we'll need to a postcapitalism society ;) Feb 05 02:57:30 or one less regulated out of existence by bunny huggers who don't understand nature Feb 05 02:59:41 capella was just reading this. how would less regulations help? https://www.texastribune.org/2016/12/21/texas-abandoned-oil-wells-seen-ticking-time-bombs-/ **** ENDING LOGGING AT Sun Feb 05 03:00:01 2017