**** BEGIN LOGGING AT Sun Nov 08 02:59:58 2015 Nov 08 03:00:46 meh, in my day to day IT business i'm about as ethical as it gets. working towards my OSCP and I keep SMBs quite happy with their IT infrastructures. Nov 08 03:00:56 but this is a way to make a little side change, and after all the guy is kinda my friend. Nov 08 03:00:58 *kinda* Nov 08 03:01:21 lazy coder, not lazy in general. Nov 08 03:09:00 * g00s playing around with fzf Nov 08 03:10:25 hi guys! Nov 08 03:11:18 does anyone knows a way to run MongoDB instead of LiteSQL in Android? :) Nov 08 03:11:23 Is that even posible? Nov 08 03:11:29 lol Nov 08 03:11:43 HikaruBG along with your node.js + express app ? Nov 08 03:11:47 :) Nov 08 03:12:52 :) Hahaha Nov 08 03:12:56 wow mongdb at 3.2 already, they were 3.0 just a little bit ago. must be getting good by now :) Nov 08 03:13:41 My REST Server is using MEAN Stack .... :) And I was wondering is there a way to just reuse the DB... instead to build one on LiteSQL Nov 08 03:13:52 oh, well.... I have to dive into that am I :) Nov 08 03:15:18 Any known tools that can automate the process of converting MongoDB schema to SQL tables ? :) Nov 08 03:16:08 if you are forced to go relational, may as well just drop mongodb Nov 08 03:16:22 put in postgresql - there you go, rdmbs + rdmbs done :) Nov 08 03:16:54 use json data type Nov 08 03:17:09 (if you must) Nov 08 03:17:20 I am kind of new at Android Dev.... so PostgreSQL can be used as local DB for Android App? Nov 08 03:17:41 HikaruBG no - only sqlite Nov 08 03:17:49 Yes, I would like to use JSON Data Type, because of my REST services - they return JSON Nov 08 03:18:02 thanks, g00s Nov 08 03:18:04 but the impedance mismatch between the schemas of service / client can be minimized Nov 08 03:18:25 I see Nov 08 03:18:32 well - it is logical :) Nov 08 03:19:27 g00s, let me ask you a structural question.... I am going through the Udacity/Sunshine App example by Android Dev Lab folks. Nov 08 03:20:05 They have creates AssyncTask to pull the initial data from the server, and then have moved everuthing to SQLite and created Sync tasks.... Nov 08 03:20:25 But I didn't understand why this is the better approach Nov 08 03:22:11 g00s, Any thoughts? Nov 08 03:23:05 HikaruBG i havent used sync adapter, not what other techniques people use there Nov 08 03:36:40 They reason with the App LifeCycle and keeping the data intact when the app is being destroyed by the Android OS. Nov 08 03:59:41 what's the easiest way to take this code: http://pastebin.com/7jUZ2JU1 (simple alertdialog method) and add a timer into it so that after 60 seconds the dialog closes and then starts a different method? Nov 08 04:00:20 It doesn't need to be extravagant and show a countdown timer, it just needs to wait 60 seconds and if the user doesn't click cancel, then it closes the dialog and executes a different method Nov 08 04:16:21 anybody? Nov 08 04:18:49 Start a timer in a separate thread and when it's up, close the dialog Nov 08 04:31:35 Cedric, and by seperate thread(I'm C-minded), you mean call it from a different method(handler, etc) and then when that method's timer has ran up, it'll close dialog, correct? Nov 08 04:32:06 No, spawn a different thread where you do the countdown Nov 08 04:33:55 that's what I was trying to say. I have myHandler call -> myDialog Nov 08 04:34:01 myHandler has the countdown, right? Nov 08 04:34:04 or am I a complete idiot Nov 08 04:34:42 Not sure why you keep going back to this handler thing Nov 08 04:34:57 because I read that the "handler" library can handle countdowns etc. Nov 08 04:35:29 I have no idea what this is, my suggestion is pretty clear I think: spawn a thread that counts to 60 seconds and which then, closes the dialog. Nothing to do with handlers Nov 08 04:35:33 can I just create a timer in mainactivity that launches the dialog and when that timer expires so does the dialog? Nov 08 04:36:00 I am confused as to what exactly a thread is, a thread is a process that's running within the application correct? Nov 08 04:36:10 Might want to look "threads" up then Nov 08 04:36:32 mutually agreed. I am certainly jerry rigging my code >_> Nov 08 04:40:10 @CedricBeust I think I got what you're saying now Nov 08 05:04:31 man this is crazy https://medium.com/keepsafe-engineering/the-perils-of-loading-native-libraries-on-android-befa49dce2db Nov 08 05:05:18 at the end of the day, a dev expects the package he/she ships with the app will be useable by their own app ... when such basic stuff breaks its pretty much all bets off Nov 08 05:06:43 CedricBeust you still there? Nov 08 05:06:57 I'm always here Nov 08 05:07:04 heh, kay. Nov 08 05:07:50 so, this is my code: http://pastebin.com/CLsk8Y53 the alert dialog is launched from the timer thread, however, I can't get it to close. Nov 08 05:08:06 time is set to 5(5 seconds) Nov 08 05:08:09 still doesn't close. Nov 08 05:08:27 I know I'm damn close now, but it still wont work Nov 08 05:09:08 Graphic operations must always be done on the event thread Nov 08 05:09:09 will I need to add a "return" as well to make it close the thread? Nov 08 05:09:41 what type of method for a timer should I be using to contain the secondAlert method? Nov 08 05:10:21 secondRunAlert is my AlertDialog Nov 08 05:24:50 CedricBeust was reading some comment that google worked on Go because the c++ codebase was difficult to understand - does that have any validity ? Nov 08 05:25:25 No, Go was developer by a very tiny team of people who were tired of C++ taking a long time to compile, so that became their number 1 goal: fast compiles. Nov 08 05:25:28 The rest is sad history Nov 08 05:25:40 oh lol Nov 08 05:26:10 One problem with native libraries is expected behavior is different Nov 08 05:26:15 Google has a very disciplined C++ coding style, their C++ codebase is pretty easy to follow overall despite its complexity Nov 08 05:26:27 Like one of my screensaver apps, it expects the screensaver to stop and start Nov 08 05:26:53 Whereas with live wallpapers, you can have it running and then jump into a preview in the middle of a draw Nov 08 05:27:51 So thread safety, critical sections etc. can be affected when expecting the typical Unix a process starts then stops Nov 08 05:29:13 Also, instead of daemons communicated with signals and such, you have services which receive broadcasts...expected behavior from standard C/C++ libraries can be unexpected on Android Nov 08 05:29:51 guys, is there actually any benefit to using some like "@android:color/white" instead of a simple #fff? Nov 08 05:29:57 something* Nov 08 05:30:48 I think its mostly just for clarity AFAIK Nov 08 05:31:17 I thought I was going to have a tough time with these overlapping views Nov 08 05:31:25 But View.setZ is pretty cool Nov 08 05:31:29 yay for Material Nov 08 06:05:34 I’m trying to add google cloud messaging to my app but whenever I try to sign up I keep getting operation forbidden? Nov 08 06:05:44 Does that app have to be in production or something? Nov 08 06:06:01 b4b does it need certain permissions in the Manifest (I'm guessing) Nov 08 06:07:17 I’m using this url https://developers.google.com/mobile/add Nov 08 06:07:31 Ologn: so it does require an apk upload beforehand? Nov 08 06:07:47 My thought is the service gets enabled then added to the app Nov 08 06:16:17 I go to that URL and it asks me to log in Nov 08 06:17:36 b4b reading about Google Cloud messaging, I think you need one or more permissions in the Manifest Nov 08 06:18:08 b4b https://github.com/google/gcm/blob/master/samples/android/gcm-demo/src/main/AndroidManifest.xml Nov 08 06:22:44 im lost I thought apple remote push notifications would be the hard one not gcm Nov 08 06:23:17 the google sites have terribly uninformative error messages Nov 08 06:31:59 think i got it! Nov 08 06:32:09 had to enable developer console in admin apps Nov 08 06:32:28 no longer getting forbidden error Nov 08 06:33:54 that's science for ya Nov 08 06:34:39 science era is ending after many centuries, finally we can back to astronomy and religion Nov 08 06:35:07 use it up while it's still around Nov 08 06:35:13 lol Nov 08 06:44:37 is it still accetpable to use eclipse or is it now mandary to use android studio? Nov 08 06:47:53 have you tried android studio? Nov 08 06:49:42 barely im more comfortable in eclipse Nov 08 06:51:08 give it a try and be your own judge. android studio gets updated and the android tools for it. eclipse doesn't get updated anymore with android does it? you using gradle? Nov 08 06:51:56 depending on what you are coding, you are probably using a decaying ide for android Nov 08 06:52:05 true Nov 08 06:52:33 the one thing i really like in eclipse is the hover over class with the popup to auto add the import Nov 08 06:53:07 android studio has quite a bit of automation Nov 08 06:53:18 android studio is worth the learning curve Nov 08 06:53:27 maybe ill give it a shot Nov 08 06:53:54 i haven't used eclipse in maybe close to or over 2yrs Nov 08 07:21:58 where do you all get color themes for AS Nov 08 07:23:13 darcula(sp?) works pretty good, you wanting bright or dark Nov 08 07:24:01 dark ofc yea im not talking about the default ones Nov 08 07:24:07 theres only 2 default lol Nov 08 07:25:35 i found http://color-themes.com/?view=index Nov 08 07:26:00 supposed to work with Idea, guessing they should work with AS to some extent Nov 08 07:26:22 try em out, but darcula ftw Nov 08 07:27:05 yea i always liked the stark theme on ST http://colorsublime.com/?q=stark Nov 08 07:28:15 looks iffy, mixes the same color with different items Nov 08 07:29:11 thats fine. If you give a different color to everything it would look ridicoulous Nov 08 07:29:39 why is unicorn same color as function and var Nov 08 07:29:47 and method name same as the argumen ts Nov 08 07:29:51 seems messy Nov 08 07:29:57 and the white with the return Nov 08 07:30:30 so? even with darcula, i have 2 lines of code that use the same color for 4 different items Nov 08 07:30:43 prove it Nov 08 07:31:04 that stark just isn't doin it, plus it isn't java Nov 08 07:31:17 maybe stark with java would be better Nov 08 07:32:23 you realize theres a java option on that page right Nov 08 07:32:27 also for AS: http://prntscr.com/90byu1 Nov 08 07:32:48 you do realize i shouldn't have to think to adjust your post :) Nov 08 07:33:02 what? Nov 08 07:33:24 why should i have to take the time to adjust, why not show it already configured Nov 08 07:33:34 i have no idea what your talking about mate Nov 08 07:33:36 anywho, darcula ftw Nov 08 07:33:43 it doesn't matter Nov 08 07:34:08 themes are a users perception, can't win em all Nov 08 07:35:11 Good afternoon guys. I have an LG Optimus G Pro/E988 cell phone. During cell phone calls, the internal microphone in my phone does not work, and when I try to record anything using the stock voice recorder/other recording applications, it does not work either. But audio recording works perfectly when I capture videos. Nov 08 07:35:15 fyi, the java setting has just a black white theme Nov 08 07:35:42 Can anyone please explain what is wrong with this phone. Nov 08 07:35:55 Anirban, show your code Nov 08 07:36:25 I don't have any code to show :/ Nov 08 07:36:33 canvs2321-: yea im not sure if thats just the preview or what, never tried it with java, just coffeescript/jade/stylus etc Nov 08 07:36:43 Anirban, then you are in the wrong channel Nov 08 07:37:00 Ok. Nov 08 07:37:03 orbyt_ haha, exactly :) Nov 08 07:38:19 canvs2321- i'm going to start using that "blah blah ROM blah not working blah" ... "show your code" Nov 08 07:38:33 easiest way to vet :) Nov 08 07:39:31 i'm just not much for all the extra words ppl like to use. gotta get direct :) Nov 08 07:49:48 g00s: night Nov 08 07:50:19 true Nov 08 08:13:29 hey thepoosh Nov 08 08:37:20 I have installed the complete android SDK,NDK,eclipse and JDK Nov 08 08:37:33 Now, I need to build the gstreamer package for android using the SDK Nov 08 08:37:36 Can anyone help me to guide me how to build the http://gstreamer.freedesktop.org/data/pkg/android/1.6.1/gstreamer-1.0-android-arm-1.6.1.tar.bz2 Nov 08 08:37:59 Do I need eclipse for that? Nov 08 08:50:29 hey my when i set minSdkVersion to 17 it throws error: Manifest merger failed with multiple errors Nov 08 08:50:38 why** Nov 08 08:59:21 hi everyone Nov 08 08:59:25 firs time here Nov 08 08:59:27 so scary Nov 08 08:59:32 first Nov 08 09:00:04 not shure this thing even works Nov 08 09:00:09 or anyone alive here Nov 08 09:00:36 no Nov 08 09:00:54 just as u thought Nov 08 09:01:02 as i* Nov 08 09:02:10 lol Nov 08 09:11:14 ebnder: HAI Nov 08 09:39:15 Hi! I'm trying to add a ratingbar programmatically on my app and I added this code: http://pastebin.com/jknSePTa but it doesn't show up, do anyone know why? Nov 08 09:39:32 I have googled and you don't seem to need to add something more to the bar, so I don't know why it doesn't show up Nov 08 09:46:39 Zajt: do you add the bar to layout Nov 08 09:47:24 Ashiren: yes I do that, this is the all the code for the onCreate method: http://pastebin.com/B0RwNmTD Nov 08 09:49:01 try MATCH_PARENt to see if it has any effects Nov 08 09:52:05 Ashiren: yes I tried that and now I don't see them in the correct place but it seems to be one star behind the button :o Nov 08 09:52:13 on the top-right Nov 08 09:53:11 probably some placing problem Nov 08 09:54:03 yeah how can I place it under the View in the code since the View is one vertical line? Nov 08 10:05:34 Do you have any thoughts on how I can do that Ashiren ? Nov 08 10:11:06 Zajt: Why not use XML first? Then, once you figure things out, use Java. Nov 08 10:11:11 It's much easier that way. Nov 08 10:11:15 I have done it in XML Nov 08 10:11:34 in XML it's easy to make a design, you can just drag and drop. But now I wanna do it in java code as well :) Nov 08 10:11:34 What is the issue? I wasn't here at the start. Nov 08 10:11:46 I'm trying to add a RatingBar Nov 08 10:11:50 I never drag and drop. That doesn't seem useful to me. Nov 08 10:12:33 and it didn't work when I had WRAP_CONTENT but then I changed to MATCH_PARENT and then the star appeared but in the top right behind a button, and I can only see some part of it Nov 08 10:12:34 very small Nov 08 10:13:29 This is the code I have now: http://pastebin.com/0ri34sr3 Nov 08 10:13:52 If you have it working in XML, you should be able to translate that to Java fairly simply. Nov 08 10:14:31 Yeah I have the XML file, but it's difficult to translate it :P Nov 08 10:16:49 So it's working in XML? Nov 08 10:16:57 Yes Nov 08 10:17:24 Which XML change that made this work is hard to translate to Java? Nov 08 10:18:32 I don't just look at the xml and translate that, but I look at the design and try to fix that in java. But it's the ratingbar Nov 08 10:18:38 TacticalJoke: HAI Nov 08 10:18:44 what goes with your reddit app? Nov 08 10:18:54 where I am stucked, i don't get it to the position where I want Nov 08 10:19:07 Zajt: The best way is to look at the XML and translate it to Java. Nov 08 10:19:10 thepoosh: Pretty well. Nov 08 10:19:17 can I beta test it? Nov 08 10:19:24 TacticalJoke: yeah but it won't be a difference for me, I would still solve it in this way Nov 08 10:19:46 so I would get stucked on the same place if you understand Nov 08 10:21:48 i was trying to keep content of my fragment while screen rotation. I am trying onSaveInstanceState , but i couldnt get it work. What should i do with ArrayList to use in onSaveInstanceState ? Nov 08 10:22:32 thepoosh: Not sure when. I'll let you know. Nov 08 10:22:49 dcz: You should be able to do that with Bundle.putStringArrayList. Nov 08 10:23:18 i did that Nov 08 10:23:25 TacticalJoke: at least let me code review you Nov 08 10:23:28 anything!!! Nov 08 10:23:39 are you using the API wrapper suggested in their docs? Nov 08 10:23:43 there is no app Nov 08 10:23:53 he just wants to test us :p Nov 08 10:24:01 program crashes or doesnt show anything Nov 08 10:24:32 thepoosh: Which API wrapper? Nov 08 10:24:41 dcz: If it crashes, check LogCat. That'll tell you why. Nov 08 10:25:01 TacticalJoke: https://github.com/reddit/reddit/wiki/API-Wrappers Nov 08 10:25:17 Oh, no. Nov 08 10:25:22 I just use OkHttp and Jackson. Nov 08 10:34:16 Hmm. On Lollipop (and, as far as I can tell, Marshmallow too), if an activity has a start transition (e.g., the default one), any indeterminate ProgressBar that activity shows has a delay before it appears. Nov 08 10:34:25 But gladly disabling the transition fixes this. Nov 08 10:39:01 TacticalJoke: i changed to LinearLayout and now the stars are in the correct place Nov 08 10:39:09 but they are 8 stars, and I have this in my code: bar.setNumStars(5); Nov 08 10:39:10 wtf? :o Nov 08 10:39:16 Zajt: Why are you doing this in Java, BTW? That's a lot more difficult. Nov 08 10:40:00 TacticalJoke: yeah I wanna just try it and do both ways Nov 08 10:40:01 to learn Nov 08 10:42:34 Okay, but bear in mind that some things are way simpler in XML. An example is something like this: `android:background="?attr/colorAccent"`. Nov 08 10:42:40 The equivalent Java code is a lot more wordy. Nov 08 10:42:51 Yes XML is much easier Nov 08 10:43:09 Do you know why it shows 8 stars when I have bar.setNumStars(5); ? Nov 08 10:43:45 "Sets the number of stars to show. In order for these to be shown properly, it is recommended the layout width of this widget be wrap content." Nov 08 10:45:37 TacticalJoke: aah ok now i changed back to wrap_content and it's 5 :) Nov 08 10:45:40 sweet Nov 08 10:46:37 TacticalJoke: do you know how to center it? that's the last thing I need to fix :) Nov 08 10:48:18 Probably `params.addRule(RelativeLayout.CENTER_HORIZONTAL);`. Nov 08 10:49:27 alright but it should be bar.setLayoutParams since params is the name for the params for my View, I guess? Or should I use the params? Nov 08 10:50:07 No, the name of the variable has to be "params". Nov 08 10:50:10 Just kidding, of course. Nov 08 10:50:46 I changed to LinearLayout, there is no CENTER_HORIZONTAL on LinearLayout Nov 08 10:54:52 it didn't seem to be any center thing on LinearLayout Nov 08 10:57:59 We'd need to see the LinearLayout to answer this. (Preferably in XML.) Nov 08 11:00:33 TacticalJoke: alright this is the javacode: http://pastebin.com/irEiesRn i wanna add it on line 49 Nov 08 11:00:55 do you want the xml code as well? because we just need to center it, do you we need the xml to know that? Nov 08 11:01:56 Zajt: It's actually easier for you to google this. :D Nov 08 11:02:07 Googling "linearlayout center java" even gives you non-XML solutions. Nov 08 11:02:53 hi Nov 08 11:05:06 Nexus 5, android 6, stock rom: does anyone experience any of those: phone resets when trying to call somebody, laggy SMS-es, laggy desktop (does not load) Nov 08 11:05:53 widgets does not load (official google calendar & google keep) Nov 08 11:05:56 never called anyone or sent/received SMSs on my n5, homescreen works fine Nov 08 11:06:17 Teeed: This channel is for app development only. Maybe try #android. Nov 08 11:06:21 thx Nov 08 11:12:55 TacticalJoke: yeah true I did that and solved it, thank you very much for the help! :) Nov 08 11:19:49 I'm trying to design this: http://puu.sh/ldOxp/42c3d7092b.png and for the second Textfield, I did the same for the first one but it doesn't show up, do anyone know why? I added lines 53 to 56 here: https://ideone.com/rO2eRZ Nov 08 11:23:33 ha, someone's making a metronome app in cordova -.- Nov 08 11:36:56 zajt you need to set LayoutParameters.. better yet, just place the EditText in the xml Nov 08 11:37:25 all this stuff should just come from a layout xml Nov 08 11:38:02 osxorgate: alright but i wanna do this only in java, but why does I have to set parameters on this edittext and not the first one? Nov 08 11:39:17 zajt the reason it's not shown is you dont add it to the layout Nov 08 11:39:25 58-60 Nov 08 11:39:28 ohhh forgot that Nov 08 11:39:32 but really, you should use xml Nov 08 11:39:52 setting width to 1000 will give different results on different devices Nov 08 11:40:22 yeah I did it in xml, i just wanna do it in javacode as well Nov 08 11:40:41 it worked now :) Nov 08 11:41:38 do you know though how I can move the text so it starts lower down? right now it starts right under the stars, but I want it to look like this: http://puu.sh/ldPqF/533769c42f.png so there is some space Nov 08 11:45:06 nvm i solved that with params and match_parent Nov 08 11:48:04 Woho I'm done :) the only question I have is what 'PorterDuff.Mode.SRC_ATOP' means here: et2.getBackground().setColorFilter(Color.CYAN, PorterDuff.Mode.SRC_ATOP); Nov 08 11:48:23 i have googled but I don't still really understand what it means and what it does Nov 08 11:48:54 Why did you write it if you don't understand what it does? Nov 08 11:49:50 it solved my problem earlier :P Nov 08 12:12:46 imagine 2 colors getting combined Nov 08 12:12:53 that can happen in many ways Nov 08 12:13:00 so look up PorterDuff modes Nov 08 12:13:10 it's about multiplication and addition of colors Nov 08 12:14:28 i really dont get the point of the id of th notification Nov 08 12:14:39 is Random() enough for it? Nov 08 12:29:18 I just started Android testing by using `ActivityInstrumentationTestCase2`. I'm using `TouchUtils` a lot, which is nice too. But now I want to test that (once I click on some button) `startActivity(intent)` is triggered. Anyway to do that? Can't find anything in the Google Android Docs. Nov 08 13:06:21 osxorgate: but when I need to set a color, why do I have to use that porterduff modes? there are no colors that will combine Nov 08 13:07:52 zajt you don't have to Nov 08 13:07:59 the colorfilter is a modifier Nov 08 13:08:03 you can leave it off Nov 08 13:09:52 Are there any fixes to superslow wireless ADB on windows without root? Nov 08 13:10:06 osxorgate: oh ok how? because just doing et2.getBackground().setColorFilter(Color.CYAN) doesn't work since it doesn't take one argument Nov 08 13:10:33 et2.setBackgroundResource(R.color.blah); Nov 08 13:11:31 what ahppened to r.drawable Nov 08 13:15:28 it saisi don't know i need the id to something that exists in every application, its launcher icon Nov 08 13:16:01 osxorgate: that uses xml though, i wanna try to do everything in java Nov 08 13:16:21 zajt, well then you're on your own Nov 08 13:16:36 what's wrong with resources? Nov 08 13:21:16 or yeah maybe i can do that Nov 08 13:37:12 Do anyone know why I don't get the same layout when I create a new project as my friend when he creates the same, but with different version of android studio? Nov 08 13:54:22 ¨but with different version of android studio¨ << this Nov 08 13:56:37 danijoo: yeah but my is weird, i don't get the settings bar even Nov 08 13:56:41 which should be standard Nov 08 13:56:57 *should* :) Nov 08 13:56:59 update your AS Nov 08 13:58:25 i have the latest version Nov 08 14:03:00 for using checkbox with fragments where should i place fragment Nov 08 14:03:19 for using checkbox with fragments where should i place *checkbox Nov 08 14:03:39 in activity's xml ? or in fragment's xml Nov 08 14:09:16 danijoo: when I create a new project, I get this stuff in the activity_main.xml : https://ideone.com/hZniMi but my friend don't get that stuff Nov 08 14:09:17 why? Nov 08 14:09:36 as you said, different versions Nov 08 14:09:55 why do you care about it? its just scaffolds. Nov 08 14:10:27 i'm using images from drawables to use in imageview. When I user higher res images I get OutOfMemoryError pretty fast. Shouls I just use lower res pics or is there easy work around? Nov 08 14:11:06 mentazoom, use images of appropriate size and/or scale them down when loading them into memory Nov 08 14:11:47 danijoo: Those picture are 5MB total, how much should I look for? Nov 08 14:12:01 thats huge... Nov 08 14:12:16 mentazoom, http://developer.android.com/training/displaying-bitmaps/load-bitmap.html Nov 08 14:13:25 danijoo: Thanks, I will read farther, but I should use Bitmap factory when using imageview? Nov 08 14:13:45 you should use bitmap factory if your images are too big Nov 08 14:13:54 or use picasso and let it do the job for u Nov 08 14:14:51 danijoo: Picasa? Nov 08 14:15:01 thats not what i wrote. Nov 08 14:15:37 i know i guessed it was typo because i googled picasso image editor Nov 08 14:16:03 it wasnt Nov 08 14:16:46 Oh I see what you mean now, should I rather try to compress the images or use the library? Nov 08 14:17:04 the library does that for you if you use it correctly Nov 08 14:18:41 will look into it thanks, how big size is small enough to be used safely without libraries? Nov 08 14:19:01 Or threading etc Nov 08 14:19:18 you cant generalize that Nov 08 14:20:13 I was thinking of using a tag in manifest to give more heap space, I don't know if that's good pratice or not Nov 08 14:20:20 its not Nov 08 14:20:26 and phones might just ignore that flag Nov 08 14:20:40 its more of a recommendation to the phone than a setting Nov 08 14:21:24 oh, I will have to look into picasso then Nov 08 14:21:40 using google play games, i have an account that just won't get logged in. using another account it's fine. what could be wrong? Nov 08 14:22:02 you should also check how many pixels the image takes on the phone when put into imageview Nov 08 14:22:13 and decide if its ok to add a scaled down version to the apk Nov 08 14:22:20 that will save memory + apk size Nov 08 14:23:06 for using checkbox with fragments where should i place *checkbox?in activity's xml ? or in fragment's xml Nov 08 14:23:15 I think I can scale it down pretty much actually, is there good free software to scale down? I don't want to download photoshop etc Nov 08 14:23:25 gimp Nov 08 14:23:42 thanks you mate, i will try to scale down first Nov 08 14:40:00 Do anyone know why activity_main looks like this: https://ideone.com/hZniMi when i start a new project? Nov 08 14:40:27 That happens if you pick the template with the floating action button. Nov 08 14:45:55 Any recommendations for a _fast_ serialization/deserialization library which will work with Python (desktop) and Java (Android)? Nov 08 14:46:14 Zajt, whats wrong with that Nov 08 14:46:22 its standard material layout scaffold Nov 08 14:46:49 skfax, you can use json. there are json libs for android and python Nov 08 14:46:58 or protobug Nov 08 14:47:03 protobuf * Nov 08 14:47:10 danijoo: Isn't that stuff really buggy? In any case, a FAB isn't always needed. Nov 08 14:47:55 danijoo: Tried JSON, just parsing the file took > 20 minutes before I killed it Nov 08 14:48:17 TacticalJoke, yes. but thats what you get in new AS if you chose the scaffold Nov 08 14:48:30 Sorry, parsing the data. The file was already read into a byte[] Nov 08 14:48:43 I think most experienced ppl start with blank projects anyways Nov 08 14:48:51 skfax, what kind of data? Nov 08 14:49:04 skfax: From what I've seen, stream-parsing with Jackson is about the fastest. Nov 08 14:49:15 danijoo: Mostly large matrices of floats Nov 08 14:49:31 The JSON filed ended up being 13 MB uncompressed Nov 08 14:49:33 If the data is huge, though, it doesn't seem sensible to have it all in memory at once (all in a byte array). Nov 08 14:49:45 skfax, thats pretty huge for mobile Nov 08 14:50:10 ffuuu.. forgot to add the user to Play test users :(((( wasted a few hours Nov 08 14:51:29 It's about 622496 floats, so ~2.5 MB of in-memory data Nov 08 14:51:55 does the phone really have to know about all 622k floats? Nov 08 14:52:14 Yeah, it's weights for a neural net Nov 08 14:53:00 you could package them into the apk Nov 08 14:53:05 if they dont change Nov 08 14:53:08 They are user provided Nov 08 14:58:03 you could try MessagePack. Its like json, but smaller and more optimized for binary Nov 08 14:58:12 or send the data in packages. dunno.. Nov 08 15:00:26 Yeah both JSON and Pickle will not work Nov 08 15:01:02 But since I need all the data in-memory, it might be best just to write it to raw binary and read it straight into the correct memory representation Nov 08 15:01:34 MessagePack does look pretty right though Nov 08 15:01:45 danijoo: yeah but why can't I drag and drop stuff directly? it doesn't work Nov 08 15:02:26 Zajt: Dragging and dropping is useless anyway. Nov 08 15:02:31 When it comes to Android layouts. Nov 08 15:02:54 it works for just this small stuff Nov 08 15:04:57 and when i create a new project it looks like this: http://puu.sh/ldZC3/521eb20689.png where is the actionbar? so weird i just can't get the same starting point as my friend Nov 08 15:05:27 Pick the other template. Nov 08 15:05:51 One is "blank"; one is "empty". I can't remember which is which, but it's the opposite of whichever one you picked. Nov 08 15:07:20 oh alright, thought the blank was the standard one and the one my friend chose Nov 08 15:08:06 Yeah, the naming is bad. "Blank" and "empty" are synonyms. Nov 08 15:08:52 Yeah now it looks better, thank you TacticalJoke :) Nov 08 15:18:55 How do you make a new line in xml? This: http://puu.sh/le0ku/340feb2759.png worked before but now it doesn't work. I don't think you should do that way Nov 08 15:20:37 well, blank and empty imply slightly different things Nov 08 15:20:47 you have a blank page, but an empty book Nov 08 15:22:11 Zajt: You can use `\n`. On a side note it might be best to place that text elsewhere (e.g., in 'strings.xml'). Nov 08 15:23:13 Alright but how do you use backslash n here? i tried "text" + "\n" + "more text" Nov 08 15:23:14 but it didnt work Nov 08 15:24:16 don't put newlines inline in your views Nov 08 15:24:29 put them in string resources Nov 08 15:24:36 yeah i changed to that Nov 08 15:25:12 hmm, whatever happened to the vzw unlimited data price increase, I've never seen any notice Nov 08 15:27:46 Zajt: You're using the plus operator and quote characters in XML? Nov 08 15:28:06 Yeah how do you else do it? i'm using to java hehe Nov 08 15:28:58 I'm sure you can guess, Zajt. :| Nov 08 15:31:38 yeah i figured TacticalJoke :) tyty Nov 08 15:40:01 TacticalJoke: do you know how to change the color of the line at the bottom here: http://puu.sh/le1lR/bae16d9f59.png ? I tried with android:background="@color/cyan" Nov 08 15:40:12 but that didn't work, it says "cannot resolve color/cyan.." Nov 08 15:41:12 Did you define a color named cyan? Nov 08 15:41:26 https://developer.android.com/guide/topics/resources/more-resources.html#color-element Nov 08 15:41:53 nyan Nov 08 15:44:10 oh nope missed that, thanks SimonVT ! Nov 08 15:48:57 that sets the background color in the whole EditText to the color, is there a way to just set the bottom line? Nov 08 15:49:26 Android really doesn't seem to like large strings. > 5 minutes and counting just to create a String of size 13 MB Nov 08 15:49:44 false Nov 08 15:50:07 and a 13000000 length string takes at least 26mb Nov 08 15:50:34 pfn: I didn't state a length. I stated a size in bytes Nov 08 15:51:03 i fixed it :) Nov 08 15:51:51 skfax, how do you know the size in bytes Nov 08 15:52:14 pfn: I'm creating the string from a byte array which is 13 MB Nov 08 15:52:35 skfax, that doesn't mean it's going to be 13mb Nov 08 15:52:47 #2 you just doubled the allocation Nov 08 15:52:59 so now you just took up 39mb in heap Nov 08 15:54:32 pfn: There is one user app running on a device with 3 GB RAM, should not be impossible. Nov 08 15:54:59 skfax, 3gb RAM does not mean your app can use 3GB Nov 08 15:55:26 The heap is probably 192 or 256 MB Nov 08 15:55:31 you might only be able to use arround 32-256 mb of mem Nov 08 15:55:55 for andorid 2.x its even below that, but i think there are no 2.x devices with 3gb ram Nov 08 15:56:03 Unless you largeHeap Nov 08 15:56:12 It's Android 5.1.1 Nov 08 15:56:14 ^ which system might ignore Nov 08 15:56:18 (largeHeap) Nov 08 15:57:29 for 5.1 i think you are save if you never expect more than 128 Nov 08 15:58:37 The memory usage seems to have stalled at 50 MB, still running after 15 minutes. Just "new String(buffer, "UTF-8")" Nov 08 15:59:22 it should be relatively instantaneous Nov 08 15:59:38 the wait is somewhere else, look at your thread stacks Nov 08 15:59:42 Yeah reading the byte[] from file takes < 1 second Nov 08 16:00:02 the only reason it would take a long time is constant gc cycles, which is unlikely Nov 08 16:01:11 is there something in logcat? Nov 08 16:01:25 watch for gc log entries Nov 08 16:01:54 Nothing in logcat Nov 08 16:02:46 Pausing the program just shows it being in the java.lang.String constructor Nov 08 16:03:03 cant you just send the file you are reading from instead of serializing to string first? Nov 08 16:03:14 or is this already on the receiver side? Nov 08 16:04:03 I was creating a string which I could parse as JSON. I'm probably not going to do it this way though; at the moment I'm looking at using the MessagePack library Nov 08 16:04:32 I just retried this to see where the problem was. I thought it was the JSON parsing which was slow; but it turned out to be the String construction Nov 08 16:04:33 if you send it to a server, I would consider sending it as the byte[] and doing the work there Nov 08 16:05:26 skfax, just read directly into json parser Nov 08 16:06:15 but parsing 13mb will take years Nov 08 16:06:52 and a utf8 string of latin1 characters will take at least double the size of the byte array Nov 08 16:06:59 so yeah, 26mb still Nov 08 16:07:12 send the byte[] Nov 08 16:14:11 as for pausing and being in the string ctor, are you certain it's the same call Nov 08 16:14:52 when working with parsing, it's easily millions of new strings with a string that large Nov 08 16:17:23 How can I in XML fix so a label starts where the left edge of the app is like this: http://puu.sh/le3CG/48f3051db0.png ? Nov 08 16:18:51 remove padding/margins on the parent that is stopping you Nov 08 16:21:03 thanks canvs2321- :) Nov 08 16:21:14 you get it? Nov 08 16:30:04 canvs2321-: yeah Nov 08 16:30:17 excellent Nov 08 16:33:38 everyone shush, drose379 is present Nov 08 16:33:57 ?? canvs2321- Nov 08 16:34:24 nothing to see here Nov 08 16:34:31 move along Nov 08 16:34:34 What hahah Nov 08 16:34:56 it's above your pay grade Nov 08 16:35:02 What is? Nov 08 16:35:08 exactly Nov 08 16:35:33 What are you talking about man Nov 08 16:35:44 ah my bad, thought we were still in #NSA Nov 08 16:36:11 continue Nov 08 16:36:20 What? Nov 08 16:36:23 how's that java coe goin? Nov 08 16:36:56 i've said too much, let's try to forget Nov 08 16:37:21 Ok Nov 08 16:41:10 drose379, you have a question? Nov 08 16:41:15 i can sense it Nov 08 16:41:38 maybe something todo with elevation Nov 08 16:42:04 are you only targeting lollipop+? Nov 08 16:42:35 No not just lillipop Nov 08 16:42:43 earlier? Nov 08 16:42:50 Yes if its possible Nov 08 16:43:15 have you checked appcompat stuff to see if it supports elevation pre lollipop? Nov 08 16:43:25 Nope Nov 08 16:43:27 otherwise there are ways to do it, just have to add a shadow view Nov 08 16:43:44 what kinda shadow? Nov 08 16:43:54 can you post an example? Nov 08 16:44:01 One sec Nov 08 16:45:17 One of the libraries I use has a “embedded” ( I don’t know what its properly called) dependency on google services 8.1. Now I’m trying to add auth for google sign in but it can’t find an 8.1 library for auth. All the examples use 8.3 but I have depency clashes when I try that. Nov 08 16:45:45 I want to add elevation to the image in the middle canvs2321- http://i.imgur.com/59FxGlB.png Nov 08 16:47:35 drose379, if you can't do it using api, then you need to define the light source location, similiar to the sun how it casts shadows based on the hour of the day. Then just add a shadow view Nov 08 16:47:57 Thanks canvs2321- Nov 08 16:48:05 if not a clickable object then that makes it easier as you only need one shadow Nov 08 16:48:07 apineda: use 'exclude' in gradle file Nov 08 16:48:58 drose379, are you using a :background on the imageview? if only a src: then background is where you can add a shadow Nov 08 16:49:15 Just a src canvs2321- Nov 08 16:49:35 Do you think a shadow would even fit here though? Nov 08 16:49:42 was just about to address that Nov 08 16:49:47 osxorgate: can I easily print out a tree of dependencies for debugging purposes? Nov 08 16:49:56 if on a card i wouldn't add shadow, maybe some kind of emboss Nov 08 16:49:57 apineda: yes, Nov 08 16:50:15 or some kind of alpha to the colored ring to adhere it to the card Nov 08 16:50:16 apineda: something like ./gradlew -q dependencies Nov 08 16:50:29 don't lift it, make that image part of the card without the hard color ring Nov 08 16:50:37 So remove that ring Nov 08 16:50:48 make it less strong Nov 08 16:50:56 Ok, cool I'll try that Nov 08 16:51:09 it draws your eye to it, but too much Nov 08 16:51:10 What do you think about the rest of the card Candyman ? Nov 08 16:51:13 Ooops Nov 08 16:51:18 I meant canvs2321- ^ Nov 08 16:51:24 i go by many names Nov 08 16:51:34 Haha Nov 08 16:51:45 rest of it is soft, it's that solid ring that is outta place Nov 08 16:51:53 the rest looks good Nov 08 16:52:20 top toolbar is bit strong too versus the cards Nov 08 16:52:27 Thanks, I'll mess with the ring Nov 08 16:52:29 but i'm no designer Nov 08 16:52:29 And the toolbar Nov 08 16:52:39 Neither am I Nov 08 16:52:40 :D Nov 08 16:52:54 your cards are lookin good though, nice start Nov 08 16:53:00 Thanks Nov 08 16:53:58 toolbar misses elevation :) Nov 08 16:54:01 osxorgate: it only gives me Root Project, and then No configurations Nov 08 16:54:17 is there something else I should add to the command? Nov 08 16:54:23 What do you mean danijoo Nov 08 16:54:38 yeah good catch danijoo Nov 08 16:54:57 that may take away some of that hard color with the elevation Nov 08 16:55:02 drose379, cards should have an elevation of 2dp and actionbar 4dp iirc Nov 08 16:55:15 Got it Nov 08 16:55:19 apineda: app:dependencies, theres quite some info on the googles Nov 08 16:55:24 your cards have the elevation, but the toolbar is flat Nov 08 16:56:03 So do I just need the android:elevation in my toolbar layout? Nov 08 16:56:41 if elevation is supported. but if you are targeting older apis you'd need to add it yourself unless there is an appcompat attribute Nov 08 16:56:41 app:elevation if you are using appcompat Nov 08 16:57:06 I'll try that, one sec gonna paste a screenshot of what I did for the ring around the photos Nov 08 16:58:28 Might be easier to see if you zoom in: http://i.imgur.com/f2Uwgcg.png Nov 08 16:58:35 I think that AppCompat attribute doesn't do anything below 21. Nov 08 16:59:26 yep Nov 08 16:59:26 drose379, i like that more, but that's just me. i like how it blends with the top color Nov 08 16:59:46 below that you would need to wrap the toolbar in a Framelayout with a hand-made shadow Nov 08 16:59:49 Yeah I like it too actually Nov 08 17:00:09 I hate how so many modern phones have warm screens. Just got a Moto E, and pure white looks yellow. :\ Nov 08 17:00:21 On my Sony, it looks white. Nov 08 17:00:38 I dont know how to say that in english but the actionbar color really ´bites´ with the pink/blue Nov 08 17:00:43 i Nov 08 17:01:06 I see what you mean danijoo Nov 08 17:01:07 I´d consider something more neutral if you use those two colors in the layout. maybe a gray bar Nov 08 17:01:12 yeah the toolbar is still too much, add some elevation then work on coloring Nov 08 17:01:17 gray? Nov 08 17:01:18 clashes :) Nov 08 17:01:19 Bleh Nov 08 17:01:24 What about BlueGray Nov 08 17:01:29 osxorgate: thanks got it working. so what’s the syntax for excluding a package? compile(‘example.1.1’){ exclude ‘com.google.android.gms:play-services-ads:8.1.0’ } ? Nov 08 17:01:33 no idea. something that doesnt clash (thanks osxorgate ) Nov 08 17:01:54 danijoo, https://www.materialpalette.com/blue-grey/grey Nov 08 17:02:11 dunno. I suck at coloring Nov 08 17:02:23 Thanks Nov 08 17:02:30 with blue-grey it looks boring, but doesnt clash Nov 08 17:02:35 :/ Nov 08 17:02:51 Well the blue and pink will add the "not-boringness" to it Nov 08 17:03:15 Idk, I'll play around with it Nov 08 17:07:44 Anyone have an extra phone they can test something for me on? Nov 08 17:07:55 Want to see if my listview scrolling is choppy Nov 08 17:09:06 keep data processing out of getView(), lazy load images, keep a cache for bitmaps similiar to LRU Nov 08 17:09:20 Yeah no data processing in getView Nov 08 17:09:22 Just a switch Nov 08 17:09:28 Do you wanan check out the code? Nov 08 17:09:38 also: viewholders! Nov 08 17:09:39 paste it, maybe others will chime in Nov 08 17:09:51 I tried ViewHolders and I dont think they will make a dif here Nov 08 17:10:32 they make a huge diff in lists Nov 08 17:10:37 ^ Nov 08 17:10:55 Theres the getView() http://www.pastebucket.com/92766 Nov 08 17:11:01 I don't use "view holders" for ListViews. They're a poor man's ViewGroup, if you ask me. Nov 08 17:11:38 wow, you are doing to much work each getView call Nov 08 17:11:57 Why? Nov 08 17:12:00 TacticalJoke, have you compared the speed once? It can give you an improvment of 30 fps at timers Nov 08 17:12:02 times* Nov 08 17:12:16 drose379, lack of viewholder pattern Nov 08 17:12:18 danijoo: Why use view holder? Nov 08 17:12:26 I'm saying that using a ViewGroup is better. Nov 08 17:12:43 TacticalJoke, one could argue a custom Viewgroup is just a viewholder Nov 08 17:12:52 Yeah, but better. :D Nov 08 17:12:57 Is the only bad part that Im not using a ViewHolder canvs2321- Nov 08 17:13:03 drose379 you are constantly calling findView...that can be stopped if recycled view and values are still valid. you are invalidating each time and finding each time Nov 08 17:13:11 drose379: That doesn't look efficient. Nov 08 17:13:17 All those Resources lookups, etc. Nov 08 17:13:21 ^ Nov 08 17:13:24 Does it make it better if i now name my ListViewHolder classes ListViewGroup? :p Nov 08 17:13:27 Ok so ViewHolder will get rid of the resource lookups Nov 08 17:13:38 you don't always need to lookup Nov 08 17:13:40 `setImageDrawable` over and over. Why not use multiple view types and do it just once? Nov 08 17:13:46 check the view and decide Nov 08 17:14:09 yeah for the given screenshot you could have 2 viewtypes (male and female) Nov 08 17:14:30 together with viewholders (or groups) you could reduce the code in getView() to about 10 lines Nov 08 17:14:39 But would that increase speed? Nov 08 17:14:45 of course Nov 08 17:14:47 less work Nov 08 17:14:57 I dont really see much lag as of now though Nov 08 17:15:02 Anyone have time to test? Nov 08 17:15:07 remember, keep data processing of any kind to a minimum in getView() Nov 08 17:15:08 drose379, test on low end devices Nov 08 17:15:19 Like a s4 mini? Nov 08 17:15:34 Nexus 7 (2012) is SO. SLOW. Nov 08 17:15:37 like a Nexus One :p Nov 08 17:16:05 So you guys are saying I should have 2 seperate cards? Nov 08 17:16:10 One male and one female? Nov 08 17:16:12 yes Nov 08 17:16:20 and then recycle them Nov 08 17:16:31 drose379, guess you need to see where you are with your app. are you about done? if so get it working then ship. otherwise, time to refactor some code Nov 08 17:16:31 recycle as in reuse, not as in garbage collection Nov 08 17:16:50 canvs2321-, Im just starting it Nov 08 17:17:05 Yeah, you could extract a custom View out of this. It might have male and female modes. Nov 08 17:17:10 Then just return that View from getView. Nov 08 17:17:17 then decide if your time is worth refactoring right now, or once you are done with a shippable product Nov 08 17:17:37 You think its worth doing now? Or just keep moving with the app and do it later? Nov 08 17:17:57 keep moving i'd say. that code obviously needs reworking, but if working now, keep going Nov 08 17:18:11 Ok, I think it would be a good learning experience too Nov 08 17:18:18 Doing the custom cards and recycling Nov 08 17:18:33 It will make the difference between a 1 star rating ¨This app feels so clunky and slow¨ and a 4 star rating - Decide yourself Nov 08 17:18:40 get everything working, then optimize Nov 08 17:19:15 danijoo, do you agree with ^ Nov 08 17:19:28 I say do it before you release it Nov 08 17:19:29 danijoo: Do you think 500kb would be fine? I had 5MB before Nov 08 17:19:57 mentazoom, not if its an actionbar icon :p Nov 08 17:20:31 danijoo: It's drawables which is always in memory Nov 08 17:20:50 I draw them again and they may add up because of my bad code lol Nov 08 17:21:06 never done this before Nov 08 17:21:07 How can I move the marketed EditText so that the password is aligned with the text "Lösenord" here: http://puu.sh/le7vJ/2e1f087eee.png ? Nov 08 17:21:35 it's huge job to rename all of them to see if they will work.. Nov 08 17:21:36 set losenord top/bottom to the edit text Nov 08 17:21:40 Zajt, change dimensions of the textview and change its gravity to center_vertical Nov 08 17:21:52 and gravity ^ Nov 08 17:21:52 or bottom yeah Nov 08 17:22:20 canvs2321-: i can't move the losenord text, it should be there Nov 08 17:22:25 danijoo: alright i'll tyr Nov 08 17:22:26 try Nov 08 17:22:57 Zajt, textview default wrap content height is smaller than edittext, you need to match the textview size to match edittext, and set gravity Nov 08 17:23:06 danijoo: with dimensions, do you mean width and height? Nov 08 17:23:09 Ok the scrolling does feel a tiny bit clunky on my older device Nov 08 17:23:23 i have tried moving the edittext box higher up but either it gets too high up or too low Nov 08 17:23:30 no Nov 08 17:23:41 you set textview to match top bottom of edittext Nov 08 17:23:57 and set gravity for vertical center Nov 08 17:24:02 on textview Nov 08 17:24:43 alright how do I set the textview to match top bottom of edittext? what's that property called? Nov 08 17:24:55 is it a relativelayout? Nov 08 17:25:04 alignTop, alignBottom Nov 08 17:25:27 yeah relativelayout Nov 08 17:27:37 canvs2321-: the edittext is not here: http://puu.sh/le7X9/7222841a48.png Nov 08 17:28:05 get out of design view, and use text and just add it Nov 08 17:28:15 did you give your edittext an id? Nov 08 17:28:59 post your xml Nov 08 17:30:45 yes I did, this is my xml https://ideone.com/cwjSvt canvs2321- Nov 08 17:32:16 you have alignTop on the edittext, you want it on the textview Nov 08 17:32:35 edittext are larger than textviews by default, unless you use larger fonts on textview Nov 08 17:33:02 android:layout_alignParentTop="true" on textview isn't what you want Nov 08 17:33:03 also Nov 08 17:33:29 and android:layout_marginTop="70dp" Nov 08 17:33:39 it needs reworked Nov 08 17:34:50 android:id="@+id/textView3" and android:id="@+id/editText" should be set below android:id="@+id/textView2" Nov 08 17:35:33 best is, editText android:below="@id/textView2" then textView3 alignTop/alignBottom "@id/editText" Nov 08 17:36:15 weird tho that android:id="@+id/textView2" looks like an editText Nov 08 17:36:57 you have quite a bit of margin settings, you aren't utilizing relativelayout correctly Nov 08 17:37:07 you are doing it more towards framelayout Nov 08 17:37:34 Nov 08 17:38:58 yeah should it be edittext when you enter input? Nov 08 17:39:44 yes, input from user edittext, how'd you get that screenshot with "Anders" looking like an edittext, but your xml has textview Nov 08 17:40:14 the one with anders is textview, but i made it look that Nov 08 17:40:17 drag and drop haha Nov 08 17:41:31 well fuck i need to redo everything Nov 08 17:41:37 if i need to change to edittext Nov 08 17:42:11 you'll get it :) Nov 08 17:43:09 can't i use textview for this time? :P Nov 08 17:45:10 sure Nov 08 17:45:34 just remove all the marginX="Xdp" stuff, keep it relative Nov 08 17:51:59 canvs2321-: i need to margins to fix so that they are in the correct place that i want Nov 08 17:52:41 because you are incorrectly using the layout, stuff like android:layout_marginStart="41dp" is just weird Nov 08 17:53:07 android:layout_marginTop="15dp" Nov 08 17:53:07 android:layout_marginLeft="79dp" Nov 08 17:53:18 android:layout_marginTop="70dp" Nov 08 17:53:21 weird Nov 08 17:54:03 you are hard coding values that won't transverse across different device with different dpi etc Nov 08 17:56:09 alright now i will just make this design, i wont have no functionality or shouldnt work on different devices Nov 08 17:56:15 you can use /dimen/ values for other dpi, you are hard coding values == no good Nov 08 17:56:38 don't do that, remove all that margin stuff and use what relativelayout gives you Nov 08 17:57:14 otherwise you can wrap linearlayouts inside the relativelayout to keep a relation with row data Nov 08 17:58:57 alright i removed that, how can I structure it up now: http://puu.sh/lea2p/375decd96a.png ? Nov 08 17:59:31 using relativelayout attributes Nov 08 17:59:39 do you only have 4 items? Nov 08 18:01:43 nope i will make more later when i'm done with the first Nov 08 18:02:12 i'm trying to make this: http://puu.sh/leae2/68b20c1940.png Nov 08 18:08:46 how can I use relative attributes for that? which is relative and which are not? Nov 08 18:09:39 g00s: can i just say AW was not fun again Nov 08 18:09:40 ? Nov 08 18:10:18 thepoosh lol, yeah ... forgetting to read it lately Nov 08 18:10:24 simple, relative means just that. i want to set location relative to X view, then i want to set top/bottom relative to Y view etc... Nov 08 18:10:36 g00s: there is another listview tweaks article Nov 08 18:10:45 i saw Nov 08 18:11:00 for the most part its become /r/androiddev top 10 for the past week Nov 08 18:11:50 it could also just be not much interesting stuff is being written about lately ;) Nov 08 18:11:50 :S Nov 08 18:12:06 well, there's Square's IPO to talk about Nov 08 18:12:16 JakeWharton: what's the deal with that? Nov 08 18:12:23 lol thats not android weekly news Nov 08 18:16:44 thepoosh so next week i'm looking forward to an amazing article from glide's engineering team on low latency video Nov 08 18:16:51 on androidweekly :) Nov 08 18:17:24 g00s: actually in the sort of middle of writing something about location Nov 08 18:17:41 "how to not be location aware" Nov 08 18:19:41 thepoosh did you see that article on native libraries - have you ever had that problem ? Nov 08 18:19:57 not that i know of, need to read some more Nov 08 18:20:30 that article on native libraries showed that ppl use other sources than play store to download apps. so their f up Nov 08 18:21:00 g00s, you should read the stuff you post :/ Nov 08 18:21:14 canvs2321- i did Nov 08 18:21:52 obviously not, it wasn't an issue with android and ndk, it was with people downloading the app outside the play store, and them choosing the wrong architeture Nov 08 18:22:42 fud Nov 08 18:22:47 to me it sounds like a bug in the package manager Nov 08 18:22:57 false Nov 08 18:24:02 them using package manager they used it to see how the app was installed. by using that they saw that ppl with the exceptions weren't downloading from playstore. they were using another source and getting the wrong flavor of the app Nov 08 18:35:10 canvs2321-: what are you basing this statement on? Nov 08 18:35:34 canvs2321- afaik the bug is the installer failed to unpack the libraries Nov 08 18:35:36 the article Nov 08 18:35:45 read it Nov 08 18:36:12 the bug was ppl downloading from a 3rd party and not choosing the right flavor for their device Nov 08 18:36:31 what are the other alternatives for public abstract Location getLastLocation (GoogleApiClient client) ?? Documentation says - This method provides a simplified way to get location. It is particularly well suited for applications that do not require an accurate location and that do not want to maintain extra logic for location updates. Nov 08 18:36:38 or atleast the majority of the error Nov 08 18:37:39 canvs2321- maybe reread the article again Nov 08 18:37:42 "However, on some devices (e.g. Sony Xperia), Nov 08 18:37:42 * the symlink was updated, but fails to extract new native libraries from Nov 08 18:37:42 * the new apk." Nov 08 18:38:03 the biggest drop they received was checking how the app was installed Nov 08 18:38:54 just not sure how spreading this fear is useful, if not fully understood :/ Nov 08 18:39:04 fud Nov 08 18:40:44 however on some devices..... fear,uncertainty, and doubt!! :) Nov 08 18:42:31 when I create a new project, should MainActivity extend AppCompatActivity? Nov 08 18:42:43 eeyup Nov 08 18:42:50 the other project I created extended Activity Nov 08 18:42:52 if you want that Nov 08 18:42:54 because this one crashses when I run it Nov 08 18:42:58 you might want to use support library Nov 08 18:43:05 even if you dont target lower androids Nov 08 18:43:23 the logcat of crash :? Nov 08 18:43:55 hello guys, i did a todoList app with dynamic and static fragments if we say but i didnt understand the difference between apps with dynamic and static. they look same. here is the dynamic http://s6.dosya.tc/server3/hyqio9/TodoListWithFragments_2.zip.html , is this really dynamic ? Nov 08 18:44:27 Ashiren: the logcat looks like this: https://ideone.com/MhczbL Nov 08 18:44:38 dynamic == changes, static == stays the same Nov 08 18:44:59 they look same, so i cant say anything :D Nov 08 18:45:21 i know , the question is stupid Nov 08 18:45:27 maybe i am stupid :D Nov 08 18:45:49 dynamic means show a timer 60secs to 0secs with 59-X between, static means only 60secs Nov 08 18:45:58 Zajt: well whats on MainActivity line 23 Nov 08 18:46:22 dynamic means created on the fly data Nov 08 18:47:13 i really didnt understand :( Nov 08 18:47:15 this Nov 08 18:47:15 ActionBar actionBar = getActionBar(); actionBar.setBackgroundDrawable(new ColorDrawable(Color.LTGRAY)); Nov 08 18:47:16 canvs2321-, the issue with those articles is that they create circlejerks with cargo culters Nov 08 18:47:28 Same with that dumb fragment article :) Nov 08 18:47:34 i copied that from the other project, it's just changing the color of the actionbar Nov 08 18:47:41 and it worked in the other project Nov 08 18:47:41 Zajt: that is because getActionBar() returns null Nov 08 18:47:57 hm why? is there no actionbar from beginning? Nov 08 18:48:05 static : http://www.dosya.tc/server4/706qkv/TodoListWithFragments_1.zip.html , dynamic : http://s6.dosya.tc/server3/hyqio9/TodoListWithFragments_2.zip.html Nov 08 18:48:10 they changed to Toolbar Nov 08 18:48:11 but they look same Nov 08 18:48:15 i.e. look here https://stackoverflow.com/questions/29786011/how-to-fix-getactionbar-method-may-produce-java-lang-nullpointerexception Nov 08 18:49:25 Ashiren: alright so I should use ToolBar instead only? Nov 08 18:49:46 generally yes Nov 08 18:50:05 alright Nov 08 18:50:36 guys, can anybody tell me what is difference between these, static : http://www.dosya.tc/server4/706qkv/TodoListWithFragments_1.zip.html , dynamic : http://s6.dosya.tc/server3/hyqio9/TodoListWithFragments_2.zip.html Nov 08 18:53:16 Ashiren: now no toolbar/actionbar appears when I run my app, here is my code: https://ideone.com/OLsKaI Nov 08 18:53:21 can you see why? Nov 08 18:56:16 well Nov 08 18:57:31 what is your style/theme Nov 08 18:59:42 Ashiren: Theme.AppCompat.Light.DarkActionBar Nov 08 19:00:23 anyway read more about toolbar. it can be tricky to set it right at the beginning Nov 08 19:01:38 alright but it's weird that it doesn't show up at all, not sure if It should be there from beginning Nov 08 19:01:43 when creating an empty activity Nov 08 19:23:09 what is the most popular/standard way to access remote databases in android apps? Nov 08 19:24:01 ntio, A lot of apps use RESTful web interfaces Nov 08 19:24:26 ntio if you have more realtime requirements you can look at firebase Nov 08 19:25:16 no intense realtime requirements. Just looking for a modern, widely used protocol/interface Nov 08 19:25:21 danijoo: thank you Nov 08 19:31:59 I have a xml and json files that contain data I need to read in my app - what folder should I put them in? Nov 08 19:32:51 ok so im having debug issues. my app runs, then segfaults and logcat just tells me sigsegv in libc Nov 08 19:33:03 absolutely no useful information Nov 08 19:33:21 dmesg should contain stack trace Nov 08 19:33:24 although logcat should too Nov 08 19:33:58 my app (game) gets to setting ZoomLevel 0 and the next thing i see is Nov 08 19:34:04 ----- beginning of crash Nov 08 19:34:18 and one more log line telling me there is a sig 11 in libc Nov 08 19:34:25 donguston, assets folder Nov 08 19:34:35 actually now it says in tid what is tid? Nov 08 19:34:37 then you can get an inputstream via assetsmanager Nov 08 19:34:48 Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1f000f8 in tid 16224 Nov 08 19:34:56 just in root of res would do? Nov 08 19:36:56 /src/main/assets Nov 08 19:37:56 dmesg has nothing related to my app in it at all Nov 08 19:38:36 how can i debug this? Nov 08 19:38:45 im getting zero information about whats going wrong or where Nov 08 19:39:02 thats like microsoft popping up a window on boot saying "the application did not run" Nov 08 19:39:28 and you have no idea what application it was that didnt run Nov 08 19:41:39 can someone help me figure out where my problem is here? Nov 08 19:42:00 i mean give me a clue how to find out where the problem is because logs are not telling me shit Nov 08 19:43:29 I440r, ndk-gdb Nov 08 19:43:49 pfn that would be painful Nov 08 19:43:59 gdb is a horrible debugger :/ Nov 08 19:44:04 ndk is painful\ Nov 08 19:44:04 gdb is great Nov 08 19:44:13 I don't know wtf you're talking about Nov 08 19:44:46 pfn I would not even know where to begin to use it Nov 08 19:45:13 same as any other debugger, attach, set breakpoints, read stack traces Nov 08 19:45:24 how do i even LAUNCH gdb Nov 08 19:45:29 how do i attach Nov 08 19:45:32 using ndk-gdb Nov 08 19:45:38 how do i set a breakpoint anywhere? Nov 08 19:45:47 it's very awesome that you say it's a horrible debugger without even knowing it at all Nov 08 19:45:55 * pfn walks off Nov 08 19:46:03 i have used it on x86 linux Nov 08 19:46:05 not android Nov 08 19:46:29 setting a breakpoint in the code means using it from the IDE Nov 08 19:46:38 dont think i know any ide that supports ndk at all Nov 08 19:47:07 use the break command Nov 08 19:47:11 set the break point at the appropriate place Nov 08 19:47:23 there's an ndk-gdb ref manual on android.com somewhere, use the google Nov 08 19:47:52 i think i would rather gouge my eyes out with red hot pokers than debug anything with gdb Nov 08 19:47:56 you can walk off now Nov 08 19:48:00 yeah, keep complaining Nov 08 19:54:09 Hi guys, I'm trying to release a library to JCenter and I want my code to be obfuscated with proguard. I've turned minifyEnabled to true and everything is obfuscated Nov 08 19:54:26 How do I keep my main interface's public methods not obfuscated/ Nov 08 19:54:33 Hey guys... I keep on getting null reference object since moving it to its own Heads-Up Notification class..is making its own class a viable option? I want to use Heads-Up Notifications in a service I am running. -- > http://pastebin.com/A3r90Ldf Nov 08 19:59:38 . Nov 08 20:05:47 cart_man, please dont tell me you run this by doing new NotificationHandler(cxt).Notify(Info); Nov 08 20:06:36 danijoo: Usually when I run into something I cant figure out I start doing all kidns of weird stuff Nov 08 20:06:54 why is your handler extending activity? Nov 08 20:07:27 thats nonsense. you never initialize activities on your own. the system does that for you Nov 08 20:07:32 natanavra: See "A typical library" at http://proguard.sourceforge.net/manual/examples.html#library as a starting point. Nov 08 20:07:57 move the stuff from onCreate to the constructor, remote the Activity stuff alltogether and it will work Nov 08 20:08:02 danijoo: I was actually going to ask you that question just now,. How could I build and Notify() successfully with out extending activity? Nov 08 20:08:21 Cause I need the notificationManager = (NotificationManager) getSystemService(getBaseContext().NOTIFICATION_SERVICE); Nov 08 20:08:27 cart_man: On a side note, methods, fields, and locals use camelCase (not PascalCase). Nov 08 20:08:50 danijoo: Just saw that sorry for post Nov 08 20:09:37 cart_man, getSystemService is not a method of Activity class Nov 08 20:09:57 its a method of context. you can just do context.getSystemService(...) Nov 08 20:10:06 Ohhhhhh ... Nov 08 20:10:46 or in other words: read the docs, know your classes :p Nov 08 20:11:20 danijoo: Lol...yea I know I need to do that more often Nov 08 20:12:30 requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); Nov 08 20:12:30 setProgressBarIndeterminateVisibility(true); Nov 08 20:12:35 Why does this do nothing for me? Nov 08 20:12:51 I don't think that's compatible with Toolbar. Nov 08 20:13:18 did you set the toolbar as actionbar? Nov 08 20:13:52 Hmm. I don't know anything about any "Toolbar". My app have a ActionBar, yeah... Nov 08 20:16:04 hey people, does anyone know if google requires you to put some sort of EULA or anything if you publish android app which uses Google Play services API's such as maps, autocomplete API, etc./ Nov 08 20:16:56 Ok sweet that works now... BUT my picture that shows with the Heads-up notification does not seem to have a transparent background even though its a .png Nov 08 20:17:55 Yotta92, not that I know Nov 08 20:18:25 + Nov 08 20:19:27 Yotta92, just found that: https://developers.google.com/maps/documentation/android-api/intro#attribution_requirements Nov 08 20:20:50 Hi guys! I have some troubles with building release APK. It fails with "Error:Execution failed for task ':app:packageRelease'. Nov 08 20:20:50 > Failed to read key ... KeyStore.jks": Keystore was tampered with, or password was incorrect". I did nothing to my keystore file since the last build or anything could affect this file. What can be wrong? Nov 08 20:21:40 AlexBerdnikov, file corrupt? Nov 08 20:21:53 did you try opening the keystore manually? Nov 08 20:21:57 Oh, and what the most important it fails with same error even if I create NEW keystore file Nov 08 20:22:34 danijoo: Thanks allot for the help! Really appreciated ! Nov 08 20:22:35 Thanks, danijoo, that helped. Getting a bit paranoid with those Google Play store developer bans. Nov 08 20:22:36 TacticalJoke: ^^ Nov 08 20:22:40 I create new file, with new password and alias just to test if it works at all but it fails in the same way Nov 08 20:23:12 danijoo: no I didn't Nov 08 20:23:46 danijoo: What should I find there? Nov 08 20:25:12 keys :p Nov 08 20:25:28 You mean aliases? Nov 08 20:25:56 danijoo: I can see them in AS through Generate APK dialog Nov 08 20:26:10 I guess its not corrupted then Nov 08 20:26:20 maybe your gradle is configured wrong Nov 08 20:27:45 danijoo: I can build other projects just fine. It's only one project and it fails with same error even if I create new KeyStore file Nov 08 20:35:53 I don't understand why I get no interminate progressbar in the ActionBar Nov 08 20:36:12 smallfoot- using Toolbar ? Nov 08 20:36:15 smallfoot-: Which version of Android are you running on? Nov 08 20:37:22 g00s, I don't know what "Toolbar" is, it is an Activity with a Fragment and the Activity have a ActionBar Nov 08 20:37:26 TacticalJoke, 6.0 Nov 08 20:37:36 I think ActionBar uses Toolbar under the hood on 5+. Nov 08 20:37:50 And AFAIK Toolbar isn't compatible with that old progress-bar thing you're talking about. Nov 08 20:37:57 I see Nov 08 20:38:02 So what should I do? Nov 08 20:38:07 The solution is to use Toolbar and ProgressBar directly. Nov 08 20:38:15 I see Nov 08 20:38:48 You can put a ProgressBar in a Toolbar. (Or even put a ProgressBar elsewhere.) Nov 08 20:38:50 If my app is loading something, should that be in a Dialog containing a ProgressBar, or should that be in a ProgressBar in a Toolbar? Nov 08 20:38:59 The guidelines recommend against progress dialogs. Nov 08 20:39:34 I see Nov 08 20:39:49 So what is recommended when the user is waiting for an indeterminate period of time? Nov 08 20:39:52 A lot of apps put a ProgressBar in the centre or near the top. I don't see ProgressBars in Toolbars very often, but it's doable. Nov 08 20:40:07 I see Nov 08 20:40:38 seems setInderminateProgress() does nothing, yet isnt marked as deprecated Nov 08 20:40:50 This is what the material guidelines say: https://www.google.com/design/spec/components/progress-activity.html#progress-activity-behavior Nov 08 20:41:01 Thanks! Nov 08 20:41:57 My app actually does something similar to Chrome: it shows a ProgressBar at the bottom line of the Toolbar. Nov 08 20:42:02 Though I'm thinking of changing it. Nov 08 20:42:08 So I'll just put a in the Layout, and hide/show it Nov 08 20:42:27 well thats actually pretty cool, I noticed YouTube does that too Nov 08 20:42:29 TacticalJoke, theres also the build in swiperefresh indicator now Nov 08 20:42:40 danijoo: Ah, yeah. Nov 08 20:47:07 anyone here can show show me the url to their developer page on google play store, so I can see what apps you guys done? Nov 08 20:51:21 TacticalJoke did you see the Plaid app? they use a quick markdown parser Nov 08 20:51:27 g00s: I fixed that "ProgressBars on secondary activities show after a delay" issue -- disabling the transition fixes it. Nov 08 20:52:18 Didn't know that app did Markdown parsing. Nov 08 20:52:36 they use something called Bypass Nov 08 20:54:02 cool Nov 08 20:54:07 Markdown <3 Nov 08 20:54:18 TacticalJoke, whats your dev page on google play? Nov 08 20:54:22 I want to check your apps Nov 08 20:54:25 smallfoot-: I don't have any public apps yet. Nov 08 20:54:27 you always know everything Nov 08 20:54:28 oh okie Nov 08 20:54:39 I don't know much about Android. :s I'm just an enthusiast. Nov 08 20:54:43 TacticalJoke 's page coming before xmas 2015 ! Nov 08 20:54:46 haha Nov 08 20:54:49 I hope so. Nov 08 20:54:52 hope so :) Nov 08 21:04:16 Is there a way to check why you don't have an action bar/toolbar? Nov 08 21:04:29 how can i have a square ViewGroup that adjusts its size from both available height and width? Nov 08 21:05:01 osxorgate hm look at percent library, you can set aspect ratio Nov 08 21:05:14 g00s: tried it, but no success so far Nov 08 21:05:28 i believe i have to set either width or height to something like match_parent Nov 08 21:05:30 :( Nov 08 21:05:38 but maybe i need to investigate more Nov 08 21:07:08 Another solution is to subclass ViewGroup and ensure that the width and height are equal to the smallest dimension defined by the parent. Nov 08 21:09:37 Hmm, I guess you could subclass a ViewGroup subclass too: http://stackoverflow.com/questions/8981029/simple-way-to-do-dynamic-but-square-layout Nov 08 21:15:09 If I want to start an indeterminate progressbar do I have to call .setProgress(1) or sometihng? Nov 08 21:16:32 smallfoot-: setIndeterminate(true) sth like that Nov 08 21:17:29 osxorgate, I thought that just set the ProgessBar to indeterminate mode which is its default state Nov 08 21:17:36 do you guys do master/detail in same screen for phone landscape ? Nov 08 21:17:53 i dont think i've seen it under 600dp Nov 08 21:20:29 i dont Nov 08 21:20:50 (usually) Nov 08 21:21:26 g00s, i think even for superlarge phones the guidelines suggest no master/detail Nov 08 21:21:48 osxorgate danijoo thanks Nov 08 21:21:53 because the master list would be too small for more than just a few entries Nov 08 21:23:50 anyone who's better than me at viewgroups, what's wrong here? https://gist.github.com/xorgate/bdf84e642679aeda3657 in the end the viewgroup's size is 0,0 Nov 08 21:24:07 i see in the debugger that it's getting values over 500 though Nov 08 21:26:14 smallfoot-: An indeterminate progress bar only needs to be visible for its animation to play. Nov 08 21:26:31 thanks Nov 08 21:27:07 man .... am i the only one that finds myself constantly swiping away apps from recents - not because i'm worried about ram, but becausethe list is a clusterfuck and i can't find the app i want to switch too Nov 08 21:28:06 osxorgate: Shouldn't it be `setMeasuredDimension(size, size);`? Nov 08 21:28:09 g00s, yeah im usually swiping everything away until i find what i was looking for :p Nov 08 21:28:26 Same here. Seems even worse on Lollipop. Nov 08 21:28:32 I end up with like 50 things open. Nov 08 21:28:39 I guess partly because of Chrome. Nov 08 21:28:41 the new list design is not really friendly for finding stuff Nov 08 21:28:57 on kitkat is was a normal list, on 5 or 6 its this parallax thing that hides most of the items Nov 08 21:29:04 Yeah. Nov 08 21:29:35 TacticalJoke: i guess i'm doing something else wrong as well.. Nov 08 21:31:38 osxorgate: What width and height is the parent giving you? Maybe it's giving MeasureSpec.UNSPECIFIED or something. Nov 08 21:31:51 (In which case you'd need to change something about the parent.) Nov 08 21:33:58 hm i'd have to check Nov 08 21:34:21 Basically, check whether you're getting {0, 0}. Nov 08 21:34:37 i am getting sizes >0 in the onMeasure though Nov 08 21:36:16 MeasureSpec.EXACTLY Nov 08 21:36:40 You might have to post the whole ViewGroup. Nov 08 21:38:15 Maybe throw in `if (size <= 0) { throw new AssertionError("It's less than zero"); }`. Nov 08 21:38:24 or equal to ^ Nov 08 21:39:53 i should write a memo to our lord duarte, of some of the inconsistencies i'm still finding in gapps Nov 08 21:40:04 https://gist.github.com/xorgate/50bdd4b2234d83cb5f4c Nov 08 21:40:40 :44 Nov 08 21:41:04 using setMeasuredDimension(size, size); Nov 08 21:41:12 which is >500 for both Nov 08 21:46:54 this is interesting. in Google Play, when you navigation from an master item to a detail, the nav drawer can still be slid out, but nothing in the nav drawer is selected Nov 08 21:48:49 hey Nov 08 21:49:04 How do I know whether I am supposed to use ProgressBar, or the ProgressBar.Large or ProgressBar.Small? Nov 08 21:49:06 Guess a new Marshmallow update was released recently? Nov 08 21:49:18 Sarah security update, yeah Nov 08 21:49:35 g00s: interesting. Any other changes? Nov 08 21:50:00 probably a changelog somewhere, i haven't looked though Nov 08 21:50:03 smallfoot-: Depends on what size you want. Nov 08 21:50:08 MRA58V Nov 08 21:50:15 TacticalJoke, I don't know what size I want Nov 08 21:50:27 Step 1: Know. Nov 08 21:50:40 Step 2 ... Nov 08 21:50:44 Step 3 ... Profit ! Nov 08 21:50:45 Size is just "oh pick whatever you think want" or there is any "in scenarion A you use Small, in scenario B you use medium and in scenario C its large" Nov 08 21:50:55 they should just make one size Nov 08 21:51:06 I guess it's an artistic choice. Nov 08 21:51:11 g00s: where do they have the change logs? Nov 08 21:51:17 I like small ProgressBars for "loading more content" indicators in lists. Nov 08 21:51:36 As an actual child of a list view. Nov 08 21:51:44 good point! Nov 08 21:52:03 The only app I know of that uses big ProgressBars is RedReader. Can't remember a single other one. Nov 08 21:52:05 strange solution: https://gist.github.com/xorgate/8bf627881e10406b4eba Nov 08 21:52:15 Sarah hm maybe something here http://www.androidpolice.com/2015/11/03/aosp-changelogs-posted-for-november-security-updates-and-nexus-5x-6p/ Nov 08 21:52:19 their design guidelines has nothing on it Nov 08 21:52:51 Yeah, the guidelines don't go into great detail on stuff like this. Nov 08 21:53:07 osxorgate: Maybe FrameLayout needs that; not sure. Nov 08 21:53:11 But with a custom ViewGroup you wouldn't need that. Nov 08 21:53:16 have you guys noticed lately , i haven't been seeing that many Cards ? Nov 08 21:53:22 I guess maybe Small is for List, and Big is for video and images, and normal is for most stuff Nov 08 21:53:53 smallfoot-: The list thing is just something I thought of. I could be totally unusual here. Nov 08 21:54:11 true, but it sounds like it makes sense Nov 08 21:54:14 huh, it was just a single change Nov 08 21:54:32 smallfoot-: At the end of the day, there's no real rule here. Nov 08 21:54:52 I get the impression that you're a person who likes rules, which I (an OCD person) can understand. Nov 08 21:55:01 a timeout for reboots? Nov 08 21:55:07 wonder what security flaw was there Nov 08 21:56:07 TacticalJoke, yes, I very much like rules Nov 08 21:56:15 I am so OCD about line breaks, indention, and everything Nov 08 21:57:32 found a bug in AOSP Clock, alarm delete action doesn't work sometimes Nov 08 21:57:47 why is it, i can spend 2 minutes with any gapp and find bugs right away Nov 08 21:58:30 and this is just an alarm clock, not rocket science stuff Nov 08 21:58:32 It's kinda depressing when that happens. Nov 08 22:05:41 I have a layout that I am using in a listview. I want to set the Background to be a dfiferent colour depending on a property in the object its displaying. Anyone got a guide on how to do that? Really cnt find anything on Google :( Nov 08 22:06:46 donguston: You can just use View.setBackgroundColor. Nov 08 22:09:28 Hmm, I'd buy the Z3 Compact if it came down in price. Nov 08 22:09:52 £300 is a bit steep considering what else I could buy for that money. Nov 08 22:12:01 Should I do... Nov 08 22:12:02 mView1.setVisibility(View.GONE); mView2.setVisibility(View.VISIBLE); Nov 08 22:12:03 or Nov 08 22:12:20 mView2.setVisibility(View.VISIBLE); mView1.setVisibility(View.GONE); Nov 08 22:12:25 or is there any better way? Nov 08 22:12:31 lol smallfoot- Nov 08 22:13:11 :( Nov 08 22:13:13 bad OCD Nov 08 22:13:18 I was thinking I want smooth transitions Nov 08 22:13:26 Those method calls simply set a flag and request a redraw. Nov 08 22:14:06 So then it doesn't matter Nov 08 22:19:05 Yeah. I think it makes most sense, in terms of code readability, for the first to be hidden before the second is shown, though. That seems to be the chronology I would expect. Nov 08 22:19:53 <.< Nov 08 22:19:56 * sir_galahad_ad hides Nov 08 22:20:12 How can I set the so the label 'Lösenord' is place like it here: http://puu.sh/lesVG/bf91fab6f3.png if I got this code: https://ideone.com/3n3f0B ? Nov 08 22:20:17 Why do you have two views here? Just wondering. Nov 08 22:21:03 i have done the label 'Namn' and the first line, but now on line 26 in the code, I wanna fix so the label is like on the picture so below the first label with that space Nov 08 22:25:39 I tried with this: http://puu.sh/letkB/5f4864a20e.png but why doesn't it print anything when I write that? Nov 08 22:34:41 while (true) { display("It's better to do this in XML, Zajt."); } Nov 08 22:37:08 TacticalJoke: yeah I do it in xml too, but these 3 exercises are both in xml and java :) Nov 08 22:40:15 <_AleX_> hello ! I've an android app that use Facebook sdk4 and work fine in debug mode, but when i turn the app in release mode, autologin stop working (autologin made by the Facebook app, i don't have the problem if the Facebook app is not installed, web auth work in release) Nov 08 22:40:55 <_AleX_> i've added these lines in proguard : -keep class com.facebook.** { *; } -keepattributes Signature ... nothing change, autologin work in debug but not in release Nov 08 22:48:20 I am starting Intents to get files from external apps (images, docs, etc) and I get "Choreographer Skipped X frames".. Im struggling finding how I should handle this. I can also tell the screen shows the other app and not my app while Im processing the file.. Any insight on how to approach this? Nov 08 23:08:14 It's crazy how Lollipop doesn't have silent mode. Removing silent mode has to be one of the worst Android decisions of all time. Nov 08 23:08:45 And of course it has plenty of competition. Nov 08 23:09:47 it has silent mode ( in my 5.1.1 ver) Nov 08 23:10:25 but cant move to silent mode with the buttons on the side anymore Nov 08 23:10:38 Limpik: Is that a Sony or Samsung or something? Nov 08 23:10:49 nexus 4 Nov 08 23:14:43 5.0.2 here. Though one solution is to set the phone and notification tone to "Nothing". That seems to disable vibration too. Nov 08 23:15:06 Crazy that I have to do this, though. How do these silly changes get past QC. Nov 08 23:22:11 TacticalJoke what do you think of this idea. Say you have Nav Drawer @ Root with { A, B, C }. When A is shown , there is a collection. When you click A, you see details. But ... details has A1 A2 and A3. So when the details screen is shown, the nav drawer shows { A, (A1, A2, A3), B, C } with one of the things in ( ) highlighted Nov 08 23:22:13 I thought silent mode you mean without vibration, can move to only vibration with the buttons on the side Nov 08 23:25:10 g00s: I think I've seen that before. Nov 08 23:25:37 I'm not hugely into navigation drawers, to be honest, so I'm not sure what's good or not. :s Nov 08 23:25:55 hmm Nov 08 23:26:18 Limpik: The old silent mode was such that you could disable sound, disable vibration, have notification lights, and have an alarm. There's no way of doing that in Lollipop without what I said above (which may be limited to Motorola devices; I'm not sure). Nov 08 23:26:30 i've never seen the nav drawer change when in child screens Nov 08 23:26:57 g00s: What did you score in set theory? Nov 08 23:26:58 g00s: Oh, it shows the screen *and* expands the details? Nov 08 23:27:06 I don't think I've seen that. Nov 08 23:27:42 * g00s headdesk Nov 08 23:29:01 g00s: :) Nov 08 23:32:06 TacticalJoke: i have that "old silent mode" when i select "none" on the windows appear after press on the side buttons Nov 08 23:32:34 Limpik: That will disable the notification light. Nov 08 23:33:16 That's basically "do not disturb" mode. :) Nov 08 23:33:45 Limpik, that's how priority and quiet mode work Nov 08 23:34:10 Limpik, that is a change as of 5.0+ Nov 08 23:34:33 im not sure, i think i had alarm with that Nov 08 23:34:41 Yeah, alarms still work. Nov 08 23:34:43 Just no notifications. Nov 08 23:34:49 alarm is disabled in none Nov 08 23:34:59 priority allows alarm Nov 08 23:35:01 Oops, I was thinking of priority. Nov 08 23:42:04 oh i just test it, alarm has no sound like you said Nov 08 23:45:12 groxx up in this joint. Nov 08 23:45:25 TacticalJoke: testing out an IRC client :) Nov 08 23:45:41 and wondering if I can modify it to work with hipchat, 'cuz it's soooo terrible D: Nov 08 23:55:46 alas. hipchat plugin doesn't work with oauth :'( Nov 08 23:58:34 groxx ! Nov 08 23:59:54 so i get the 6P tomorrow Nov 08 23:59:57 :D Nov 09 00:00:05 Yup! Though probably not for long. Just dropping in temporarily Nov 09 00:00:15 6P looks pretty nice Nov 09 00:00:47 i hope so. i'll baby it like hell till rhino shield bumper and screen protector are out Nov 09 00:00:59 ErrGnomeOus yeah don't bend it! Nov 09 00:01:02 lol Nov 09 00:01:06 i'm not worried Nov 09 00:01:07 ;) Nov 09 00:01:09 although that guy looked like bane Nov 09 00:01:16 yeah he did Nov 09 00:01:27 i would he he could bend a phone in half Nov 09 00:02:06 they do'nt make them like the incredible droid Nov 09 00:02:15 which if I remember correctly saved someone from a bullet Nov 09 00:02:27 htc incredible Nov 09 00:03:34 yeah droid-1 was a tank Nov 09 00:06:11 How do i go from making simple education apps of listViews and viewPagers to an app that is completely interactive video game with nice graphics. Do you usually learn OpenGl and then plug them together? there seems to be less tutorials on hq video games in android Nov 09 00:09:10 JimHawking take the udacity course Nov 09 00:09:19 could have been done with it by now Nov 09 00:10:26 although thats not games ... Nov 09 00:12:08 ErrGnomeOus: Is there a date for 6P internation release? Been waiting for ages now Nov 09 00:17:10 mentazoom: not that i know of. i'm surprise i'm even getting mine this early Nov 09 00:17:14 is it possible to do network operations in an AsyncTask thats started in the Activity class? Nov 09 00:17:41 i'm suppose to get it on the 20th or something but i was emailed saying it had shipped with a tracking # Nov 09 00:25:53 donguston: why wouldnt it be? You just cant do it on the ui thread Nov 09 00:26:37 oh, I was under the impression that async task was on the same thread Nov 09 00:26:38 ok thanks Nov 09 00:35:20 I'm trying to understand memory management in an app that uses GLSurfaceView. So I know I have a max memory size that the app cannot exceed (~12-24MB depending on device). And this memory is directly residing in the device RAM. When importing high res textures into an app for use in OpenGL ES, it is (or at least i understand it to be) customary to recycle one Bitmap object for each texture to be displayed. Nov 09 00:35:23 You then draw the texture onto meshes in OpenGL and proceed to load your next texture (each texture may take up a large part of your app's available memory).In effect, you are moving your texture data from your drive into ram and then into the OpenGL realm (which I assume uses GPU memory that is separate from the 12-24MB app limit). Is there any memory management I need to perform on the textures already loaded into OpenGL? Nov 09 00:35:25 I'm trying to understand memory management in an app that uses GLSurfaceView. So I know I have a max memory size that the app cannot exceed (~12-24MB depending on device). And this memory is directly residing in the device RAM. When importing high res textures into an app for use in OpenGL ES, it is (or at least i understand it to be) customary to recycle one Bitmap object for each texture to be displayed. Nov 09 00:35:28 You then draw the texture onto meshes in OpenGL and proceed to load your next texture (each texture may take up a large part of your app's available memory).In effect, you are moving your texture data from your drive into ram and then into the OpenGL realm (which I assume uses GPU memory that is separate from the 12-24MB app limit). Is there any memory management I need to perform on the textures already loaded into OpenGL? Nov 09 00:35:30 oh god Nov 09 00:35:30 I'm trying to understand memory management in an app that uses GLSurfaceView. So I know I have a max memory size that the app cannot exceed (~12-24MB depending on device). And this memory is directly residing in the device RAM. When importing high res textures into an app for use in OpenGL ES, it is (or at least i understand it to be) customary to recycle one Bitmap object for each texture to be displayed. Nov 09 00:35:32 at's happening Nov 09 00:35:33 You then draw the texture onto meshes in OpenGL and proceed to load your next texture (each texture may take up a large part of your app's available memory).In effect, you are moving your texture data from your drive into ram and then into the OpenGL realm (which I assume uses GPU memory that is separate from the 12-24MB app limit). Is there any memory management I need to perform on the textures already loaded into OpenGL? Nov 09 00:35:42 :O Nov 09 00:35:58 sorry about that Nov 09 00:36:01 comptuer lagged. Nov 09 00:36:43 I'm trying to understand memory management in an app that uses GLSurfaceView. So I know I have a max memory size that the app cannot exceed (~12-24MB depending on device). And this memory is directly residing in the device RAM. When importing high res textures into an app for use in OpenGL ES, it is (or at least i understand it to be) customary to recycle one Bitmap object for each texture to be displayed. Nov 09 00:36:43 what is this 12-24mb app limit? Nov 09 00:36:45 You then draw the texture onto meshes in OpenGL and proceed to load your next texture (each texture may take up a large part of your app's available memory).In effect, you are moving your texture data from your drive into ram and then into the OpenGL realm (which I assume uses GPU memory that is separate from the 12-24MB app limit). Is there any memory management I need to perform on the textures already loaded into OpenGL? Nov 09 00:36:47 we know Nov 09 00:36:50 omg not again Nov 09 00:37:02 ok Nov 09 00:37:04 i think we're good Nov 09 00:37:09 the app memory limit Nov 09 00:37:22 where'd you come up with those numbers? Nov 09 00:37:41 Read it somewhere don't remember exactly where Nov 09 00:37:43 those don't seem like a real limit for devices made in passed 5yrs Nov 09 00:38:01 ok well lets say 40MB Nov 09 00:38:08 cause that's the limit on my emulator Nov 09 00:38:30 then yes when not using a bitmap let it get recycled/gc'd Nov 09 00:38:54 but what about on the OpenGL side? Nov 09 00:39:11 won't the GPU run out of memory? Nov 09 00:39:26 after loading sufficiently many textures? Nov 09 00:45:38 What is a .cpp file? Nov 09 00:45:52 cplusplus Nov 09 00:46:14 c++ Nov 09 00:46:14 so yea anyone? Nov 09 00:48:12 guardian-project, in reality it is a c++ file, but technically, file extensions mean nothing, and it could be anything, from a plaintext poem about turtles, or a realplayer video Nov 09 00:49:48 So where do I find the exact source code for a fule so it can be modified? Nov 09 00:50:05 s/fule/file Nov 09 00:51:28 VolumeManager.cpp Nov 09 00:52:50 found an answer: "It look likes you can keep as many textures in OpenGL as you have free total RAM. Yes total RAM, not heap and not something other related to your app! It's really the amount of free RAM of your whole system, there are NO restrictions!" Nov 09 00:52:56 To run the secure containers exploit and gain root. Nov 09 00:53:09 so basically i do need to manager memory on the OpenGL side :( Nov 09 00:55:28 BigDru: maybe there's some optimization like subsampling and using a narrow color pallete Nov 09 00:57:34 I could but it's really important to keep texture quality as high as possible. I think my only reasonable solution is to glDeleteTexture and maybe caching the bitmaps. Nov 09 01:37:51 My layout is not completely at bottom even with android:layout_alignParentBottom="true" Nov 09 01:37:53 android:gravity="bottom" Nov 09 01:38:29 can't see how else I can force it to not have any room from bottom Nov 09 01:38:48 post your code and a screenie Nov 09 01:38:57 Maybe padding of the parent mentazoom Nov 09 01:39:02 yep^ Nov 09 01:39:10 by default theres like a 16dp margin all around Nov 09 01:39:29 drose379: Oh lol you are right, dumb by me, but thanks! Nov 09 01:39:34 Hey anytime man Nov 09 01:49:29 Can someone help me out with some noob questions for a bit Nov 09 01:53:15 you can just ask here mate Nov 09 01:55:38 :) Nov 09 01:56:15 If anyone wants to checkout some basic UI and colors: https://vid.me/YX6c Nov 09 01:56:25 App is not done, just trying to figure out the colors Nov 09 01:59:27 not really a fan of that material blue. Overused to the point it just looks to generic imo Nov 09 02:00:07 Overused in my app? Or just everywhere? Nov 09 02:00:15 just in general Nov 09 02:00:26 Ok, anything else you see fitting there? Nov 09 02:00:28 same could be said for alot of the material colors Nov 09 02:00:39 I need something that doesnt clash with the light pink and blue for the pets genders Nov 09 02:00:42 In the results Nov 09 02:01:15 um, i personally like browsing flat colors, as material was built alot off of flat design. Nov 09 02:01:22 take a look through: https://flatuicolors.com/ Nov 09 02:01:43 Beautiful thanks orbyt_ Nov 09 02:01:47 you could still use blue, but just a different shade/tint whatever Nov 09 02:02:00 Anything else you could comment on? The results CardViews maybe? Nov 09 02:02:16 Do you instantly know what the different color cards mean? Nov 09 02:02:17 why did the loading take so long was my first though Nov 09 02:02:20 thought* Nov 09 02:02:22 I know :( Nov 09 02:02:33 um, im guessing pink was female dogs? Nov 09 02:02:52 i did like the overall card layout though Nov 09 02:03:03 So im doing a calculation to get the distance from the client location to the location of the shelter, to give you the distance in miles on the card (Top left), and that added a ton of time to the search Nov 09 02:03:06 Gonna have to fix that Nov 09 02:03:13 And yes, the pink if female, blue male Nov 09 02:05:02 orbyt_, do you think I should try the light blues from the page that you pasted me? Nov 09 02:05:30 I was just going through this : https://www.google.co.in/design/spec/style/color.html# Nov 09 02:06:04 Yeah thats where I usually look too ^ Nov 09 02:06:24 Perfect! Nov 09 02:06:25 drose379: you could try it. I did notice that when you go into the detail view, the pink of the card up against the blue toolbar looked a bit odd Nov 09 02:06:59 Hmm, ok. I guess I'll just have to play around with it until it feels right Nov 09 02:07:40 yup. Also, not sure if theres a better way, but for any color that you need to get a darker version of for the status bar (colorPrimaryDark), try multipling the colors hsl by 0.8 Nov 09 02:08:26 Awesome Nov 09 02:10:34 Thank you to anyone who checked that out for me Nov 09 02:23:57 May have found some flat colors a bit better orbyt_ Nov 09 02:24:17 drose379: nice did you try them in the app yet Nov 09 02:24:24 Well look at that. Nov 09 02:24:49 Doin that now orbyt_ Nov 09 02:27:10 Idk orbyt_ http://i.imgur.com/OAonJbf.png Nov 09 02:28:49 hmm yea idk, does it have to be purple and blue? Nov 09 02:28:54 It does not no Nov 09 02:32:43 well what i think might look good, and this is just my opinion on these colors, but a good flat pink color and "wet asphalt" navy blue from that link: https://flatuicolors.com/ might look good Nov 09 02:33:09 good colors without being so bright as the material ones Nov 09 02:33:13 Which one for primary? Nov 09 02:33:24 You think the pink should be primary? Nov 09 02:33:29 no definantly not Nov 09 02:33:55 use the pink for the fab/ tab indictor as well as the female cards Nov 09 02:34:05 Ok, and the Wet asphault as primary? Nov 09 02:34:30 yea, that everywhere including the male cards Nov 09 02:34:30 I just need to get the shade darker for colorPrimaryDark Nov 09 02:34:58 How did you say I could get one shade darker of wet asphault? Nov 09 02:35:51 If I have the Linux Source Code for my android phone from my manufacturer what exactly can I do with it? Nov 09 02:36:50 drose379: you could use one of the darker shades listed here: http://www.color-hex.com/color/34495e or multiply hsl by .8 Nov 09 02:37:45 drose379: for the pink maybe #EF5C54 Nov 09 02:38:12 Thanks orbyt_ Nov 09 02:38:53 Is the pink to "Girly" though? Nov 09 02:38:57 WB the male dogs? Nov 09 02:39:15 Although the pink really does shine right off of the wet aspahult, which I like Nov 09 02:39:31 Oh I forgot pink is a mans color now actually Nov 09 02:39:39 no thats why the flat pink is good. And the male cards use the same primary Nov 09 02:39:59 Let me get you a screenshot man Nov 09 02:40:04 I think I like it Nov 09 02:41:39 yep: https://coolors.co/app/34495e-293a4b-ef5c54-ffffff-444444 Nov 09 02:42:38 Thants nice Nov 09 02:43:05 http://i.imgur.com/68T252M.png Nov 09 02:43:48 what pink is that? thats not #EF5C54 is it? Nov 09 02:43:52 but def looks better Nov 09 02:44:02 No its not, Im gonna try #EF5C54 Nov 09 02:44:05 Now Nov 09 02:44:09 yea try that Nov 09 02:44:36 But is that a "Girly" enough color to use a lighter shade of for the female cards? Nov 09 02:44:57 Yeah that is nice Nov 09 02:45:30 i think its pretty intuitive to anyone that if given 2 colors, the blue is gonna be male and anything resembling pink is gonna be female Nov 09 02:45:44 is that cultural ? Nov 09 02:45:52 not only that but dont you have an icon that specifies it as well? Nov 09 02:45:55 g00s no idea Nov 09 02:46:11 I do yeah Nov 09 02:46:24 So orbyt what was that website that gives you all the shades of the colors? Nov 09 02:46:45 Nvm I got it Nov 09 02:48:06 Gonna run it now Nov 09 02:50:40 Ok female looks fine but I need to do somehting about male: http://i.imgur.com/ELKn1e7.png Nov 09 02:53:03 make it the same as primary mate Nov 09 02:53:41 I think the cards should be a bit lighter, no? Nov 09 02:53:56 Comes with adb but no root. Nov 09 02:54:05 The female one is lighter then the orig color Nov 09 02:54:35 No ppp either. Nov 09 02:56:40 drose379: no try the same color. you dont want a ton of different colors Nov 09 02:57:09 Well not different color but different shade.. but ok I will try it now Nov 09 02:57:21 well a different shade is a different color Nov 09 02:58:35 Ok, trying now Nov 09 02:59:48 Idk orbyt_ the colors look a bit intense on the cards **** ENDING LOGGING AT Mon Nov 09 02:59:59 2015