**** BEGIN LOGGING AT Fri Feb 05 02:59:59 2016 Feb 05 03:04:24 cbit: that path seems a bit fishy Feb 05 03:04:39 '/document/primary:test.csv'. Do you know what that's supposed to refer to? Feb 05 03:04:42 yeah, a person in to group passed it on to me, I'm just plugging it in Feb 05 03:04:50 (not really familiar with java/android that much) Feb 05 03:05:02 it's the internal storage root directory Feb 05 03:05:15 well that's where i put the file and what returns when I tap on it in the program Feb 05 03:05:48 cos as far as I know there's no '/document' directory in the android file system...are you sure there's not meant to be a prefix attached to it? Feb 05 03:07:21 Not sure. I think his part of the code is broken. Now I gottta go nag him Feb 05 03:08:36 it's not really anything to do with android/java - are you just trying to open a file which isn't there? Feb 05 03:10:56 I think it's the other guys code Feb 05 03:11:12 I have a file, it's just not going to the right directory or right forma ha Feb 05 03:11:18 anyone point me to the right direction? Feb 05 03:11:27 where is your file? Feb 05 03:11:30 so i can just manually put in a filepath for a file i know is there Feb 05 03:11:31 it's in Feb 05 03:11:53 internal storage just in the root Feb 05 03:12:04 alongside the Download DCIM folders etc Feb 05 05:45:44 hi - I have android studio 1.5.1,I am creating a new project targeting 4.0.3 level 15 with an empty activity, activity_main.xml shows rendering problems with "couldnt resolve resource @style/Widget.Holo.Light.ActionMode'. How to fix this? Feb 05 05:59:19 saraf: Try just @style/Widget.Holo.Light instead. Feb 05 06:00:26 Don't think there's an ActionMode style. Feb 05 06:02:45 but where is Widget.Holo.Light.ActionMode - my activity_main.xml has http://pastie.org/10709545 Feb 05 06:03:19 the activity_main.xml in text mode does not show the @style/Widget.Holo.Light.ActionMode anywhere Feb 05 06:05:04 I cannot see @style/Widget.Holo.Light.ActionMode anywhere in my files - where is it getting the couldnt resolve resource error from Feb 05 06:09:41 * saraf will be back in a few hours Feb 05 06:10:02 saraf: Can you paste your styles.xml file? Feb 05 06:10:09 ok Feb 05 06:11:06 http://pastie.org/10709557 Feb 05 06:12:33 I tried changing the theme in the Design view to AppCompat - now I am getting Couldn't resolve resource @style/Widget.Holo.ActionMode Feb 05 06:17:06 Thank you VonRath! I need to leave for a couple of hours - will be back. Feb 05 06:19:57 saraf: I'm not seeing any reference to Widget.Holo.ActionMode. Is it in your manifest? Feb 05 06:35:11 how do you guys manage to save set bitmap when rotating the screen? I put bitmap to parcel, but seems it doenst work Feb 05 07:12:35 Hello. Is there software to design application ihm different of android studio ? Feb 05 08:00:57 Floens: to *design* ? Feb 05 08:06:58 Can LeakCanary be run pre sdk version 21? Feb 05 08:39:25 How do I recreate a FragmentPagerAdapter with a custom layout implementation? Feb 05 08:39:57 notifyDataSetChanged isn't doing its job here because I'm inflating custom layout with it Feb 05 08:41:00 Can I use a FileOutputStream and a FileInputStream on the same FileDescriptor to simultaneously read and write to the same file? Feb 05 08:41:12 (at different positions, with different threads) Feb 05 09:10:09 VonRath: I'm back. No, my manifest has only has a reference to android:theme="@style/AppTheme" Feb 05 09:29:25 how do you set an item to use your class instead of the element's class? A for example, to be handled by my class that extends it? Feb 05 09:30:36 what? Feb 05 09:31:12 are you asking how to put your custom views in XML? Feb 05 09:31:13 I want to extend the LinearLayout of one of my LinearLayouts Feb 05 09:32:04 Extend the class, override a method from it and use it Feb 05 09:32:39 you can put your custom views in XML with Feb 05 09:33:31 app:actionViewClass="android.support.v7.widget.SearchView"> for example Feb 05 09:34:16 Could it be app:actionViewClass="MyCustomClass"> ? Feb 05 09:34:24 or something like that? Feb 05 09:34:30 sure, but it needs to be fully qualified Feb 05 09:34:34 with package name included Feb 05 09:34:52 just like with the android.support... example Feb 05 09:35:03 So, mypackage.package.classpackage.classname or something Feb 05 09:35:06 yep Feb 05 09:35:15 and that classname extends the element Feb 05 09:35:47 it'll need to fulfill the requirements set by the view that you give it to, yes Feb 05 09:35:58 I need to add it programmatically tho Feb 05 09:36:41 hm, well then it depends on what app:actionViewClass refers to, there's usually setters for that kind of things Feb 05 09:36:53 no that was just an example Feb 05 09:36:53 *usually* Feb 05 09:37:06 right :p Feb 05 09:38:02 oh well, nvm i can add it in the xml i guess Feb 05 09:39:27 is it app:actionViewClass or android: or what? Feb 05 09:39:34 It's a LinearLayout Feb 05 09:40:16 I don't know what you're trying to do Feb 05 09:40:27 your questions are missing the context Feb 05 09:40:58 well, it didn't work but i didn't get any error messages Feb 05 09:41:28 I'm just trying to extend the LinearLayout from one of the linear layouts Feb 05 09:41:39 that doesn't make any sense to me -.- Feb 05 09:41:42 what the hell does that mean Feb 05 09:42:21 I want to override onInterceptTouchEvent Feb 05 09:42:41 so you create a new class which extends LinearLayout? Feb 05 09:42:46 yea Feb 05 09:43:05 so replace the LinearLayout in XML with Feb 05 09:43:08 it's that simple Feb 05 09:43:22 i just did that but it didnt show the log message i set on it Feb 05 09:43:41 going to need to see some code at this point Feb 05 09:43:47 it's showing a recycler view adapter error message Feb 05 09:45:43 Twirl, pastebin your xml and your custom view Feb 05 09:46:40 oh nvm, now im getting a different error Feb 05 09:46:54 yea i had to set the right name on the element Feb 05 09:47:07 and now i probably need to fix all the references to it Feb 05 09:49:35 android.view.InflateException: Binary XML file line #2: Error inflating class MyLayout Feb 05 09:55:52 Zharf: do i need to do something to be able to inflate this element? Feb 05 09:56:03 no Feb 05 09:56:47 could you pastebin the xml and your custom view... it'd make it a lot easier to help you Feb 05 09:56:53 wouldn't have to guess what's wrong Feb 05 09:57:42 yea i know but it's a lot of files and code and making a small test case would take long but it's probably something silly Feb 05 10:02:58 my tests pass but my code dont werk Feb 05 10:05:21 your tests suck Feb 05 10:28:41 Hello everyone Feb 05 10:29:00 I have a Service which does some sensor-collecting stuff in the background Feb 05 10:29:19 I would like to be able to launch this Service and send Intents to it from another application, is that possible? Feb 05 10:30:29 so you want to receive intents from other applications Feb 05 10:31:20 i know you can do that in activity easily Feb 05 10:31:22 yes, as well as launch that service Feb 05 10:34:07 you could try to play with intent-filters in manifest in Feb 05 10:37:19 Ashiren: thanks, it looks simpler than I though, adding exported=false in the AndroidManifest will export the Service Feb 05 11:01:30 Hello dear developers, I have a layout with all the child elements in it. But when the app starts, I want to cover the whole layout with an imageview and than fade it out. What's the best way to do that? Feb 05 11:02:52 I was thinking to put an imageview with width and height to match parent. But I want to make sure, the the imageview covers the whole layout. Feb 05 11:07:29 Number5: nest the viewlayout you want to cover togetherwith the imageview in a FrameLayout Feb 05 11:08:04 Check out the docs for FrameLayout Feb 05 11:08:38 pduin, what do you mean by nesting view layout? I already use Framelayout to plugin plug out Fragments. Feb 05 11:09:11 Feb 05 11:09:22 Feb 05 11:09:27 Hello everyone Feb 05 11:09:31 do anyone can help me with a BSSID issue on Android Wifi? Feb 05 11:11:18 pduin, thnx, I haven't played with Framelayout much except for adding and removing fragments. I know the framelayout stacks the views and so on. But I'm not familiar enough to do as you suggest. Feb 05 11:13:08 I'm stuck on a roaming problem on wifi i'd love a little bit of help doing an automatic connection to a BSSID, may someone help me ? Feb 05 11:13:57 sounds like a job for #android-root Feb 05 11:14:21 i'm not rooted Feb 05 11:14:51 "I know the framelayout stacks the views and so on." - That's the most important thing to know. Add two views to a FrameLayout, the one will overlay on top of the other. Feb 05 11:14:51 do you think i should be to try something? Feb 05 11:15:23 Number5: basically with a framelayout each of the immediate child views will stack on one another Feb 05 11:18:57 microferret, ok I see. Well I did it by putting an imageview with the desired background and set its elevation with a high number and now it covers the whole fragment. By animating the transparent property the imageview changes to completely transparent and at the end I make the imageview set to View.GONE. Feb 05 11:21:01 This way I don't have to touch the FrameLayout. Feb 05 11:31:40 Hello everyone, I'm stuck on a roaming problem on wifi, i want to do an automatic connection to a BSSID, may someone help me ? Feb 05 11:35:29 sounds like a job for #android :v Feb 05 11:37:22 when inflating a LinearLayout the context should be the activity? Feb 05 11:40:33 Twirl, yes Feb 05 12:26:26 people how can i concat multiple RxJava (RxScala) observables results with only one call of onNext? Feb 05 12:27:09 i mean i have 2 obserbvales. i need to run them both wait for their result, concat results and call onNext of subscriber Feb 05 12:27:15 is it possible? Feb 05 12:29:04 ondroed, in what way would you concat? Feb 05 12:29:13 One result after another? Or emit pairs? Feb 05 12:29:31 The datacable to Samsung Galaxy note 3 is just a Micro usb with extra quick charge capabilites isnt that right? Feb 05 12:29:37 ondroed, is the order important? :) Feb 05 12:29:42 one after another... actually it does not matter Feb 05 12:29:44 no Feb 05 12:29:45 For some reason when I changed the cable to a regular micro usb one I can't deploy my build Feb 05 12:29:52 ondroed, .merge() ? Feb 05 12:30:09 deus_x, USB cables are all pretty much the same, might be your regular one is broken Feb 05 12:30:16 i tried, but result observable call onNext twice Feb 05 12:31:26 Well that's kinda usual behaviour :/ Feb 05 12:31:29 dataList.map(data => Server.request(data).toObservable.merger.subscribe( onNext => { /* called twice*/ }) Feb 05 12:31:46 actually the regular beaten up one works, its the new one which is just regular micro usb which is brand new that wont work.(it connects to the computer and i see it on adb but not on the deploy program) Feb 05 12:31:54 dataList.map( data => Server.request(data) ).toObservable.merger.subscribe( onNext => { /* called twice*/ }) Feb 05 12:32:22 I thought so though that it shouldnt make a difference Feb 05 12:34:29 Maybe the difference is that since it does not recive the extra juice the developer options isnt properly toggled. Feb 05 12:36:08 deus_x, there are also some very cheap usb cables that dont support any data transfer Feb 05 12:36:11 they are just for charging Feb 05 12:37:01 only kind of usb cable I know of is the kind that somehow starts to get connectivity trouble after a few months of use Feb 05 12:37:17 possibly ...but i was able to acces the phone storage Feb 05 12:38:30 maybe its just broken :p Feb 05 12:39:35 brand new? Oh well its not an issue atm, just puzzling. Feb 05 12:40:22 i don't know why but it doesn't want to inflate the LinearLayout when i'm extending it Feb 05 12:40:47 otherwise it works fine Feb 05 12:41:22 http://pastebin.com/raw/TXQFkMqs Feb 05 12:42:14 @Twirl : show R.layout.prod_row source Feb 05 12:42:27 the xml? Feb 05 12:42:33 Yep Feb 05 12:43:49 http://pastebin.com/raw/xWqjP2wq Feb 05 12:44:16 What is the log of the error ? Feb 05 12:44:44 android.view.InflateException: Binary XML file line #2: Error inflating class myapp.myapp.handlers.LLHandler Feb 05 12:44:54 that's the first line Feb 05 12:45:09 Now read the rest of the lines Feb 05 12:45:13 And LLHandler is extended from LinearLayout ? Feb 05 12:45:19 yea Feb 05 12:46:39 You need to use the 2 argument consstructor not the 3 argument one Feb 05 12:46:55 i already tried a couple of things there Feb 05 12:47:11 (R.layout.prod_row, null) Feb 05 12:47:36 Twirl, if you inflate a view from xml, it does not use View(context) constructor but View(context, attrs) Feb 05 12:47:41 you need to implement both Feb 05 12:48:08 I personally implement all 3 always Feb 05 12:48:16 well, i'm on the onCreateViewHolder method Feb 05 12:48:21 but the third is not always needed Feb 05 12:48:27 There's 4 now, danijoo :p Feb 05 12:48:50 If you are on minsdk 11 or above, then the 3 arg one is must Feb 05 12:49:08 if you are minsdk below that, and building with support library, then the 2 arg one AND the 3arg one are must Feb 05 12:49:15 championswimmer: well, idk how to do that, im on the onCreateViewHolder method (that's where it's throwing the exception) Feb 05 12:49:28 No the constructor of your LLHandler class Feb 05 12:49:32 Need to override all Feb 05 12:49:36 SimonVT, the last one is irrelevant until I can set minSdk 21 (i will love this day) Feb 05 12:49:37 ohh Feb 05 12:49:55 public LLHandler(Context context) { .. } ?? Feb 05 12:50:13 on Android Studio ? Press Ctrl/Cmd + O Feb 05 12:50:28 nice Feb 05 12:50:31 which one i choose? Feb 05 12:50:39 Override all, to be safe ;) Feb 05 12:50:44 The 2 and 3 arg ones are must Feb 05 12:51:02 Only the 2 arg one is needed if you want to inflate from xml Feb 05 12:51:11 lol there is like a hundred of them Feb 05 12:51:21 no, constructor only Feb 05 12:51:29 alright Feb 05 12:51:31 method name = LinearLayout Feb 05 12:51:38 there should be 4 of them only Feb 05 12:51:49 ok so I'm choosing the 3 arg one Feb 05 12:52:01 Both 2 and 3 Feb 05 12:52:08 ok Feb 05 12:52:39 Here an SO answer for your exact problem http://stackoverflow.com/questions/10644234/android-inflate-exception-on-custom-view Feb 05 12:53:00 omg it worked Feb 05 12:53:38 why i didnt get to that one after 3 hours of google and SO idk Feb 05 12:53:53 thanks Feb 05 12:53:56 That question is about the custom class calling a constructor that doesn't exist, not the custom class missing a constructor Feb 05 12:54:58 You wanna be the guy who's fun at parties simon ? :P Feb 05 12:55:22 yea but anyways i seriously spend hours on google but there was no answer for that Feb 05 12:55:26 Well, when half of what you're saying is wrong, you're going to get corrected Feb 05 12:55:51 the documentation doesnt mention that either Feb 05 12:56:00 how am i supposed to figure that out Feb 05 12:56:05 By reading the stacktrace Feb 05 12:56:13 i did Feb 05 12:56:14 The stacktrace tells you exactly what's wrong Feb 05 12:56:34 no it doesn't Feb 05 12:56:41 Yes, it does Feb 05 12:57:02 it should but no Feb 05 12:57:31 is there anything I can do about this crashreport "Native crash at /system/lib/libc.so" ? Feb 05 12:57:44 For the case where the constructor is missing, the stacktrace does in no way indicate that you have a missing constructor Feb 05 12:57:55 You really ARE fun at parties :D Feb 05 12:58:20 last line says " #05 pc 002c140d /data/app/com.google.android.webview-1/lib/arm/libwebviewchromium.so" Feb 05 12:58:26 it does if you know how to interpret it Feb 05 12:59:58 Is it wrong to do this on a fragment? http://pastebin.com/MU9LDnQB Feb 05 13:00:04 If the constructor is missing, you get a "Caused by: java.lang.NoSuchMethodException: [class android.content.Context, interface android.util.AttributeSet]" Feb 05 13:00:51 So, "error inflating class" + "NoSuchMethod" == your class can not be inflated because it is missing a method Feb 05 13:01:28 it doesnt say that Feb 05 13:01:32 Yes it does Feb 05 13:01:33 SimonVT, in this case it doesnt miss because the parent method has it Feb 05 13:02:02 it just wont execute the code in your override and therfore fail somewhere else (usually while inflating) Feb 05 13:02:06 danijoo, what do you mean? Feb 05 13:02:20 http://pastebin.com/raw/4Sv9D5uq Feb 05 13:02:29 SimonVT, when you override a View and forget to extend a constructor I mean Feb 05 13:02:47 that's the whole stack trace Feb 05 13:02:54 it doesnt say anything about a missing method Feb 05 13:03:12 That's some of the stack trace, logcat has a max line length Feb 05 13:03:17 So some of it didn't get printed Feb 05 13:03:37 if you override View(context) but forget View(ctx, attrs), the latter is still there from superclass and will be called Feb 05 13:03:38 it's all of what's in the debugger Feb 05 13:03:49 danijoo: Well, no, not when inflating from xml Feb 05 13:04:05 Your class doesn't have ctx, attrs so inflation fails Feb 05 13:05:26 Twirl: See how it suddenly stops at .Zygot? That's because the stack trace is too long for logcat to display it Feb 05 13:05:28 but doesnt it have ctx,attributes derrived from View.class? Feb 05 13:05:57 SimonVT: so what am i supposed to do? i didn't even know that Feb 05 13:06:28 SimonVT: wheres the rest of it ? Feb 05 13:06:37 danijoo: No, constructors aren't inherited Feb 05 13:06:50 SimonVT, thanks. didnt know that Feb 05 13:07:12 Unless you specify another, an empty constructor is there implicitly Feb 05 13:07:40 Twirl: It was clipped... In such a case you could try and inflate the xml from somewhere the stacktrace wouldn't be so long Feb 05 13:07:42 Twirl, you should read the guides on extending views before doing it.. Feb 05 13:07:48 Or you could manually split it over multiple lines when logging Feb 05 13:08:04 Maybe the debugger can display the full stack trace Feb 05 13:08:26 danijoo: what guides? Feb 05 13:08:34 But, anyone in here could have solved the issue if code/stacktrace was posted when you started 3 hours ago Feb 05 13:09:02 you mean the full stack trace or that one i just posted? Feb 05 13:09:36 Twirl, theres a set of official google docs about how to properly extend views and viewgroups Feb 05 13:09:57 it doesnt say anything about that Feb 05 13:10:21 in my experience the google docs are incomplete Feb 05 13:10:39 your knowledge is way more incomplete so its a good source :) Feb 05 13:11:31 I want to create grid-view 4*4 on full screen. How to? Feb 05 13:14:49 I asked before but I got dc'd… asking again: is it wrong to do this on a fragment: http://pastebin.com/MU9LDnQB Feb 05 13:16:56 By this I mean checking if the parent view is null before doing all the standard initialization stuff Feb 05 13:17:08 casadogg, why should parent ever be != null in onCreateView? Feb 05 13:17:33 if onCreateView is called, theres no visible view there. by definition Feb 05 13:17:49 I add the fragment to backstack Feb 05 13:17:53 in this case the parent is not null Feb 05 13:18:05 when it gets called back, this method is called again Feb 05 13:18:12 but parent is not null Feb 05 13:18:34 dont do that Feb 05 13:18:36 what if there's a configuration change Feb 05 13:18:38 just recreate parent Feb 05 13:18:47 you might leak the context Feb 05 13:18:51 if you dont recreate Feb 05 13:19:36 Ok, I was doing this because i fetch some data. So I should set the data on the savedInstanceState, right? Feb 05 13:19:50 and just recreate everything Feb 05 13:21:00 yes. just cache the data, recreate the view and set the texts etc again Feb 05 13:23:18 also getActivity might be null in onCreateView, be careful to set that before onActivityCreated Feb 05 13:24:47 * Zharf prefers to use onAttach/onDetach for something like that Feb 05 13:25:18 Isn't onAttach the first method that it's called in the fragment lifecycle? Feb 05 13:25:51 onAttach doesnt mean getActivity() is valid now Feb 05 13:28:11 onAttach is called with an activity instance Feb 05 13:28:47 onAttach(activity) is actually deprecated now Feb 05 13:29:22 but the context version seems to have problems according to stackoverflow Feb 05 13:29:50 the activity version is, yeah Feb 05 13:31:18 the thing is. even onAttach(activity) is called before onCreateView, getActivity() is not guaranteed to return a valid activity in onCreateView Feb 05 13:31:59 yeh onActivityCreated seems to be the best choice here Feb 05 13:32:01 "Called when the fragment's activity has been created" Feb 05 13:32:21 So it's a guaranteed to return me a valid activity Feb 05 13:32:50 casadogg, a good way to handle fragment lifecycles is to only create views in onCreateView and delay other processes that require context (like loading some data) to onActivityCreated Feb 05 13:32:57 well, I never use getActivity Feb 05 13:33:11 it's a horrible design in my opinion anyway -.- Feb 05 13:33:31 Zharf, fragments in general? ^^ Feb 05 13:34:08 well there's some good ideas there but there's so many design oversights that it's a wonder it's holding together Feb 05 13:34:15 Zharf, well, i gotta communicate data between fragments. sure I could use interfaces but it turns into spaghetti code Feb 05 13:34:28 casadogg, buses are a nice solution imo Feb 05 13:34:55 buses are a good solution but without them I would absolutely use interfaces like google recommends Feb 05 13:35:02 Is it hard to work with GLSurfaceView ? Feb 05 13:35:22 Android Studio 2.0 Beta 2 available Feb 05 13:35:30 Atlas V launch in a couple of minutes Feb 05 13:35:33 cart_man define hard :P Feb 05 13:35:35 Zharf I don't want to create a monster activity Feb 05 13:35:46 ktwo: Above the average coder Feb 05 13:36:06 casadogg, I don't know what that is, but use an event bus -.- Feb 05 13:37:18 Zharf it just turns into a frankenstein with hundreds of lines and and interfaces. right now my fragments all have 100 lines, activity has 50 and it's all good Feb 05 13:37:37 cart_man if you have never used opengl it maybe hard for you - probably that would fit Feb 05 13:37:43 Zharf if i start using interfaces, everything gets clustered in a place and it gets annoying Feb 05 13:37:57 casadogg, so how do you do it then? Feb 05 13:38:22 Zharf get activity, set the object, next fragment gets the object Feb 05 13:38:23 ktwo: Well OpenGL was not rocket science though Feb 05 13:39:33 atlas v just launched Feb 05 13:39:53 danijoo about event bus, i assume i'd have to use an external library, right? Feb 05 13:40:00 yep Feb 05 13:40:27 cart_man, it isnt, if you know about how 3d graphics work generally you will be able to do it with enough practice Feb 05 13:40:53 ktwo: Cause one can make some really cool GUIs with that sort of thing Feb 05 13:42:00 Thanks Zharf and danijoo, I'll take a look at event buses. Thanks a lot for your help with the lifecycle thing :) Feb 05 13:42:04 for games? sure. For productive apps? probably not worth it Feb 05 13:45:12 Hi guys, I want to start animation in a fragment from onStart(), by calling image.animate().alpha(0).setDuration(1000); But it doesn't animate at all. Feb 05 13:46:39 I think it's because it can't animate in the onStart() state. Any idea? Feb 05 13:47:03 does it disappear Feb 05 13:47:06 ktwo: Really? I can think of a couple of cool interfaces with it? Feb 05 13:47:25 stuff shrinking and coming back and forth as you work with it? Feb 05 13:50:16 cart_man, it isnt advised to do that most users will expect a native look and feel for production apps (matrial design now basically) so they might not be used to it. Of course it really depends on what app you're doing. Most full OGL user interfaces are games. Didnt see something else yet. Do you know an app wich OGL interface which isnt a game? Feb 05 13:50:38 ktwo: no :( Feb 05 13:51:02 Number5 I animate from onCreateView and it works, try setting the duration before calling alpha(0) Feb 05 13:51:48 casadogg, hmmm thnx. Feb 05 13:52:30 there's one thing though, It's probably working but you can't see because by the time everything loads, it's already completed Feb 05 13:52:55 the reason i can see mine I guess is because I have a short delay before starting the animation (for other reasons), Number5 Feb 05 13:53:35 I suppose that animating in the onResume state should work, since according to the docs it's when the fragment is already visible Feb 05 13:53:36 casadogg, what Android version do you use Feb 05 13:53:42 i test on 4 and 5 Feb 05 13:54:09 API 15 onwards Feb 05 13:54:31 hmm, weird, I have an android 4.0.3 HTC desire device. Not working here. Animating is working after a button touch. Feb 05 13:56:58 cart_man, i remembered about one: Kodi ;-) Feb 05 13:58:00 ktwo: Was it done well ? Feb 05 13:58:06 or did it work? Feb 05 13:58:25 Number5 http://pastebin.com/YuH9csY1 try this Feb 05 13:58:30 see if it works, if it works, test a lot, use with caution Feb 05 13:58:49 casadogg, thnx my friend. Feb 05 13:59:47 Number5 np, let me know if it works :) Feb 05 14:00:04 cart_man, sure but i guess the reason is that the codebase was ported, so it just was easier to port it to android just as it was, since it uses opengl on linux Feb 05 14:01:16 is there a way to listen for play-services state with a receiver Feb 05 14:02:01 what do you mean with ¨state¨ Feb 05 14:02:30 like isGooglePlayServicesAvailable might return SERVICE_UPDATING Feb 05 14:02:50 dont think so but im not sure Feb 05 14:02:51 is there a "GOOGLE_PLAY_IS_READY_NOW_K" intent I can hook into Feb 05 14:02:53 lame Feb 05 14:03:11 when does this happen anyway? close to never? Feb 05 14:03:12 ok going to retry service connect over and over like they recommend Feb 05 14:03:39 well there's also an incorrect version error state Feb 05 14:03:48 which I imagine happens more often Feb 05 14:04:10 can I use GCM if the play-services do not match? Feb 05 14:04:20 yeah. in that case you should display this ¨update play services!¨ dialog iirc Feb 05 14:05:30 i think gcm works without a fully updates play services version like analytics does Feb 05 14:05:33 but I could be wrong Feb 05 14:06:01 casadogg, I made a stupid mistake, it was working all the time. Feb 05 14:06:20 Thank you for confirming the animation is working. Feb 05 14:06:24 Number5 oh lol. what happened? Feb 05 14:07:29 is it acceptable to call finish(); from onPause() ? Feb 05 14:08:39 Well, on start up, I have a home fragment, but I immediately call the splash screen, which has a background that should fade out and than go back to the home fragment. But instead of adding the fragment on the stack, I replaced the home fragment. The host activity had the same background, and so on fading out, you see the same background behind the view which looks like nothing is fading. Feb 05 14:09:21 lxknvlk, why not, it will just continue to call onstop and than ondestroy :P Feb 05 14:10:32 yeah Feb 05 14:11:22 you know how i did the splash screen? I just set the activity background to a picture, and remove the picture in the end of oncreate lol Feb 05 14:11:30 oh, glad you found out Feb 05 14:11:47 splash screens suck :p Feb 05 14:11:54 they do though :P Feb 05 14:13:00 but my app loads about 1-2 sec and the white screen when nothing is happening is really annoying Feb 05 14:13:29 is it a game? Feb 05 14:13:29 I'm gonna ask one more time here haha Feb 05 14:13:36 Nexus 5x or 6P? Feb 05 14:13:41 I can't decide!!! Feb 05 14:13:43 5x Feb 05 14:13:48 6P! Feb 05 14:13:50 and I can't find anywhere that has them on display Feb 05 14:13:51 ^^ Feb 05 14:14:00 your country sucks then Feb 05 14:14:18 hey buddy, thats 'Murica you're talkin about Feb 05 14:14:38 I know :) Feb 05 14:14:38 Do you not mind having a 6" phone? Then get a 6P Feb 05 14:14:48 we had this conversation once before Feb 05 14:14:53 it has mcdonalds though so there's that Feb 05 14:14:59 jkjkjkjkjk Feb 05 14:15:10 danijoo: I know we did! I still can't decide Feb 05 14:15:31 hows the battery life on your 5x? The 6P has a bigger battery, but also uses more power Feb 05 14:16:18 compared to my 5 notx, its a good battery life Feb 05 14:17:36 the 6P sounds awesome except for the size Feb 05 14:18:04 size (and price) are the only reasons I'm still considering the 5X Feb 05 14:23:21 im happy with my n5 Feb 05 14:23:40 as a bonus, it doesnt look like a Feb 05 14:23:40 submarine periscope Feb 05 14:25:52 Having the 6P hardware in old Nexus 5 chasis would be awesome :/ Feb 05 14:27:01 true that. Feb 05 14:27:37 Anyway, Sony is dragging their feet with 6.0 for Z5c :/ Feb 05 14:28:31 But they are soo expensive :/ Feb 05 14:28:36 hey, can i use retrofit with google gson ? Feb 05 14:28:39 really good phones though Feb 05 14:28:46 sci-fic, i think it uses gson by default Feb 05 14:29:07 registerUser(@Body Member member); i get error on this Feb 05 14:29:18 something missing i guess Feb 05 14:29:24 oh you mean as parameter Feb 05 14:29:27 no idea sry. Feb 05 14:29:36 I only know it can return Gson objects Feb 05 14:32:07 Yep, that works fine Feb 05 14:39:41 So i have an activity that has a little bit of data. Depending on those data I want to display one of two fragments. Can i do this by just have an if-else statement with the corresponding setContentViews() in the body? Feb 05 14:40:11 the fragments have the correct android:name attribute Feb 05 14:40:54 yes Feb 05 14:41:26 danijoo: follow up question, is it consider bad form to just use a setContentView and the name attribute? Feb 05 14:43:23 I dont do it. Feb 05 14:48:21 hi guys, how do I get a list/array of all the objects my ListView contains, programmatically? Feb 05 14:48:59 ChrizC, from the adapter Feb 05 14:49:30 how can I do a material button that has a textview Feb 05 14:49:43 danijoo: it's an ArrayAdapter, but I can't see a .getArray or similar? Feb 05 14:49:50 Calguy, normal buttons have text? Feb 05 14:50:07 ChrizC, dont use arrayadapter and make your own adapter then Feb 05 14:50:15 I was hoping you wouldn't say that Feb 05 14:50:16 x_x Feb 05 14:50:20 thought as much though, ta Feb 05 14:51:38 ChrizC: I find BaseAdapters to be wayyyyy easier Feb 05 14:54:15 extending adapters are basics Feb 05 14:54:23 you need it sooner or later anyways ;0 Feb 05 14:55:05 I find recyclerview adapters to be the best Feb 05 14:56:18 gordon_: I've been meaning to mess with those for a while but havent, they probably aren't for every situation tho right? Feb 05 14:56:36 What? Feb 05 14:56:57 If you have recyclerview you need to use them Feb 05 14:57:11 they are meant for all situations. but sometimes listViews are just easier Feb 05 14:57:19 and you dont always need RV features Feb 05 14:57:21 Well, yeah Feb 05 14:57:32 when's listview easier? Feb 05 14:57:45 When listing list Feb 05 14:57:52 With base item Feb 05 14:57:58 ? Feb 05 14:58:04 Zharf, when you only want a list of items with some divider :) Feb 05 14:58:08 Arrayadapter Feb 05 14:58:19 and you dont need add/remove animation Feb 05 14:58:45 I've not used arrayadapters in like 5 years I guess :P Feb 05 14:59:10 I like them more Feb 05 14:59:20 For list view Feb 05 14:59:32 They are generic so it's nice Feb 05 14:59:40 even with listview I've always rolled my own from baseadapter Feb 05 15:00:06 Baseadapter is not generic Feb 05 15:00:16 sure it is Feb 05 15:00:25 It is? Feb 05 15:00:28 Hm Feb 05 15:00:47 you need to extend it anyway, it doesn't restrict you to anything Feb 05 15:00:58 Bundle is the proper way to send data to fragment from an Activity. But whats the best way when i have to send data way after fragment creation ? Feb 05 15:01:11 http://developer.android.com/reference/android/widget/BaseAdapter.html Feb 05 15:01:13 but I don't see any scenario in which I'd use a listview nowadays Feb 05 15:01:22 It says something different but OK Feb 05 15:01:47 gordon_, baseadapter is what you'd extend your own adapters from Feb 05 15:01:49 And arrayadapter is subclass of it Feb 05 15:01:55 yes Feb 05 15:01:57 I know Feb 05 15:02:19 extend base and forget anything else Feb 05 15:08:28 hm.. how can I attach a debugger to a widgetprovider? Feb 05 15:08:43 I tried to set the breakpoint and Debug.waitForDebugger() but it doesnt seem to work Feb 05 15:11:33 danijoo, I guess you need to attach to the widget process not your app process Feb 05 15:12:04 Mavrik, afaik the widget provider runs in the app process Feb 05 15:12:19 Does it? Feb 05 15:12:22 because it also logs to app process and shared the application class Feb 05 15:12:25 Hmm, never built a widget... like ever :) Feb 05 15:12:27 at least thats my observation Feb 05 15:13:09 seems like I have to go the painful wayand have to inject tons of log messages Feb 05 15:18:47 widget runs in app process Feb 05 15:19:13 why would you wait for debugger Feb 05 15:19:17 launch your app Feb 05 15:19:23 attach debugger Feb 05 15:19:26 press home Feb 05 15:19:29 go to widget Feb 05 15:22:07 nvm it works now. problem was adb. Got some 'client not ready yet' and didnt saw them Feb 05 15:22:11 restarted adb and now it works Feb 05 15:22:21 thanks for cleariving pfn Feb 05 15:39:12 so, I setup the 5x yesterday, I like it a lot Feb 05 15:39:25 I hate random slowdowns I get on 5X :/ Feb 05 15:39:28 I think I like it more than the 6p Feb 05 15:39:36 They're rare but extremely annoying. Feb 05 15:45:11 https://blog.codecentric.de/en/2016/02/phantom-types-scala/ Feb 05 15:45:26 hmm, where to apply in android Feb 05 15:47:34 anyone here succeed post json string or custom class with retrofit here ? i googled and tried a lot of things but still getting " Unable to create @Body converter for class" Feb 05 15:51:38 Oh, yeah, I also like the lcd on the 5x more than the oled on 6p Feb 05 15:51:51 white looks dirty on 6p Feb 05 15:53:11 * danijoo still waits for his USB A-C adapter to arrive.. Feb 05 15:55:05 sucker :p Feb 05 16:03:44 and ambient display is much more reliable on 5x :( Feb 05 16:05:53 pfn, does it fail on the 6 ? Feb 05 16:07:39 it almost never shows up when I pick up the phone Feb 05 16:07:59 the 5x seems to pop it up reliably everytime I pick it up Feb 05 16:09:00 moto display is the absolute best, though Feb 05 16:16:29 hello Feb 05 16:16:48 I was wondering what platform most Android devs work on? Windows or Linux? Feb 05 16:17:07 doubt linux. either windows / OS X Feb 05 16:18:58 Interesting. Thanks g00s Feb 05 16:19:24 aosp is all Linux Feb 05 16:21:22 And do most use the Android SDK emulator or a third party one? Feb 05 16:21:36 I have heard good things about Genymotion and the Visual Studio Emulator (which uses Hyper-V) Feb 05 16:23:07 mrp, all are good Feb 05 16:23:26 at least if you use the beta emulator as SDK emulator Feb 05 16:23:45 if you are willing to pay for genymotion, it has some nice features too Feb 05 16:23:58 I have been using the current release version of the SDK emulator and with KVM it is very fast. Feb 05 16:24:00 linux / osx for m Feb 05 16:24:03 e Feb 05 16:24:25 only because they gave me mac at work Feb 05 16:24:33 pretty much never use emulator except for automated testing Feb 05 16:24:44 << windows user Feb 05 16:24:48 and sometimes for doing screen demos Feb 05 16:24:56 but I did it on every os, they all work fine Feb 05 16:25:01 danijoo: we're with you, at hard times Feb 05 16:25:02 but vysor helps there Feb 05 16:25:14 pfn, you should try the beta emulator. its really good Feb 05 16:25:27 does it still freeze ? Feb 05 16:25:42 gordon_, it never froze for me.. Feb 05 16:25:56 it did for me Feb 05 16:26:04 not mentioning 'instant mode' Feb 05 16:26:08 which was working Feb 05 16:26:14 i disabled instant mode because i cant use it Feb 05 16:26:15 or rather not working more often thn working Feb 05 16:26:28 but I read it got way better over the last 9 releases Feb 05 16:27:15 unfortunately it still doesnt support other jvm languages Feb 05 16:27:23 lol Feb 05 16:28:10 do videos taken on android have latitude and longitude attributes I can retrieve? Feb 05 16:28:18 or lets say it the other way arround: kotlin compiler didnt adjust the outputted bytecode to work with it, yet ;) Feb 05 16:28:31 I'm using exifinterface to get image media attributes Feb 05 16:28:36 lexton, i guess that depends on the phone and the user settings Feb 05 16:29:03 danijoo: how so? Feb 05 16:29:35 lexton, you can disable that in the stock photo app Feb 05 16:29:49 some people dont want to share their lat/long ;) Feb 05 16:29:53 right Feb 05 16:30:23 but I haven't turned that off and I'm not getting lat/lon from videos on my nexus 6p, however I can get lat/lon for images Feb 05 16:31:48 lexton, according to this: http://www.stoimen.com/blog/2011/02/04/reading-gps-latitude-and-longitude-from-image-and-video-files/ , the geotag is not saved with the video but in a seperate file Feb 05 16:31:53 no idea if and how you can access tat Feb 05 16:31:55 that Feb 05 16:33:13 saw that link already, guess I need to investigate more Feb 05 16:35:01 3gp and mp4 don't have metadata containers for geotagging Feb 05 16:35:11 at least, the last time I looked Feb 05 16:35:24 mov does, but android doesnt' record in mov Feb 05 16:37:54 * pfn relocks the bootloader on his 2013 moto x Feb 05 16:38:34 why? Feb 05 16:38:56 hi guys - I've just tried to install a release version of my APK, but it says application not installed - how do I find out why it's saying this? Feb 05 16:39:03 you know these days when you want to program but not for your boss? zzzz Feb 05 16:39:52 ChrizC did you try on different devices? Feb 05 16:39:52 ChrizC, it gives you an error code Feb 05 16:40:01 if you do it via logcat Feb 05 16:40:04 casadogg: two different devices, both the same issue Feb 05 16:40:29 missingno, why not? I don't plan on flashing a rom ever Feb 05 16:41:08 ohhh, it's 'cos it's not signed... I didn't think you had to have it signed to do a release build Feb 05 16:41:16 lol Feb 05 16:41:18 I know you'd need one to release on GPlay Feb 05 16:41:21 ChrizC, every build has to be signed Feb 05 16:41:29 well bum, I hate signing stuff Feb 05 16:41:32 even debug builds are signed Feb 05 16:41:36 just use androidstudio Feb 05 16:41:37 walk in the park Feb 05 16:41:47 ChrizC, gradle can sign it for you if you configure it to do Feb 05 16:48:38 I have a server that my app fetches data from whenever needed Feb 05 16:50:00 the original plan was to always keep a sqlite database in sync with the latest data Feb 05 16:50:08 that is, some sort of UPSERT whenever I fetched data Feb 05 16:50:16 but now I learned that sqlite does not support UPSERT Feb 05 16:50:32 oh, can't lock bootloader without also flashing signed images at the same time Feb 05 16:50:34 that's annoying Feb 05 16:56:41 w0bni, if(exist) update else insert ;) Feb 05 16:57:03 danijoo: won't it be terribly slow? Feb 05 16:57:14 My plan is to do this on each row(~100 max), and then load it in UI Feb 05 16:57:31 do it in transaction Feb 05 16:58:01 but yes, it will be slower than upsert Feb 05 16:58:17 but still usable? Feb 05 16:58:25 you dont have a choice, have you ;) Feb 05 16:59:01 I am considering having the UI load straight from database, and then having an async task fetching from json with the Activity implementing an interface for letting it know if the async task changed any data Feb 05 17:00:02 w0bni, id use a syncadapter or service and then broadcast if something changed Feb 05 17:00:15 that way the sync is independent from your activity Feb 05 17:01:51 danijoo: syncadapter seems like what I want, thanks! Feb 05 17:17:59 hm, not what i expected. Plaid's bottom sheet is the content view (with 1 child) for the activity - so i guess the whole activity is the sheet ? Feb 05 17:18:21 no, the bottomsheet is the container, much like drawerlayout Feb 05 17:18:41 bottomsheetlayout contains both the bottomsheet and content Feb 05 17:22:27 thats the way the flipboard one works - activity_post_new_designer_news_story has io.plaidapp.ui.widget.BottomSheet as the root element, and it only has one child - the sheet contents. am i missing something O.o Feb 05 17:23:51 pfn which bottom sheet lib are you familiar with ? Feb 05 17:24:05 i could use flipboard or soacn Feb 05 17:24:10 none Feb 05 17:24:12 I write my own Feb 05 17:24:25 ViewDragHelper Feb 05 17:24:32 (which is what all the bottomsheet libs use) Feb 05 17:25:13 probably because activity_post_new_designer_news_story is a fragment container, and the activity stuffs the content fragment in Feb 05 17:27:44 Nick doesn't use any Fragments in plaid Feb 05 17:28:13 lots of interesting stuff going on though Feb 05 17:28:15 who's Nick Feb 05 17:28:21 Nick Butcher Feb 05 17:28:54 ah Feb 05 17:29:46 that Nick Feb 05 17:30:22 if not fragment, then dynamic view attach, whatever Feb 05 17:30:30 Hello Feb 05 17:30:31 same difference Feb 05 17:30:50 I'm getting the error failed to find target with hash string 'android-22' when trying to build my APK in Android Studio Feb 05 17:31:05 now I know this means I must change the CompileSDK variable inside gradle, but i have no idea how to access that file to edit it? Feb 05 17:31:12 All I'm given in the error is a link to the project structure Feb 05 17:31:34 It shows API level 21 and the error says 22, so I should change 22->21 Feb 05 17:32:00 but where Feb 05 17:32:31 yeah dismissing the bottomsheet finishes the activity, interesting Feb 05 17:33:09 Bantalon, build.gradle Feb 05 17:35:17 just install android-22 Feb 05 17:35:43 hmm, can't arbitrarily toggle a View's drawableState huh Feb 05 17:36:30 don't see anything of value in that file danijoo Feb 05 17:36:32 opening it in a text editor Feb 05 17:36:43 you opened the wrong one Feb 05 17:36:56 where from pfn Feb 05 17:37:26 hum Feb 05 17:37:30 app/build.gradle Feb 05 17:37:34 and from the android sdk Feb 05 17:37:35 where else Feb 05 17:38:49 god damnit Feb 05 17:39:17 Bantalon, little hint: set android studio to show all files, then you dont need a text editor Feb 05 17:45:21 it doesn't show build.gradle by default? that's dumb Feb 05 17:46:34 there is a folder at the bottom of the tree view (gradle scripts) that shows all module build.gradles Feb 05 17:46:58 Is sqlite an efficient way to store a 450,000 word dictionary for real time lookup as a user types in a textbox? The dictionary is about 4 MB as a text file. I'm gonna be running this on an old API 15 phone. Feb 05 17:49:37 efficient? not really Feb 05 17:49:53 a trie, but it's still going to take up a lot of memory Feb 05 17:50:36 could probably represent a trie in sqlite though Feb 05 17:51:41 then again, searching for trie + sql results in shit results Feb 05 17:57:21 honestemu this is one of the better trie impls i've seen https://github.com/npgall/concurrent-trees Feb 05 17:57:29 the other popular one is in apache commons Feb 05 17:57:37 commons collections Feb 05 18:02:02 * HouseMD pops 2 vicodin pills Feb 05 18:03:42 Its never lupus! Feb 05 18:07:53 pfn: Would you recommend using a trie? That would probably be the most efficient? Feb 05 18:08:40 I did say a trie to begin with Feb 05 18:13:45 pfn: Oh okay. What about a dawg? Feb 05 18:14:02 a dawg? Feb 05 18:14:16 a trie is a dag Feb 05 18:17:01 in school they seemed more like a drag, amirite? Feb 05 18:19:19 what? Feb 05 18:19:20 hah Feb 05 18:20:52 honestemu you can put tries in your tries ... Feb 05 18:24:46 http://cdn.meme.am/instances/500x/55141373.jpg Feb 05 18:24:47 Hey guys! If I create my own Preference by extending Preference, what do I have to do in order to be able to use it in a xml? Feb 05 18:25:09 nothing Aoi Feb 05 18:25:14 you can just do it.. Feb 05 18:25:21 oh hey danijoo hehe - your suggestion from last night worked Feb 05 18:25:39 but I want to encapsulate it all in a "LocationPreference" sort of thing Feb 05 18:25:51 ah so it just recognizes that I can use it and that's it? Feb 05 18:26:15 you put the full package name in your xml and it wwill work Feb 05 18:26:37 ie: Feb 05 18:26:40 oh.. or I could include a namespace? Feb 05 18:26:50 or wouldn't that work? Feb 05 18:27:06 no idea. im doing it that way Feb 05 18:27:28 alright - works for me, too, I guess. Thanks! I will give it a try.. just thought I have to register it somehow somewhere or something... Feb 05 18:27:54 also thank you for replying for the second time! :D Feb 05 18:31:41 hm weird.. I am using PreferenceFragments and so I do not have an idea how the (default, but adjusted) SettingsActivity goes about constructing the preferences.. hm I guess I should google it >.< cause I wouldn't want to ask a stupid question Feb 05 18:32:34 oh I think it's "addPreferenceFromResource" hmm Feb 05 18:34:56 eventbus 3 is out. Feb 05 18:53:03 if you return false from onInterceptTouchEvent does it call onTouchEvent? Feb 05 18:53:56 If no children return true from onTouchEvent Feb 05 18:54:56 that's weird "This method will only be called if the touch event was intercepted in onInterceptTouchEvent" Feb 05 18:55:25 i'm returning false from onInterceptTouchEvent but it's still calling onTouchEvent Feb 05 18:55:41 "Google Play services out of date. Requires 8487000 but found 8299574" < when this kind of issue happens, and there is no way to force an update, should I simply use an older version than the latest one? Feb 05 18:55:47 actually, all i want is to check if it's swiping or pressing Feb 05 18:56:46 adq can't update the emu afaik; i was hoping somebody would ask about that at dev summit - major pita Feb 05 18:57:03 like, are you f%$ kidding me level PITA Feb 05 18:57:08 yes g00s, it happens on the emu in this case Feb 05 18:57:19 but i suspect it can also happens on android wear watch not fully updated Feb 05 18:57:26 (by the way it was on the wear emu) Feb 05 18:57:28 thats the reason why my app is still on 8.2 Feb 05 18:57:45 i wonder what kitkat emu has Feb 05 18:57:51 g00s, 8.2 Feb 05 18:57:54 that prevents communication between handheld (up to date) and the wear side (not up to date) Feb 05 18:58:10 danijoo thats pretty recent actually Feb 05 18:58:15 i downgraded the version and of course it works Feb 05 18:58:21 at least thats what the 2.0 emulator has Feb 05 18:58:25 but i dreamed about a better solution Feb 05 18:58:46 That how it works, Twirl. Touch events travel up the view hierarchy, giving viewgroups a chance to intercept, and then back down. A ViewGroups onTouchEvent will be called if no children return true Feb 05 19:02:20 alright, how am i supposed to detect if it's a swipe or press if i'm pressing on a linear layout with a bunch of elements? Feb 05 19:03:26 By checking how far the touch has moved. E.g. by checking it has moved more than https://developer.android.com/reference/android/view/ViewConfiguration.html#getScaledTouchSlop() Feb 05 19:03:38 yea that's what i'm trying to do Feb 05 19:03:42 See how ScrollView handles it, that's a simple case Feb 05 19:13:32 Hello, I'm getting a Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: it's getting when trying to get the header by a header = in.readParcelable(LojaHeader.class.getClassLoader()); in the Contructor(Parcel in). I've already tried to set the bundle classloader to the main parcelable class loader but still not working. Feb 05 19:18:50 Forget it, I just realized what was wrong Feb 05 19:18:59 Thank you anyway. Feb 05 19:19:07 :D Feb 05 19:19:14 👍🏻 Feb 05 19:19:56 Hm .. weird.. even though I added a user permission to read external storage, I do not seem to be able / allowed to navigate into the /storage/emulated folder (to e.g. allow picking the internal storage instead) Feb 05 19:20:01 anyone know if you can run Appium tests with Spoon? Feb 05 19:20:15 is it just because of bad programming for that thing I am using or did I miss some other permission? Feb 05 19:20:27 Aoi, is it android 6? Feb 05 19:20:39 ah.. I think it might be what the emu is running Feb 05 19:20:46 and if yes, did you ask for runtime permission Feb 05 19:21:00 is the only thing I added in the manifest Feb 05 19:21:21 Aoi, android 6 has a new permission system Feb 05 19:21:27 you need to ask for permission at runtime Feb 05 19:21:37 ah .. okay will check it out! thanks! Feb 05 19:25:17 I'm doing something wrong with my sqlite db connections but not sure what.. I'm using approach #1 outlined here to manage the connections.. http://www.androiddesignpatterns.com/2012/05/correctly-managing-your-sqlite-database.html .. but when I try to open up a connection in the app later on by calling 'DatabaseHelper helper = DatabaseHelper.getInstance(context);', it's not letting me connect to the db, giving me the whole Feb 05 19:25:18 connection pool has been unable to grant a connection error bit .. Feb 05 19:25:38 Ok, I still getting this: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: SPMS EPIA LOTE 03 BLOCO A SN this last words in capslock is the string value. I don't understand what could go wrong when unparsing an String Feb 05 19:40:29 Hey, what's the current best practice for focus colors? Feb 05 19:40:40 Like, the ripple colors for buttons, for example. Feb 05 19:40:52 The material design documentation is conflicting in that, Feb 05 19:40:59 And every app implements it differently. Feb 05 19:41:07 I prefer to keep them white on my app Feb 05 19:41:20 wow you cannot give a runtime permission for the whole app session? you have to re-request it EACH time? D: that's effed up Feb 05 19:41:23 while primary is dark green and secondary is nearly white Feb 05 19:41:28 Either 35% opacity of accent color for elements already in accent color (material design docs) Feb 05 19:41:42 Or blue-grey... Feb 05 19:41:43 Aoi, if you requested it once, its for the whole app session Feb 05 19:41:58 well .. somehow not for me .. Feb 05 19:42:06 You have to re-request them, but they'll be granted automatically, right? Feb 05 19:42:09 ( I copy&pasted the example from developer.android.com ) Feb 05 19:43:04 What should I do if I need to have a base espresso test class, and have another extend it (so I can override and pass in a different variable), but I don't want the base class to be tested when I run all of my tests? Feb 05 19:43:06 hm perhaps it's because I am disposing the activity using finish() when I am done? Feb 05 19:43:41 hm in JUnit you'd probably just leave out the @Test annotation, eghdk Feb 05 19:43:51 eghdk: Make the base class abstract? Or just don’t have any @Tests in it Feb 05 19:48:18 My base class has @Test in it, but if I extend it, and run the extended class, it doesn't run the parent class tests =( Feb 05 19:48:29 s73v3r and Aoi Feb 05 19:49:06 but you said you did not want to run the parent's Tests Feb 05 19:49:46 I don't want to run them, except for in the child. Feb 05 19:50:43 hm I thought if you remove @Test in your base / parent class, you can extend/override the test method in the subclass and annotate it with @Test to run it .. Feb 05 19:50:48 Basically I have one test called TestBase and then TestA and TestB that extend TestBase. For the SOLE purpose of changing a String value. Feb 05 19:50:57 also you might need to call super.methodname() on it Feb 05 19:51:03 I'll try that. Feb 05 19:51:30 again I am not sure it works like that with espresso tests.. I just know that's how I'd do it in JUnit it I really had to Feb 05 19:51:44 though I'd avoid subclassing tests altogether, but that's personal preference I guess Feb 05 19:53:32 hm somehow requesting runtime permissions does not work... it'd be ignored if I was to run my app on 5.1, right? Feb 05 19:53:50 Yeah Aoi I don't want to, but the system we're using to parse our tests results out uses class names... so we're doing one test per class... Feb 05 19:54:04 Aoi: You using Compat code for your permission stuff? Feb 05 19:54:19 yeah.. Feb 05 19:54:26 and I just saw emulator is running 6.0 Feb 05 19:54:37 but I just don't get a WRITE_EXTERNAL_STORAGE request Feb 05 19:55:32 even though I checked using ContextCompat and requested the permission and whatnot.. upon reloading activity (back + picking it anew) it keeps re-requesting it and the hasPermission boolean returns false all the time.. Feb 05 19:55:55 it's no problem though.. I'll eventually figure it out.. it's not my main focus right now anyway Feb 05 20:01:14 Hello guys, I want to costumize the default drawer from Google, can someone give me a pointer where to look? Feb 05 20:02:37 How do I bubble touch events to parent? Feb 05 20:02:56 Structure is FrameLayout -> RecyclerView Feb 05 20:03:06 OnTouch is not getting called on FrameLayout Feb 05 20:04:33 because recyclerview consumes touch Feb 05 20:04:45 oh god .. I am more stupid than I am allowedf to be ...... I did "Log.d..." with !hasPermission .. lmao Feb 05 20:04:56 and I am wondering why I am not receiving a request Feb 05 20:10:23 Ashiren ty :) Feb 05 20:10:37 Ashiren Every scroll widget intercepts touch events, right? Feb 05 20:15:14 hm my permissions-related problem persists somehow (it seems a folder-/file-list is still returning null even though I have the permission), but since I am developing for 5.1 for now - it's okay.. and the possible drawbacks on 6.0 are not that big.. Feb 05 20:15:38 besides for the F of me I cannot figure out why it won't allow me to browse all folders in /storage/emulated Feb 05 20:19:00 casadogg: eeyup Feb 05 20:19:41 casadogg: you could for example extends recyclerview onTouchEvent (or onMotionEvent?), call super.onTouchEvent and still return false or something Feb 05 20:19:52 running automated tests with gradle, is there a way to specify the test package? I want to have packages for Appium tests as well as regular tests Feb 05 20:20:08 Ashiren yeh it's tricky actually Feb 05 20:20:29 apparently even if I set intercepttouchevent to true on the parent, the recyclerview will call a method asking to disallow the interception Feb 05 20:21:55 ugh, how do ColorSpan interact with setTextColor in textview Feb 05 20:24:08 jeez .. just read up on changes in regards to external storage with android 6.0 .. eff me ... that's what I have to say about it D: Feb 05 20:24:51 in the end the app is for me so I don't care... and if I move to 6.0, I'll certainly run into heavy trouble as there are paths not accessible even with external storage read/write permission .. just lol Feb 05 20:25:32 means I somehow have to hard-code the showing of "interal" vs "external" storages .. instead of just letting the user move to /storages/emulated Feb 05 20:53:58 anyone else mix up `ls` and `git status` ? or am I the only weirdo in here who does that Feb 05 21:01:35 Um, I have an intent service, dosn't calling startService() invokes onHandleIntent in my service? Feb 05 21:02:10 do i need anything to be able to startActivity(activity) inside my extended LinearLayout? Feb 05 21:02:31 because it says it cannot resolve the method Feb 05 21:03:29 LinearLayout has no method startActivity Feb 05 21:06:55 context has Feb 05 21:07:00 and everything extending it Feb 05 21:07:22 alright, thanks Feb 05 21:08:05 (But not a startActivity(Activity), if that's what that meant; just a startActivity(Intent).) Feb 05 21:08:50 does textview.setTextColor cancel span information? I would expect it not to Feb 05 21:11:37 ah, textAllCaps cancels span formatting Feb 05 21:15:06 setTextColor doesn't Feb 05 21:36:00 for annotations do you usually put the annotation right before the data type? Feb 05 21:36:36 for example @Nullable String in a parameter... would you do final @Nullable String ? Feb 05 21:37:08 whats the alternative> Feb 05 21:37:22 I'm not sure @Nullable final String looks weird to me Feb 05 21:37:32 but they both looked a little weird so I wasn't sure Feb 05 21:37:33 hah Feb 05 21:37:57 ah yeah. thats my way then. @Nullable val myString: String Feb 05 21:38:20 what language is that Feb 05 21:38:29 err @Nullable final String myString in java. sorry Feb 05 21:38:34 hah Feb 05 21:38:39 okay Feb 05 21:38:57 I was like that looks kind of swifty/pascalish Feb 05 21:39:00 i was still in kotlin with my mind :p Feb 05 21:39:29 oh I see Feb 05 21:39:35 seems to be the "new style" Feb 05 21:39:42 which is ironic because it's kind of old style Feb 05 21:39:59 I haven't done any pascal really but i've seen snips here and there Feb 05 21:40:20 yeah I think it has a lot from swift Feb 05 21:40:26 i dont know it but people keep saying it Feb 05 21:40:42 yeah swift would be like var myString: String? Feb 05 21:40:51 thats also kotlin. Feb 05 21:40:52 :) Feb 05 21:40:55 :] Feb 05 21:41:10 so kotlin provides optionals then? Feb 05 21:41:18 optionals? what are optionals? Feb 05 21:41:24 In the form of ?., yes Feb 05 21:41:44 null-safty you mean? Feb 05 21:41:54 kind of like @Nullable and @NotNull annotations except it's more language enforced... java 8 has something i forgot what it's called Feb 05 21:41:57 yeah Feb 05 21:42:25 if you do var someString: String that can never be null, yes Feb 05 21:42:28 so if you have a nullable value you have to unwrap it before you can use it Feb 05 21:42:33 but var someString: String? can be null or string Feb 05 21:42:34 yeah Feb 05 21:42:45 It’s called Optional in Java Feb 05 21:42:49 oh ok Feb 05 21:42:51 heh Feb 05 21:42:56 I thought so Feb 05 21:43:10 I was thinking to make my own optional class at some point Feb 05 21:43:12 havent used java for anything but android. maybe thats why i dont know it. Feb 05 21:43:17 but I wasn't sure if it'd be worth it with java 8 coming soon Feb 05 21:43:23 forever stuck on 1.7 :p Feb 05 21:43:27 yeah Feb 05 21:43:31 Optional is ok Feb 05 21:43:39 I say "coming soon" but I have no idea when it's actually coming to android Feb 05 21:43:51 I really like the optionals in swift Feb 05 21:44:25 it makes the decision of "could this be null?" be a forethought instead of a last minute, "yeah just set it to null" Feb 05 21:44:48 nobody knows if it will ever come Feb 05 21:45:04 maybe it would be worth it to implement my own then Feb 05 21:45:15 but currently I have no personal projects in android to try it out with anyway Feb 05 21:45:19 there have been a few Optional backports Feb 05 21:45:24 yeah? Feb 05 21:45:25 you can also use guava's Optional Feb 05 21:45:36 but guava's optional isn't very good, either Feb 05 21:45:44 ah yeah I think I've seen it Feb 05 21:46:03 * pfn uses scala.Option happily Feb 05 21:46:11 i remember wanting something like this even for objective-c... then they came out with swift Feb 05 21:46:17 so I just switched Feb 05 21:46:46 objective-c has fewer null pointer issues Feb 05 21:47:27 true, but it still has issues with dictionaries Feb 05 21:47:38 which was my primary complaint Feb 05 21:48:00 working with json from a dictionary, but there are still nicer ways to handle json Feb 05 21:49:23 I have an intent that is open and then when the user exits and comes back it goes back to that intent but they want it not to also when the app closes it doesn t seem to close tha tintent imediately Feb 05 21:50:21 any idea how to be able to set a static property in a LinearLayout inside a RecyclerView? Because every time i scroll it calls onBindViewHolder and overrides the previously set value Feb 05 21:51:13 static property? Feb 05 21:51:19 Twirl, thats the whole point of RecyclerView Feb 05 21:51:26 it >recycles< its views. Feb 05 21:52:12 well, it's like a list of items, and i need to see which item is being clicked so it makes sense to put a static field on the items or rows (linearlayout) Feb 05 21:53:00 x_x Feb 05 21:53:04 but it's calling onBindViewHolder and overriding the value every time i click on it Feb 05 21:53:14 i mean, scroll Feb 05 21:53:23 so i should try something else Feb 05 21:53:32 maybe setTag getTag Feb 05 21:53:35 Twirl, you cant store it in the item. maybe store a list of selected positions in the recyclerAdapter Feb 05 21:53:54 ahh Feb 05 21:53:55 and check against that list in onBindViewHolder to set the property again Feb 05 21:54:59 yea i read about the positions but it would be easier it i could set my own variable Feb 05 21:55:15 with blackjack and hookers Feb 05 21:55:52 seriously, there has to be a more reasonable way Feb 05 21:56:11 Twirl: think about it this way: Feb 05 21:56:18 you have two levels. The content, and the view. Feb 05 21:56:21 https://www.bignerdranch.com/blog/recyclerview-part-2-choice-modes/ Feb 05 21:56:21 item is only for displaying Feb 05 21:56:24 the view only knows how to render things, Feb 05 21:56:26 it doesnt know anything Feb 05 21:56:28 justjanne: i'm using the recyclerview that you suggested btw Feb 05 21:56:31 the content is only for storing things. Feb 05 21:56:40 the view never knows anything about the content, Feb 05 21:56:46 the content never knows anything about the view, Feb 05 21:57:30 and onbindviewholder binds a view to a content for a short time (until scrolled off screen) Feb 05 21:57:30 store selected positions in the content, or the adapter Feb 05 21:59:49 so the position remains the same, that's the only thing? Feb 05 22:00:15 in the adapter Feb 05 22:00:16 its simple. you add a list of ints to your adapter Feb 05 22:00:24 if something is selected, you put the number in the list Feb 05 22:00:40 and onBindViewHolder you check if the list contains the position and set the property according to that Feb 05 22:02:21 Hi. I have gridview and I want to make it in horizontal screen orientation. How to? Feb 05 22:03:14 Ozymandy, not possible in GridView, use a RecyclerView or Tablelayout/Horizontalscrollvie Feb 05 22:03:52 No, don't scrollable horizontally. Just want to turn orienation of grid Feb 05 22:05:40 I dont get what you want Feb 05 22:06:32 danijoo: https://blahti.files.wordpress.com/2012/05/figure-3.png second pic Feb 05 22:07:04 just rotate the phone Feb 05 22:07:06 android handles that Feb 05 22:07:42 danijoo: hmm? How to? Feb 05 22:07:51 I need only horizontal Feb 05 22:08:12 then lock the screen orientation Feb 05 22:09:03 so I created the following flow where each activity is started using startActivityForResult Feb 05 22:09:19 Login -> Activity1 -> Activity2 Feb 05 22:09:32 danijoo: Hmm. I get. I can rotate every imageview of gridview Feb 05 22:09:44 USER_LOGGED_OUT is passed as a result to Login by chainging together onActivityResult() calls Feb 05 22:10:23 now, do I have to use startActivityForResult for any new activity on top of that stack? Feb 05 22:11:02 basically, will Login still the the result if I call startActivity instead inside Activity2? Feb 05 22:12:19 RustySha1kleford, that looks like a mess. Feb 05 22:12:26 why so many startActivityForResult? Feb 05 22:12:39 Login needs the result Feb 05 22:12:44 why? Feb 05 22:12:48 uh, I think its better than the old flow Feb 05 22:13:28 danijoo: well... thats the best way I could think of Feb 05 22:13:54 uour old flow is worse than this? cant imagine it.. Feb 05 22:14:27 Login -> Activity1 -> Activity2 -> Login -> kill every activity behind this one in the stack Feb 05 22:14:33 would be the old flow Feb 05 22:14:51 whats the reason for all this? why not a normal activity flow? Feb 05 22:15:08 that also causes the app to steal focus if the user moves to a different app and the login times out Feb 05 22:15:44 my proposed flow seems sane to me Feb 05 22:16:14 I have gridview 4*4 Feb 05 22:16:22 how would you make a normal activity flow? Feb 05 22:16:23 soo. what happens with your current flow if the app gets minimized and killed by the system Feb 05 22:16:35 bunch of wierd shit Feb 05 22:16:36 and the user brings it back up with Activity B but without a backstack? Feb 05 22:16:39 And I need make it in the whole screen Feb 05 22:17:12 size 100% screen Feb 05 22:18:00 Makes griedview 100% screen and every imageview 6.25% Feb 05 22:18:07 RustySha1kleford, is this all to be sure the user is logged in? Feb 05 22:18:19 nope, to make sure they are logged out gracefully Feb 05 22:18:36 why dont you simply clear the backstack once the user pressed logout Feb 05 22:18:44 Can anyone help me? Feb 05 22:19:19 danijoo: would you recreate the Login activity on top of the stack Feb 05 22:19:28 ugh, I really hate how most android libraries are closed to extension Feb 05 22:19:31 RustySha1kleford, just start LoginAcitivity and clear everything behind Feb 05 22:19:37 or leave it at the bottom through the whole life of the app Feb 05 22:21:05 yes. recreate it on Top Feb 05 22:21:06 danijoo: also, startActivity will steal focus if the app is in the background Feb 05 22:21:24 if the app is in background, you dont have to care about if user is logged in or not Feb 05 22:22:34 login times out, LoginActivity is launched with startActivity and then the backstack is clearned Feb 05 22:22:48 works great, but if its the background it takes focus Feb 05 22:22:52 its rather annoying Feb 05 22:23:01 So don't do it while the app is in the background Feb 05 22:23:06 no. if its in background you dont care about the timeout and do nothing Feb 05 22:23:45 you only check for it if the app is or comes to forground Feb 05 22:26:55 well I think the idea is to close the connection between the site Feb 05 22:26:56 hm weird.. I thought if I get the Editor of a Preference and adjust the value, the summary refreshes (it is bound after all and shows properly when the preferencefragment is loaded...) Feb 05 22:27:28 but yeah that makes sense. Close the connection, but don't create/kill any activities until the user returns Feb 05 22:31:28 http://p.samuraimanpurse.com/KiTfQ_WG.txt Feb 05 22:31:50 I have this SSLSocketFactory, when I create a socket out of it (i.e. connect), I get: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.  Feb 05 22:32:51 (Yeah I intend to ignore the certificate, this is a requirement in my application) Feb 05 22:34:08 I still kinda like my design. There's a base activity that all 3 inherit from Feb 05 22:34:30 How to get device width and height? Feb 05 22:34:42 override onActivityResult. If its LoginActivity, use the result. If not, pass the result along and then call finish() Feb 05 22:35:00 told you what the problem with that is Feb 05 22:35:08 Ozymandy, physical ones or display? Feb 05 22:35:16 OverCoder: display Feb 05 22:35:44 Ozymandy, http://stackoverflow.com/questions/1016896/get-screen-dimensions-in-pixels Feb 05 22:35:54 This question is upvoted 1170 times Feb 05 22:36:13 and asked here twice as often ^^ Feb 05 22:36:54 OverCoder: Well, but I create app for api>=7 Feb 05 22:37:18 for what? support for 0.01% of devices? Feb 05 22:37:18 and? Feb 05 22:37:39 danijoo, sometimes it's cool that it works on older devices, i.e. why not? Feb 05 22:37:55 My app supports API 8 and up, it doesn't hurt at all, at least for now Feb 05 22:38:02 There're solution for older version Feb 05 22:38:05 versions* Feb 05 22:38:21 OverCoder, it has hurt duriong development and it will hurt for supporting it. Feb 05 22:38:32 Ozymandy, http://stackoverflow.com/a/11623621/2164304 Feb 05 22:39:14 danijoo, I am developing my app right now, since I have started until now I haven't used or found it great if I used any part of a newer API, AppCompat is awesome Feb 05 22:41:29 OverCoder: Well, I use it in adapter, so I can call getwindowsmanager() here Feb 05 22:41:35 because it's from activity Feb 05 22:42:02 What do you mean? Feb 05 22:42:12 You're in an Adapter and you want to get screen dimensions? Feb 05 22:42:18 yes Feb 05 22:42:52 In the constructor of you Adapter add a Context or Activity parameter (Context is preferred if Context has that method), and assign it to a global variable and use it to get whatever Feb 05 22:43:10 yews, context Feb 05 22:43:21 How to get activity object from context? Feb 05 22:43:50 you can also get the context in getView(...) without passing a context Feb 05 22:44:32 But it's adapter, which extends from BaseAdapter and there is need context Feb 05 22:45:02 getView gets a parentView as param Feb 05 22:45:10 parent.getContext() -> profit! Feb 05 22:46:13 Oh, yes. o\ Feb 05 22:47:35 danijoo: I need activity object Feb 05 22:47:43 ah k Feb 05 22:47:53 From context object Feb 05 22:48:26 you cant get activity from context Feb 05 22:48:32 but context is activity in some cases Feb 05 22:48:43 pass it to the constructor like OverCoder said Feb 05 22:48:56 Is there any reason to use Java7 instead of Java8 when setting up Android Studio on Ubuntu? Feb 05 22:50:03 not really Feb 05 22:50:08 Ozymandy, Context context; MyCustomAdapter(Context context, AllMyOtherParams... params) { this.context = context; } Feb 05 22:50:34 Guys is there any permission other than internet for SSL connections or something? Feb 05 22:50:35 thanks s73v3r Feb 05 22:50:41 doesnt newest AS need a java 8 jre? Feb 05 22:50:46 Because I am ignoring selfsigned certificates but I keep getting exceptions Feb 05 22:51:29 OverCoder, whats your code? Feb 05 22:51:45 http://p.samuraimanpurse.com/KiTfQ_WG.txt Feb 05 22:52:42 what do you use for http requests? OkHttp? Feb 05 22:52:55 No I don't want HTTP, I am using a socket Feb 05 22:53:08 It's not a website that I am connecting to Feb 05 22:53:18 specifically, it's an IRC server Feb 05 22:53:23 Thanks s73v3r and danijoo. I'll go with 8. Feb 05 22:53:25 try to return null instead of new X509Certificate Feb 05 22:53:34 Okay, /me tries just now Feb 05 22:55:48 and show your whole SSLSocketFactory if that does not work Feb 05 22:56:10 It's installing right now, but that's all of the code (besides creating the actual socket) Feb 05 22:56:47 Didn't work Feb 05 22:57:03 I get the SSLSocketFactory from the SSLContext Feb 05 22:57:46 so you can do a shared element transition from fragment -> fragment, activity -> activity, but can you do fragment -> activity? Feb 05 22:58:27 orbyt_, why not? Feb 05 22:58:49 well from what I can tell they use slightly different methods when implementing shared transitions Feb 05 22:58:51 and h Feb 05 22:59:11 and I havent found anything about doing fragments to activities* Feb 05 22:59:27 you can do activityA's fragment to ActivityB's fragement so im sure activity <-> fragment is working too Feb 05 22:59:39 but i never tried it tbh Feb 05 23:00:40 hmm guess ill just have to try it Feb 05 23:01:15 OverCoder, do you really want to trust ALL? why not self sign? Feb 05 23:02:20 danijoo, just, ALL Feb 05 23:02:44 I’ve always said, if there’s one thing that’s lacking in this world, it’s trust Feb 05 23:02:50 Because I am making an IRC client, and you know, a user connects to different servers, and 99% if not all the servers use self signed one Feb 05 23:03:24 s73v3r, quite true Feb 05 23:04:27 https://frinkiac.com/meme/S13E13/508800.jpg?lines=Oh%2C+everybody%0A+trusts+Lisa.+Precious%0A+little+Lisa%2C+apple+of+her%0A+daddy%27s+eye. Feb 05 23:04:37 OverCoder, hm.. from what I read it should work. they all use your code with returning null in getAcceptedIssueres Feb 05 23:05:07 Yeah which is frustrating, something tells me it's related to Android Feb 05 23:05:09 OverCoder, oh! wait Feb 05 23:05:19 WHAT! (FINALLY :P) Feb 05 23:05:52 add sskFactory.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER) Feb 05 23:06:42 wow, seems to be the correct solution, I'll try and see Feb 05 23:07:27 But, there's not setHostnameVerifier method o.o Feb 05 23:08:20 oh. thats for urlconnection :/ damn Feb 05 23:08:40 :< Feb 05 23:09:49 In this example, http://developer.android.com/training/search/search.html#search Why is the second argument to getWordMatches null? Feb 05 23:10:23 honestemu, null means all in this case Feb 05 23:10:58 danijoo: Okay. Thanks. Feb 05 23:18:15 hmm, synthetic fields in java only appear in the case of anonymous/nested classes right? Feb 05 23:19:56 synthetic? Feb 05 23:20:31 My not-so-great English doesn't help me to understand what does that mean :P Feb 05 23:21:55 OverCoder: It's better to google this stuff. Feb 05 23:22:10 I see Feb 05 23:25:13 Any idea why Cursor is null on line 37 of DictionaryActivity.java? https://gist.github.com/emilabraham/e6c878017a7aa1c7a5bb Feb 05 23:27:43 IronMike, http://p.samuraimanpurse.com/KiTfQ_WG.txt Feb 05 23:27:44 Ok, OC...I'm here Feb 05 23:27:52 :) Feb 05 23:28:04 Give me a minute...I have to find my old code Feb 05 23:28:36 honestemu, because you might run into the condition of line 55 or 57 of DatabaseTable Feb 05 23:28:47 Okay, I'd be thankful :) Feb 05 23:35:03 OverCoder: Still looking for the project... Feb 05 23:35:18 IronMike, I'd be quite thankful to you for the effort :) Feb 05 23:43:12 IronMike, you couldn't? xD Feb 05 23:43:36 Ok, my situation was different. I was using a custom truststore. I think what you want to do is implement a custom X509TrustManager and then not put anything into the checkClientTrusted() method Feb 05 23:44:02 OverCoder: See above. Forgot to tag you Feb 05 23:44:09 Yeah I see Feb 05 23:44:40 But, ain't I doing that? Feb 05 23:44:52 I am not putting anything in checkClientTrusted() Feb 05 23:45:18 Then instantiate the instance and set it as the trust store like this: SSLSocketFactory socketFactory = new SSLSocketFactory(trustStore); Feb 05 23:45:38 OverCoder: Couldn't what? Feb 05 23:45:39 hm, okay I'll try Feb 05 23:46:03 IronMike, I thought you couldn't find your old code but you did :) Feb 05 23:46:33 Did you also implement checkServerTrusted() as an empty method also? Feb 05 23:46:50 Yes I did Feb 05 23:46:57 Oh ok..I see the code now. Sorry Feb 05 23:47:06 I can't insantiate 'new SSLSocketFactory(trustStore)' Feb 05 23:47:12 Because the class is abstract Feb 05 23:47:26 try SSLSocketFactory socketFactory = new SSLSocketFactory(trustStore); instead of the SSLContext route and see what happens Feb 05 23:47:29 * danijoo finally moved away from self singed certs. All hail LetsEncrypt.org Feb 05 23:47:39 SSLSocketFactory socketFactory = new SSLSocketFactory(trustAllCerts); Feb 05 23:48:06 err....SSLSocketFactory sslFactory = sc.getSocketFactory(); Feb 05 23:48:06 Yeah I copy pasted that Feb 05 23:48:15 hm Feb 05 23:48:24 dang it! Feb 05 23:48:42 SSLSocketFactory sslFactory = new SSLSocketFactory(trustAllCerts); Feb 05 23:49:26 The class is abstract Feb 05 23:49:29 I can't instantiate it Feb 05 23:49:47 What is the full qualified name of the SSLSocketFactory you're using? maybe I am using different one? Feb 05 23:53:35 OverCoder: Any luck? Feb 05 23:53:42 No Feb 05 23:53:58 The class is abstract and I can't do it like new SSLSocketFactory(trustAllCerts) Feb 05 23:54:34 What is the full qualified name of your SSLSocketFactory? mine is import javax.net.ssl.SSLSocketFactory; Feb 05 23:56:55 OverCoder: Did you see the documentation? It seems to suggest there is only one implementor: http://developer.android.com/reference/javax/net/ssl/SSLSocketFactory.html Feb 05 23:57:10 Let me see Feb 05 23:57:49 did anyone remember at which api version left/right was replaced with start/end? Feb 05 23:58:06 ie align_parentStart instead of align_parentLeft. Feb 05 23:58:09 was it 16? Feb 05 23:58:09 danijoo: I think 17. Feb 05 23:58:33 so I cant use it with 16, right? Feb 05 23:58:38 or is there some appcompat magic? Feb 05 23:58:49 http://developer.android.com/about/versions/android-4.2.html#RTL Feb 05 23:59:00 ah yeah... 17 :( Feb 05 23:59:07 thanks Feb 05 23:59:21 You can't, yeah. But if you use those attributes they'll be ignored below API 17, I think. Feb 05 23:59:37 yes. I would have to add both than Feb 05 23:59:42 not worth the effort :P Feb 05 23:59:54 I hoped I could find->replace quickly to add RTL support Feb 06 00:09:51 Any idea why the log message on line 81 is not showing up? Is it somehow not skipping the onCreate message or something? https://gist.github.com/emilabraham/1c43efca0413a64132d7 Feb 06 00:10:25 honestemu, onCreate is only called once when the database is created and then never again Feb 06 00:10:37 so if you have started the app once before this, it wont be called again Feb 06 00:10:50 unless you call it manually ofc Feb 06 00:13:13 danijoo: So how do I completely close out the app so that it calls onCreate again? I'm guessing the terminate application button in Android Monitor is not enough? Feb 06 00:13:34 honestemu, it is not called again Feb 06 00:13:44 its only called when the database file on the phone is create Feb 06 00:13:52 which is on first start after installation Feb 06 00:26:18 what is the difference of ontimetick() and updateTimer(); Feb 06 00:27:29 is the timer different from the clock Feb 06 00:27:41 ok so it must be a timer not a clock Feb 06 00:29:01 danijoo: So in order to create the db again, I have to uninstall the app? Best way to do that? Completely restart the emulator? Feb 06 00:30:03 adb uninstall packagename Feb 06 00:32:41 danijoo: In terminal? Will that remove it from the emulator? Feb 06 00:32:48 honestemu, yes Feb 06 00:33:00 or you uninstall it normally Feb 06 00:33:10 emulator settings -> apps -> your app -> uninstall Feb 06 00:44:29 hm could someone tell me how to get the list of preferences in the same PreferenceFragment? I want a SwitchPreference to disable certain other Preferences onChange Feb 06 00:46:22 I'm having an issue with getting a modified Xposed module to work Feb 06 00:46:51 Is there anything that would prevent an open-source module from working when I refactor and resign it? Feb 06 00:47:11 The changes I made work when I just resign without refactoring the name, but when I refactor the name, nothing works. Feb 06 00:49:21 is AS 2.0 based on intellij 15 ? Feb 06 00:49:45 there was a handy chart someplace Feb 06 00:55:16 g00s, i think so Feb 06 00:56:01 g00s, yes Feb 06 00:56:09 danijoo sweet thanks Feb 06 00:56:17 2.0 preview 7 is based on 15.0.3 Feb 06 00:56:36 well AS 2.0 is in beta channel, does that mean its going to be stable or will we see a bunch of RC that are canaries :D Feb 06 00:56:57 your guess? :P Feb 06 00:57:19 danijoo that would be funny: beta 2 in beta channel, RC in canary Feb 06 00:57:41 btw the beta updated fucked up for me Feb 06 00:57:55 i was on canary all the time and the update to beta somehow deleted my whole AS config files Feb 06 00:58:04 so be careful :p Feb 06 00:58:05 hrmf Feb 06 00:58:17 I am using 2.0 Preview 9 currently o.o; and it seems nice due to instantrun.. though it does not always work.. by far not always Feb 06 00:58:20 oh i won't bother until 2.0.1 is stable or something Feb 06 00:58:39 Aoi, instant run disabled here :p Feb 06 00:58:41 danijoo you are doing god's work testing AS ! Feb 06 00:58:51 g00s, haha. Feb 06 00:59:13 well it works - sometimes.. but I can never tell whether it published the new version or not .. plus it spams the logcat Feb 06 00:59:35 doesnt work with kotlin :( Feb 06 00:59:41 shit maybe i'll wait for 2.1 Feb 06 00:59:55 haha Feb 06 01:00:00 arent they on a feature / stability tick / tock kind of cycle ? Feb 06 01:00:04 well it works okay for me D: .. though I noticed it often cannot delete the intermediate folder properly.. Feb 06 01:00:29 so now I utilized "LockHunter" for that Feb 06 01:00:42 yeah.. all those instant run features seem to make clean impossible Feb 06 01:01:02 well LockHunter silently forces that on appclean.. Feb 06 01:01:08 app:clean even Feb 06 01:01:17 but not when I press the "play" button :D Feb 06 01:01:22 good to know. ill try if it also works that good with jrebel Aoi Feb 06 01:01:25 so it fails there sometimes Feb 06 01:01:46 oh - I am using JRebel at work .. but I most certainly would love not to D: hate that thing.. Feb 06 01:01:53 why? Feb 06 01:02:07 because sometimes it starts to rebuild the whole application Feb 06 01:02:14 and I am talking about thousands of classes .. Feb 06 01:02:29 well yes. but thats also true for instant run Feb 06 01:02:35 some changes cant be built incrementally Feb 06 01:02:40 oh err I am talking about eclipse + JEE applications Feb 06 01:02:51 + JRebel Feb 06 01:03:27 ah ! :) Feb 06 01:03:31 we supposedly have it set up for spring context, new and changed classes and it DOES work sometimes.. and sometimes it does not where it is supposed to Feb 06 01:03:35 I was talking about jrebel for A Feb 06 01:04:04 ah.. well if our project wasn't split into many maven projects that are build into EAR files .. we#d just use hot-deploy instead Feb 06 01:04:23 oh well.. I am a bloddy beginner in AS :( Feb 06 01:04:35 im working since a few month with Rx now, and I still confuse observeOn and subscribeOn all the time. thats so annoying.. -_- Feb 06 01:05:06 lol Feb 06 01:05:23 hell I can't even find a proper way to have a SwitchPreference enable/disable other preferences and I don't know what is the best practice to bind OnPreferenceChangeListeners .. like.. make a separate SummaryPrefrenceChangeListener class and use that? And use something else for when I am not responding to Summary-changes? Feb 06 01:05:40 danijoo did you read this ? http://www.grahamlea.com/2014/07/rxjava-threading-examples/ Feb 06 01:06:01 Aoi just add factories and listeners until it works Feb 06 01:06:11 g00s, no. can you give me a tl;dr? Feb 06 01:06:22 danijoo no, its required reading Feb 06 01:06:29 I thought factories are discouraged D: cause writing unit tests there is uhgg.. Feb 06 01:06:50 factories have not been discouraged Feb 06 01:07:00 btw i was mostly joking haha Feb 06 01:07:01 g00s, i put it in my pocket Feb 06 01:07:21 but i was serious to danijoo ;) Feb 06 01:07:30 hm so should I just make a idk .. "PreferenceChangeFactory" XD and have it contain all the different preference change listeners? Feb 06 01:08:02 cause I'll have 3 right away, possibly more in the future.. I know 3 is not a number xD... Feb 06 01:08:13 i've been trying to make a generic SqlitePreference class that stores the value in Sqlite instead of shared prefs... Feb 06 01:08:27 why? Feb 06 01:08:27 the preference API is ... clunky Feb 06 01:08:46 Aoi becuase in my case, i have a set of preferences that are applied to N identical things Feb 06 01:08:55 oh.. Feb 06 01:09:27 like each server has a preferenceFragment, but instead of doing some hokey shit like prefixing the key by row ID or something ... Feb 06 01:09:28 haha that's one of the things.. I am writing some imageboard viewer - so I might want to reuse my CachingPreferenceFragment with other IDs.. not sure that'll workout Feb 06 01:10:07 I see.. hm.. yeah .. though apparently you can specify a shared preferences file as the source? Feb 06 01:10:45 though nevermind me - I am probably far too noobie in regards to android development anyway Feb 06 01:10:53 one of the most interesting things about prefs is that Activity actually blocks in onStop until they have hit the disk Feb 06 01:11:43 but aren't they only modified one-by-one? Feb 06 01:11:59 so it'd only block for a split second until that modified preference key<->value pair is written Feb 06 01:12:07 they are all loaded into a HashMap and it gets saved at times Feb 06 01:12:38 oh o.o Feb 06 01:12:54 this isn't like a high performance k/v store :D Feb 06 01:12:56 well I believe my app will be laggy anyway at first Feb 06 01:13:13 if I ever get it to work that is Feb 06 01:28:24 * pfn twiddles thumbs for artifacts to show up on central Feb 06 01:41:47 are lambda expressions allowed with android studio 2.0 ? Feb 06 01:43:40 no Feb 06 01:43:48 java 1.8 is not supported in android Feb 06 01:43:51 they are with retrolambda Feb 06 01:43:56 android studio has nothing to do with it Feb 06 01:44:48 * pfn releases an app update on friday before stopping for the night, weee Feb 06 01:45:12 grats Feb 06 01:45:18 good thing no one uses it Feb 06 01:45:35 Aoi, no, it's reckless :P Feb 06 01:45:38 hm if you mean no one using Lambda: I am in Java 8 projects Feb 06 01:46:09 if you mean your app.. well - I probably don't, because I have no idea what it is and I mostly don't use third-party apps anyway Feb 06 01:46:26 you don't get the joke... Feb 06 01:46:39 releasing an app/update on friday is the worst Feb 06 01:47:10 friday 13th would be the worst :) Feb 06 01:47:20 only if you get murdered by mr voorhees Feb 06 01:47:23 13 o'clock Feb 06 01:48:00 actually.. the only bad thing is if you release something that does not meet high-enough quality stqandards :p Feb 06 01:48:17 I work at a place where we usually release on Saturday Feb 06 01:48:23 "you work on saturday" Feb 06 01:48:25 that is the problem Feb 06 01:48:29 eeks Feb 06 01:48:55 well we release it and then the core people, who have developed some or all of the functionality, are doomed to stay for release Feb 06 01:49:26 i dub thee unforgiven Feb 06 01:51:00 man I am so excited.. I ordered 2 pieces of a fine cake tomorrow.. Feb 06 01:51:05 yeah, I have no interest in working for places like that Feb 06 01:51:11 did that during the .com days Feb 06 01:51:20 and the various startups since then, no more Feb 06 01:51:50 well I am working at a gov institution - and it happens probably once every year .. perhaps twice Feb 06 01:52:17 best thing is releasing before going away Feb 06 01:52:18 http://static.chefkoch-cdn.de/ck.de/rezepte/157/157883/560477-960x720-mohnkuchen-mohnstrudel-mit-streuseln-hefeteig.jpg :D Feb 06 01:52:32 german spotted Feb 06 01:52:45 nope.. best thing is checking into a SVN where there are like 120 other devs and need to get tons of things done.. before going away Feb 06 01:52:47 that's when you really get the thrill :) Feb 06 01:53:05 on a Friday late evening .. and going on vacations starting Monday.. without a way to be called from work Feb 06 01:53:49 <[Saint]> People still use Subversion? Feb 06 01:53:53 why not? Feb 06 01:54:00 https://youtu.be/gtH95L9qkk4 Feb 06 01:54:04 https://github.com/pfn/qicr/blob/master/src/main/scala/com/hanhuy/android/irc/ColorPreferenceActivity.scala Feb 06 01:54:09 it's WAY simples than GIT (and we are using CVS, SVN and GIT at work) Feb 06 01:54:10 all in a couple hundred lines, not bad... Feb 06 01:55:28 svn is not simpler than git Feb 06 01:55:29 not remotely Feb 06 01:58:01 yeah.. Feb 06 01:58:11 hm wait .. android does not have uhm regular arrays? Feb 06 01:58:25 ofc it ha Feb 06 01:58:26 s Feb 06 01:58:39 like.. if I want to have an array of Preferences... I thought private Preference[] preferences was the way to go.. Feb 06 01:58:50 yes Feb 06 01:59:01 android studio 2.0 doesn't let me type in [] Feb 06 01:59:16 hm probably stupid keyboard mappings *sigh* Feb 06 01:59:18 it has nothing to do with android studio Feb 06 01:59:19 <[Saint]> Wait, what? Feb 06 01:59:19 <[Saint]> it's WAY simples than GIT (and we are using CVS, SVN and GIT at work) Feb 06 01:59:19 <[Saint]> svn is not simpler than git Feb 06 01:59:19 <[Saint]> yeah.. Feb 06 01:59:25 <[Saint]> Nice backpedal. Feb 06 01:59:26 you need to brush up on your java Feb 06 01:59:42 oh lol @Saint Feb 06 01:59:55 I thought pfn wrote svn is simpler than git .. or way simpler D: Feb 06 02:00:10 <[Saint]> It isn't. Not even close. Feb 06 02:00:12 friggin 3AM and I can't read .. and the monitor is .. oh well Feb 06 02:00:20 dunno to me it is Feb 06 02:00:27 <[Saint]> And if you're forced to use Subversion as a backend, git-svn exists. Feb 06 02:00:29 I have done nearly everything with SVN ever Feb 06 02:00:42 git-svn was /the/ pain Feb 06 02:00:52 svn is cvs++ and. that is it Feb 06 02:00:57 I believe you are referring to the ability to import svn branches etc. into git Feb 06 02:01:17 <[Saint]> it's full subversion control from git. Feb 06 02:01:25 I don't know .. I haven't been working with GIT for long enough, but I have been working with SVN for 6 years and it just works Feb 06 02:01:28 <[Saint]> not just a tiny subset of it. Feb 06 02:01:51 and I don't have time to go to university and take GIT classes before I can use it Feb 06 02:02:03 git-svn works well as long as your svn branches are completely conventional Feb 06 02:03:40 well I think for small projects I'd use whatever is there Feb 06 02:03:59 but for big projects I cannot afford to not exactly know how a versioning system works... Feb 06 02:05:31 <[Saint]> Pretty much anything an average user is going to encounter regarding workflow and terms is covered by http://gitref.org/ Feb 06 02:05:42 <[Saint]> Which is hardly a massive read. Feb 06 02:06:17 <[Saint]> You just have to forget everything you know about Subversion and don't assume anything is known about Git to make the flow easier. Feb 06 02:06:32 <[Saint]> The two are practically incomparable. Feb 06 02:07:32 that certainly helps to migrate projects D: Feb 06 02:14:12 Can I run a JUnit test without a test suite? Feb 06 02:14:23 hello! Feb 06 02:14:26 Can anyone help me? Feb 06 02:14:30 no Feb 06 02:14:33 maybe Feb 06 02:14:33 darn Feb 06 02:14:53 It seems like the appbar is much bigger headache than it should be :/ Feb 06 02:15:42 I'm trying to developer with a min api version of 16. I added a android.support.v7.widget.Toolbar inside an AppBarLayout in my activity, but the app bar is displaying below the listview that comes after it Feb 06 02:16:41 show your xml file Feb 06 02:17:31 https://gist.github.com/walkerneo/7feeb8e921d13a17a8ea Feb 06 02:19:16 Replace the RelativeLayout with a CoordinatorLayout Feb 06 02:20:44 what does that change? Feb 06 02:21:01 The outer layout :p Feb 06 02:21:16 Different layouts align their views differently Feb 06 02:21:51 CoordinatorLayout just throws one on top of each other which is what you want Feb 06 02:24:10 yay my preferences work.. the only thing I don't know is whether I did it the smartest way ... but it works >_> Feb 06 02:25:16 danijoo, cool thanks. Coordinator view was showing the listview behind the actionbar, which looked really weird, but a linearlayout worked. Do you know how I can change the actionbar title color now? I want the bar dark, but the text is dark too :< Feb 06 02:26:53 uhm there should be a way to apply additional styles Feb 06 02:27:17 but I am a newbie and read so much on android development within the last week that I cannot remember the details Feb 06 02:27:37 basically you just pick the right pre-defined elements in your style and add it somehow .. Feb 06 02:28:00 haha, we're in a similar boat then. Yeah I set the titleTextColor and subtitleTextColor, but neither had an effect Feb 06 02:28:13 how do i do adb push to a arc chrome app? i already did plugin.shell('adbd') in the JavaScript console, but then when i go to my terminal to check adb devices, i get no devices there? Feb 06 02:28:18 http://stackoverflow.com/questions/5861661/actionbar-text-color this Feb 06 02:28:41 @ monroe Feb 06 02:29:32 actually might be the second answer, too - I have not tried it myself Feb 06 02:29:41 but it looks very much like what I have been reading through Feb 06 02:30:26 Aoi, that looks about right, but I don't really get what's going on there. Does specifying ".ActionBarStyle" on a style he's using as a theme automatically make it applied to the action bar or is it implied you'd reference that somehow? Feb 06 02:31:00 And why did he choose the parent themes that he did? Are the ones he chose specific and the only correct ones or what were the options? Feb 06 02:31:08 I think one would need to include the Style somewhere (if you did use some other style than the default one) Feb 06 02:31:23 I think those are derived uhm.. sources .. something Feb 06 02:31:39 like .. you are basing yours on an existing attribute Feb 06 02:31:48 monroe, the ones in the link are horribly outdated Feb 06 02:32:05 you should use Theme.AppCompat as parent Feb 06 02:32:20 or anything that derives from it Feb 06 02:32:46 Ah - yeah - if you look at your original styles.xml, monroe, you should find some basic style definitions there Feb 06 02:32:53 danijoo, gotcha, but why? If he's just defining the attribute that changes the color, what does the parent bring in? Feb 06 02:32:54 there it also uses Theme.AppCompat. Feb 06 02:33:22 monroe, you apply that style to your app and it will pick all attributes from that style. Feb 06 02:33:37 every value YOU havent set by defining it will be taken from parent Feb 06 02:33:59 ah *also learns :o* thanks for explaining, danijoo! Feb 06 02:34:10 in this case the parent is a Holo themes, which will make your app look like its from 1900 :p Feb 06 02:34:27 while AppCompat is the newest theme (material design) Feb 06 02:34:35 there were no apps in 1900 D: Feb 06 02:35:33 for comparision: http://www.tabtech.de/wp-content/uploads/2014/06/Android-L-vs-Android-KitKat-24.jpg Feb 06 02:35:46 left is material design (appcompat), right is holo Feb 06 02:36:24 haha yeah, not going for Holo then Feb 06 02:36:33 Would you say one of those answers in the SO link is correct though? Feb 06 02:36:40 apart from the Holo part Feb 06 02:37:02 no idea. i dont change title color Feb 06 02:37:29 but top answer looks like it would work Feb 06 02:37:39 I don't really want to change it either, but for some reason I have both the action bar and the text color dark Feb 06 02:37:53 you might have to remove the android: because you use appcompat Feb 06 02:38:09 instead of android:actionbarStyle Feb 06 02:38:26 monroe, thats because you are inheriting from the wrong parent ;) Feb 06 02:38:44 darn I closed all my windows except for the files ... jeez.. Feb 06 02:39:28 monroe, if your actionbar has a dark color, you should inherit from Theme.AppCompat.Dark. that applies a light title color automatically Feb 06 02:40:21 I have In the toolbar theme or app theme? For the app theme I have