**** BEGIN LOGGING AT Sun May 11 03:00:00 2014 May 11 03:05:35 Napalm use the nav drawer yet in any projects? May 11 03:09:19 g00s: yes, why? May 11 03:09:53 are you familiar with the template that comes with AS ? would you consider that a good way of doing it? seems kinda weird that their impl passes on events back to the activity May 11 03:10:10 that means every activity would then have to implement that, i guess its not so bad May 11 03:11:06 each activity would also have to go and hide all its fragments menus when the drawer was activated May 11 03:11:25 since when its open, those are supposed to be hidden ... May 11 03:11:34 and i wouldn't want the drawer to know about other fragments May 11 03:12:33 i'll keep studying the template May 11 03:12:48 g00s: i'm sorry but i'm not familiar with that template May 11 03:15:32 Napalm how do you handle hiding the action items from other fragments ? May 11 03:15:47 my first inclination, is that once the drawer is opened, it call backs to activity ... May 11 03:15:57 hiding the actionItems? May 11 03:16:08 oh you mean when the drawer is open? May 11 03:16:17 you can just do that in your activity May 11 03:16:27 you dont need to handle any fragments or do anything special May 11 03:16:33 and then it iterates through all the fragments and calls setMenuVisibility(false) May 11 03:16:44 you dont have to May 11 03:16:51 Hi all. I have a simple shader that doesn't compile and doesn't give me any error logs. Have any of you come across something similar and if so, how would you go about debugging something like that? May 11 03:16:52 but i also have no idea how to just 'iterate all teh fragments' May 11 03:16:53 is that what the template does? May 11 03:17:28 Napalm hm, lemme see. but thats the behavior in the apps i tried May 11 03:18:04 g00s: hang on, what are you talking about.. explain to me May 11 03:18:26 Napalm i think i'm confused, i'll keep studying the template May 11 03:19:01 in the template, the placeholder fragments don't have hasOptionsMenu(true) May 11 03:19:19 so only the activity has the options menu, so its really easy for it to hide it May 11 03:19:22 g00s: ok look, step one.. ignore the template. step two. The default behaviour is to hide the action items when the drawer is open. Step three. Simply dont ask the fragments to add their items on invalidation. May 11 03:20:28 Napalm can you explain step 3 May 11 03:20:37 yes May 11 03:22:53 g00s: http://pastebin.com/7GSV4F8w May 11 03:23:15 that should sort you out.. add it to your Activity and change the drawer var.. i guess the method is correct May 11 03:23:18 but you get the idea May 11 03:24:26 g00s: actually a better way.. http://pastebin.com/x8QB3gtC May 11 03:24:55 canurabus: there is a magic flag you set to get more debug info May 11 03:25:23 Napalm what is this 'featureId == Window.FEATURE_OPTIONS_PANEL' ? May 11 03:25:33 its what it says it is May 11 03:25:34 lol May 11 03:25:44 ive never seen that ever May 11 03:25:45 heh May 11 03:25:55 lol, i've been doing it longer i guess May 11 03:26:31 and your first example had onCreatePanelMenu May 11 03:26:39 i was like, wut the hell is thaaat May 11 03:26:50 Napalm cool thanks May 11 03:26:55 g00s: you should read this https://android.googlesource.com/platform/frameworks/base/+/master/policy/src/com/android/internal/policy/impl/PhoneWindow.java May 11 03:27:13 g00s: you should find it enlightening May 11 03:32:42 canurabus: still with us? you want to do this in your terminal: adb shell setprop debug.egl.trace 1 May 11 03:33:38 canurabus: you'll find your drivers with: adb shell ls -l /system/lib/egl/* May 11 03:34:04 ok, this is the key getActivity().invalidateOptionsMenu(); May 11 03:34:27 yes or supportInvalidateOptionsMenu() for the compat actionBar or something... if i remember rigt May 11 03:34:29 right May 11 03:34:34 Hey folks. I'm trying to add NFC support to an app that I didnt write. I see in their manifest that they already have an intent for the "bitcoin:" URI scheme. Is it possible to combine multiple tags, or should each block only contain one? May 11 03:34:55 as in, can I just add the NFC lines to the existing intent, or should I copy the whole block and switch that? May 11 03:35:14 you can have as many action's as you like, but they become interchangable with the other fields May 11 03:35:33 so if you only want the action with different data/host/meta-data then you need a new intent-filter May 11 03:35:50 WACOMalt: ^ May 11 03:36:56 ok thanks. so in this example: http://pastie.org/pastes/9164391/text I only need to add after the first action? May 11 03:37:21 Still very new to this, thanks for the help btw :) May 11 03:39:49 WACOMalt: you want another section with your action in it May 11 03:40:26 oh ok May 11 03:40:30 WACOMalt: wait.. does the NFC contain a url? May 11 03:40:45 a "bitcoin:" URL? May 11 03:40:47 yes May 11 03:40:55 then yes, in the same intent May 11 03:40:58 arg May 11 03:41:00 oh ok May 11 03:41:01 i mean intent-filter May 11 03:41:20 gotcha. so just adding the one line to the existing intent-filter block May 11 03:41:25 yes May 11 03:41:34 Thank you May 11 03:41:51 WACOMalt: it should just then magically work May 11 03:42:20 neato. I'm glad the app already supported the URI, all I had to add was passing that to it in a new way May 11 03:42:43 unrelated... anyone know how to send an email from gmail using a non http hyperlink? May 11 03:43:02 WA May 11 03:43:11 WACOMalt: you mean open the GMail app to send an email? May 11 03:43:56 nope, sorry it's offtopic... but to test the URI in general I simply sent myself an email from gmail, with a hyperlink to an bitcoin: address May 11 03:44:06 it got stripped by gmail, both when checking on web or device app May 11 03:44:23 seems gmail in general doesnt support anything but http or https links May 11 03:44:26 :/ May 11 03:44:56 WACOMalt: create a html file with links in it and send that@? May 11 03:44:57 ? May 11 03:45:24 yeah that works. I'm just surprised and annoyed at gmail about this :P May 11 03:49:22 Napalm http://stackoverflow.com/questions/18135214/hide-actionbar-menuitems-when-navigation-drawer-slides-for-any-amount/18135409#18135409 May 11 03:49:36 the paste you supplied only would handle options menu from that activity May 11 03:49:50 but not from the fragments inside, right ? May 11 03:49:55 this seems so clumsy May 11 03:49:56 no all fragments May 11 03:50:00 Now I just need to successfully build this app with my changes :P May 11 03:50:01 that is clumsy May 11 03:50:06 what do you expect from SO? May 11 03:50:13 or.. would injecting this manifest into an already built APK work? May 11 03:50:18 for testing of course... May 11 03:50:50 g00s: just to re-iterate.. the solution i gave you doesnt hand the onCreateOptionsMenu to the fragment manager. so it never hands it to ANY fragments. May 11 03:51:09 WACOMalt: no, its signed, you have to build again May 11 03:51:17 alas. Ok thanks May 11 03:51:35 the Readme.md says "To build everything from source, simply checkout the source and build using gradle" May 11 03:51:45 gradle? O_o May 11 03:53:41 WACOMalt: read the documention May 11 03:53:41 WACOMalt: http://developer.android.com/sdk/installing/studio-build.html May 11 03:54:11 ok, thanks. May 11 03:54:26 what is Android studio? has adt been renamed? May 11 03:54:51 oh, nope. new set of tools May 11 03:55:18 does it have gradle built in? I just downloaded it separately May 11 03:55:18 its a standalone ide May 11 03:55:26 yeh it has gradle built in May 11 03:55:30 ah ok May 11 03:55:36 good this sounds easier :P May 11 03:55:37 you just need jdk and sdk May 11 03:57:04 sdk being the adt bundle? May 11 03:58:52 no May 11 03:59:37 standalone sdk, i think it is called: use with another ide, or something May 11 04:03:44 does this look right for the JAVA_HOME env variable? C:\Program Files\Java\jdk1.8.0_05 May 11 04:04:02 java 8? aww playin' with fire there May 11 04:04:07 :| May 11 04:04:10 I just got latest May 11 04:04:21 whatevs, we'll see if it goes XD May 11 04:07:07 if thats where your jdk is then yes May 11 04:07:30 im using the same jdk May 11 04:07:34 ok, just didnt know if it needs the /bin at the end or not May 11 04:07:44 i think you need 2 May 11 04:07:56 JAVA HOME, and another in path May 11 04:08:41 yeh i think in the path variable you need bin at the end May 11 04:09:13 home i dont think you need it May 11 04:09:38 well, seems to work May 11 04:11:03 next I have to learn how to submit changes to github projects May 11 04:20:41 Napalm, thanks for the reply. I enabled tracing but it doesn't really help me. I don't get any additional output that'd help me pinpoint where the problem is. May 11 04:28:28 I need a faster emulator... any sugestions? May 11 04:29:40 nothing beats a real device May 11 04:29:54 true... but real device cost $$$ May 11 04:31:08 I have real devices... but I am experimenting with GAE, and there is a local web Java servlet engine... so I think I need an emulator. I may try my other hardware devices anyway May 11 04:34:00 whats gae May 11 04:36:04 Google App Engine. doing end points with android and iPHONE May 11 04:39:45 there has got to be a better emulator than this... May 11 04:40:15 Could not find com.google.android.gms:play-services:3.2.65. What can I do to fix this error? May 11 04:48:20 ah had to have play services and google repository from sdk amanger May 11 04:50:01 yeh! May 11 05:03:57 Ok, lastly... when building this app, which seems to be working, it seems I am getting a separate development app, by a different name, in the build folder. where would I define which app to build? May 11 05:05:17 sorry if that's confusing... basically in the src folder there is main, which is what I want to build, there is also bitsofgold, dev, prodnet, testnet. When I run the invluded maven build, I am getting an apk for bitsofgold, not main. May 11 05:05:43 is anyone doing GAE stuff here? May 11 05:05:46 scratch that. I'm stupid X( May 11 05:06:05 if not, what are people using for backend cloud data stores? May 11 05:06:29 Sorry, I dont use any of that stuff May 11 05:11:59 When an apk is "unaligned" what does that mean? May 11 05:12:43 http://developer.android.com/tools/help/zipalign.html May 11 05:13:20 oh gotcha, I've used that before May 11 05:17:20 When I go to install my apk, it just says "application not installed" May 11 05:17:24 :/ May 11 05:19:04 adb install says "INSTALL PARSE FAILED NO CERTIFICATES" May 11 05:24:40 ah, have to use the debug apk for now I guess May 11 05:33:53 hello all May 11 05:36:52 Is there a way to have Wifi + 4G enabled simultaneously? I don't need the wifi for data, just the 4g but I need to have the WiFi connected to an AP for ad-hoc purposes. May 11 05:37:28 Basically I need to be able to pull GPS coordinates + data from 4g then push some config changes via wifi to the device I'm connected to (ad-hoc) May 11 05:50:36 Can anyone recommend a good OAuth 2 library that works well with Android? May 11 05:51:08 Napalm, still here? I am very very close. I built the app, but the NFC event is not launching the proper action. I think I found the section where the intent gets handled, which currently reads: if (Intent.ACTION_VIEW.equals(action) && intentUri != null && "bitcoin".equals(scheme)) May 11 05:51:45 MikeClassic: http://developer.android.com/google/play-services/auth.html May 11 05:52:13 WACOMalt: so fix it May 11 05:53:30 WACOMalt: if((Intent.ACTION_VIEW.equals(action) || NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)) && intentUri != null && "bitcoin".equals(scheme)) May 11 05:53:33 easy May 11 05:53:34 :P May 11 05:53:37 thepoosh: Thanks, I'll check it out May 11 05:53:53 jeez, you make it LOOK easy XD May 11 05:54:05 MikeClassic: if you search for android oauth you'll find millions of code samples May 11 05:54:10 I found what I needed to put there, just couldnt figure out the syntax. Thanks so much May 11 05:54:49 thepoosh: Fair enough, I thought there was another one out there that worked well with third party OAuth/API servers May 11 05:55:02 hmmmm May 11 05:55:13 I'm new to OAuth... I mean I know the basics of how it works but that's about it May 11 05:55:35 try this May 11 05:55:36 https://github.com/wuman/android-oauth-client May 11 05:55:58 in any case, OAuth is a google library so it goes through it's servers anyway May 11 05:57:34 Hmm thanks thepoosh, I'll look at what you've pointed me to, gives me a starting point... May 11 05:57:41 cool May 11 05:57:46 good luck, and have fun May 11 06:02:29 Man, if this works I'm gonna be so exstatic, my first commit to github! May 11 06:02:38 and I wont be able to thank you enough Napalm May 11 06:10:23 where do I change the package name at? May 11 06:11:17 cprodigy29: what IDE are you using? May 11 06:11:26 IT WORKS May 11 06:11:28 * WACOMalt dances May 11 06:11:29 thepoosh: eclipse May 11 06:11:41 hot damn, time to submit something to github! this is exciting! May 11 06:11:44 WACOMalt: congrays May 11 06:11:47 congats May 11 06:11:52 thanks again man. May 11 06:12:02 I might have figured it out. but awhile from now XD May 11 06:12:06 right click the project > Android > Rename application package name May 11 06:12:09 cprodigy29: ^ May 11 06:13:46 uhoh May 11 06:13:52 Failed to sync branch... May 11 06:14:06 who here knows github? this is a first for me, trying to sync May 11 06:14:30 WACOMalt: I suggest you make a copy of the files you've changed, so you dont delete them by accident May 11 06:14:47 righto May 11 06:15:28 WACOMalt: is this your repo? or someone elses you've added something too May 11 06:15:57 someone else's I've added to May 11 06:16:04 did you fork their repo? May 11 06:16:17 no. I just added it May 11 06:16:21 "Clone in desktop" button May 11 06:16:27 thats your first problem May 11 06:16:33 :/ May 11 06:16:44 you need a GitHub account and you need to fork their repo May 11 06:16:51 then a copy of it will be in your account May 11 06:16:56 oh May 11 06:17:00 I have an account May 11 06:17:04 then you clone that repo to your computer May 11 06:17:07 make your changes May 11 06:17:15 then you commit your changes to YOUR forked repo May 11 06:17:55 once done, you go onto GitHub into your forked repo and create a new Pull Request that compares your forked version to the orignal May 11 06:18:15 thepoosh: what about from the command line? May 11 06:18:15 the author of the original will be notified and will have the chance to pull your changes into their repo May 11 06:18:22 WACOMalt: got it? May 11 06:18:38 ah May 11 06:18:41 I think May 11 06:21:10 cprodigy29: how do you mean? May 11 06:21:28 thepoosh: isn’t there a file to change it? May 11 06:21:45 cprodigy29: all files, and the manifest May 11 06:21:49 just do it from eclipse May 11 06:25:32 oh crap May 11 06:25:36 can I delete a commit? May 11 06:25:43 yes May 11 06:26:06 reset back to a previous commit May 11 06:34:54 Got it. Pull request submitted May 11 06:35:03 Thanks again. Time for me to hit the hay May 11 06:39:52 WACOMalt: your welcome May 11 06:48:40 Hi guys is there a more cleaner way to do Async Task than this http://developer.android.com/reference/android/os/AsyncTask.html May 11 06:49:13 sure, don't use asynctask :) May 11 06:50:05 g00s, what to use than? May 11 06:50:27 pretty much anything, handlerthread, rxjava, intentservice, etc May 11 06:56:34 g00s: what's wrong with AsyncTasks? May 11 06:57:10 they are pretty useful, especially if you use the SERIAL_EXECUTOR May 11 06:57:27 they aren't easily composeable and its not easy to communicate errors from the bg thread May 11 06:57:59 anyone familiar with animating/masking? May 11 07:05:39 Hello I have a interesting problem May 11 07:06:25 What do you do if a player on you leaderboard has a inappropriate avatar :/? May 11 07:06:42 lol May 11 07:07:10 Bit of a kids game soooo feels kinda weird just leaving it.... May 11 07:15:01 Mavrik, Otto is amazing, thanks for that tip May 11 07:26:58 in eclipse: Object cannot be resolved.. is my project missing the JDK all of a sudden? remind me where to fix that? May 11 07:27:28 seems like all the projects are broken now.. after a hard reboot when the mouse was stuck (macbook) May 11 07:43:48 should logins be their own fragment? May 11 07:44:06 like a screen to log into a website May 11 07:58:20 so now Oracle is sewing Google about using java in android ??!?!? May 11 07:59:10 i think you mean 'still' May 11 07:59:30 ok but the court now gave it to Oracle May 11 07:59:50 so now what, we gotta remove java from android ? maybe that'll be a good thing May 11 08:00:09 i don't get oracle... they want to be the god of everything, but they fail in so many basic areas May 11 08:01:11 and I think you mean "suing" May 11 08:01:22 yeh that May 11 08:19:04 What is a recommended wireframing tool for Android apps? I need one that is not complex, BUT has a large variety of icons/widgets/etc.. so that the guy who designs (not a programmer) can easily put his vision into details screens May 11 08:20:42 in other words large variety of UI elements to drag/drop May 11 08:28:28 hello May 11 08:28:40 can anybody help with http://stackoverflow.com/questions/23580027/fetching-data-from-fragements-android May 11 08:29:21 My activity wants to fetch data from child fragments May 11 08:31:31 emotionull: either use public methods, or save the data in the activity May 11 08:32:19 The thing is the fragments r loaded into the view pager via Adapter May 11 08:33:06 thepoosh: so how do I get the instance from the adapter May 11 08:33:40 adapter.getItem(int position) May 11 08:34:46 put will it not return a new instance?? May 11 08:34:55 no no May 11 08:35:02 it will return the object from the adapter May 11 08:35:03 *but May 11 08:35:12 ok ok...Let me try May 11 08:35:16 gl May 11 08:35:16 thnx May 11 08:36:14 I want to update listview when a message is received, which I receive in some function at a different thread than UI thread May 11 08:36:30 How do I update the listview from main activity with it? May 11 08:36:42 Omnipotent: post to a Handler in the UI thread May 11 08:36:42 I tried passing main activity to class and then calling UpdateList() function of it May 11 08:36:48 Well, That May 11 08:36:50 a "Handler" May 11 08:37:06 Handler handler = new Handler(Looper.getMainLooper) May 11 08:37:06 If it was C# or C++ I would have had created a callback handle easily May 11 08:37:13 I really don't know what a Handler in java is May 11 08:37:15 Ah ok May 11 08:37:18 doesn't need Looper.getMainLooper... May 11 08:37:27 you can also use Activity.runOnUiThread(Runnable r) May 11 08:37:37 wait, Zharf ... are you the person who is in #music who plays keyboard? May 11 08:37:47 or View.post(Runnable r) May 11 08:37:48 among other things, yes May 11 08:38:01 ah, nice to meet you again May 11 08:38:01 :P May 11 08:38:09 Zharf: if he wants to post to the main thread it does May 11 08:38:30 thepoosh, he can just create the handler in the main thread too May 11 08:38:37 yeah, that too May 11 08:38:47 thepoosh, thanks, I knew about runOnUiThread(Runnable) but I wouldn't be able to call a UpdateList function that I've written previously in main activity May 11 08:39:27 you could also send broadcasts to make the activity react to it ;) May 11 08:39:41 Zharf: not if he's changing the adapter May 11 08:39:44 i mean May 11 08:39:46 yes May 11 08:39:51 but it's a bit complex May 11 08:40:17 I am simply inserting values in database and the UpdateList function from mainactivity queries the DB and gets it in List which I put in ListView May 11 08:40:19 's adapter May 11 08:40:29 Knowing that, which method is best suited? May 11 08:40:32 The first? May 11 08:40:34 Handler? May 11 08:41:39 if you're changing the adapter content, you need to do it and call notifyDatasetChanged on the UI thread May 11 08:41:39 What could be the cause of an ImageButton having an OnClickListener but it not being called when the button is pressed? May 11 08:41:41 eh, this, http://ideone.com/HprIT4 May 11 08:41:51 I like to use a broadcast so that I don't need a reference to the activity in the thread, any of the methods work May 11 08:41:55 autrilla: does it have child views? May 11 08:42:03 thepoosh, nope May 11 08:42:07 hmmm May 11 08:42:21 The onClick() method isn't being called May 11 08:42:31 are you sure you set it? May 11 08:42:33 thepoosh, do you mind elaborating what Lopper.getMainLooper does May 11 08:42:41 is there an onTouch? May 11 08:42:43 and how exactly to use the handler? May 11 08:42:55 a Handler is a way to post runnables May 11 08:43:08 thepoosh, yes, I do set it May 11 08:43:09 hmm May 11 08:43:13 it gets a pointer to a looper (thread scheduler) May 11 08:43:21 Looper.getMainLooper May 11 08:43:24 Gotcha May 11 08:43:27 addAisle.setOnClickListener(new View.OnClickListener() { ... } May 11 08:43:30 returns the looper for the main thread May 11 08:43:40 autrilla: do you have onTouchListeners? May 11 08:43:45 which is the UI thread right? May 11 08:43:53 yes May 11 08:43:59 I like handler and looper, I'm sad that they're not in java :E May 11 08:44:05 so I'd pretty much just handler.post(); May 11 08:44:05 thepoosh, nope. Maybe the element is not big enough? May 11 08:44:07 thepoosh: hey May 11 08:44:07 thats it? May 11 08:44:13 It's 24x24dp I think May 11 08:44:23 that is small May 11 08:44:26 it returns new object May 11 08:44:34 wut? May 11 08:44:41 yup...new instance i mean May 11 08:44:49 emotionull: the adapter.getItem? May 11 08:44:52 app crashed..null pointer exception May 11 08:44:54 yup May 11 08:44:58 autrilla, you should have your clickable items around 48dp x 48dp May 11 08:45:02 that means your implementation is bad May 11 08:45:04 otherwise it's hard to click them May 11 08:45:10 ^^ May 11 08:45:12 thepoosh, sorry to bug again, but I don't quite understand, how I could call my UpdateList() that way. May 11 08:45:21 or rather, how a Runnable would help me May 11 08:45:26 from within the runnable May 11 08:45:29 gotta go May 11 08:45:32 bbl May 11 08:45:40 ok May 11 08:45:44 Ah no, it's bigger May 11 08:45:45 you post a runnable and the runnable can call the updateList() and it's then run on UI thread May 11 08:45:47 lets see now May 11 08:46:10 Gotcha May 11 08:46:17 Zharf, thanks a lot May 11 08:46:20 thepoosh, to you too! May 11 08:46:46 Zharf, And why should I use Handler instead of activity.runOnUiThread? May 11 08:46:49 any particular reason? May 11 08:47:10 Omnipotent, sometimes (often) you don't have a reference to an activity or a view May 11 08:47:16 Aha May 11 08:47:26 they do the same things though May 11 08:47:46 ok, currently I have the reference. May 11 08:47:54 so I'd use the quicker method :P May 11 08:48:18 just make sure you clear that reference when the activity is dead May 11 08:49:30 Its the main activity. May 11 08:49:39 Its not supposed to be dead :P May 11 08:54:10 help May 11 08:54:12 http://stackoverflow.com/questions/23580027/fetching-data-from-fragements-android May 11 09:00:13 Curious why android still has no DHCPv6 Client? May 11 09:16:44 Omnipotent, threads can easily stay alive outside of the normal lifecycle May 11 09:17:01 and holding references to activities can cause leaks if they're not handled properly May 11 09:17:22 if i hold refs to activities I generally like to use WeakRef's May 11 09:18:11 ah May 11 09:22:10 hi guys, I'm a newbie, I've downloaded ADT bundle, sdk, created a simple application with main activity and launched, but, everytime I invoke findViewById() it returns null.. I can't get why.. here it is a short snippet: http://pastebin.com/n5wyuHkq May 11 09:22:34 without reading your code, you're doing nthe findViewById in the activity, not the fragment May 11 09:23:06 bankai_au: lol, yes May 11 09:23:10 is it so common? :D May 11 09:23:14 very May 11 09:24:27 i was following a tutorial, maybe it is an old one, there isn't the fragment part in that example May 11 09:25:52 yeah it's old May 11 09:26:10 the new default project has been out for a while - drawer and fragments May 11 09:27:01 can you suggest me a good one to start? Because I tried to put the same code in fragment (using: getView().findViewById()) but I still have errors May 11 09:28:08 your fragment inflates a layout, do you have the textview R.id.textview1 in that layout ? May 11 09:28:37 bankai_au: yes May 11 09:29:00 show us your code May 11 09:30:01 it would be the classical hello world: http://pastebin.com/3cz2Dvpd May 11 09:30:28 anyone help me with sqlite May 11 09:30:42 http://dpaste.com/0238ZY0/ May 11 09:30:55 fragment_main.xml: http://pastebin.com/K7adprf1 May 11 09:33:55 WhatElse: that's probably failing coz the view hasn't been set, try moving it to onStart or rootView.findViewById May 11 09:34:56 bankai_au: ok, with rootView it is ok :) May 11 09:35:00 thank you May 11 09:36:01 hi, is there any encryption library for data transmission client-server that is not ssl/https (i'm deploying an api on shared hosting) -- it does not have to be invincible, just a simple encryption/decryption? May 11 09:38:26 I made an AsyncTaskLoader that uses OrmLite to load the database, how should I implement it to a listview? May 11 09:47:37 Does anyone here use OrmLite? May 11 09:55:56 do only tablets benefit from fragments? May 11 09:56:19 everything benefits from fragments :) May 11 09:56:19 edit: are fragments only useful for a multi-pane activity layout? May 11 09:57:15 no May 11 09:58:06 trying to wrap my head around them May 11 10:05:19 What does notifyDatasetChanged do? For example, if I give my BaseAdapter the List via loader.loadInBackground().get(0).getAisles(), will it rerun that code? May 11 10:10:18 autrilla: it reloads all views of the adapter May 11 10:10:39 (calls getView() for each visivle position again) May 11 10:11:08 danijoo, then it won't rerun the code... May 11 10:11:35 ? May 11 10:13:47 danijoo, never mind, it doesn't really need to be asynchronous May 11 10:18:51 I guess this is why my Hashmap isn't being persisted, it's toString() returns {com.autrilla.shoppinglist.data.Category@42a114f8=[]}, so it provides no data for the key, even though it's serializable May 11 10:22:22 Any who's used OrmLite? I need to store a Hasmap> in the database May 11 10:22:46 im using it. May 11 10:23:12 danijoo, according to some answers on stackoverflow, I just need to set the data type to serializable May 11 10:23:19 But that doesn't seem to work May 11 10:23:45 I would go with custom objects May 11 10:23:57 Product object, which has a category variable etc May 11 10:24:06 never used it in another way May 11 10:24:14 danijoo, Category and Product are custom objects May 11 10:24:48 and whats the problem then? May 11 10:25:54 danijoo, I run helper.getShoppingListDao().update(mShoppingList);, where mShoppingList has the Hashmap, but then when I try to recover the Categories it doesn't return any May 11 10:37:28 hello May 11 10:45:32 how does the ViewPager get the previously created instance of fragment from getItem? May 11 10:46:24 I mean...although the fragment new instance is passed from getItem, still all the view's state is unaltered May 11 10:49:06 getItem is only called when the fragment neds to be recreated May 11 11:01:18 danijoo, I put it in stackoverflow so it's clearer http://stackoverflow.com/questions/23591551 May 11 11:05:12 I dont know May 11 11:05:54 but it may has something to do with Project is a foreign filed May 11 11:05:56 field May 11 11:14:20 danijoo: nope..I had put a log statement in my adapter's getItem..and it is called everytime May 11 11:14:31 whenever i swipe May 11 11:15:30 plz help! May 11 11:15:35 danijoo, if I run If I run mShoppingList.getMap().put(new Category("Congelados"), new ArrayList()); just before creating the Adapter, it does show. May 11 11:15:59 emotionull: why is fragment recreateion a problem for ou? May 11 11:16:34 danijoo, I must be doing something wrong with the adapter May 11 11:16:51 maybe May 11 11:17:01 the thing my activity wants to fetch data (on a certain event) from the fragment even if the frag is currently no visible May 11 11:17:09 i.e its view is destroyed May 11 11:17:23 emotionull: that sounds like bad design.. May 11 11:17:28 so I tried to get the instance of the fragment by calling getItem() May 11 11:17:36 hmm... noob May 11 11:17:39 here May 11 11:17:49 started learning android 2 months back May 11 11:17:53 okay there is the problem May 11 11:18:02 getItem() isnt meant to be called by you May 11 11:18:15 the system calls it to create a new fragment on swipe if neccessary May 11 11:18:32 you need to get that already created fragment, not create a new one by calling getItem() May 11 11:18:39 no no...I m not calling it always...just on a event May 11 11:18:57 is anyone going any google app engine here? May 11 11:19:00 how to get the already created fragment May 11 11:19:17 the adapter doesnt provide May 11 11:19:26 any method other than getItem May 11 11:19:49 FragmentManager:findFragmentByTag or findFragmentById May 11 11:19:52 IrishGringo: I had tried few May 11 11:20:13 in php, python and java May 11 11:20:26 danijoo: ok...Let me try May 11 11:20:50 emotionull: I am just trying to work with java end points and Android Studio... May 11 11:21:22 Google has the worst docs, .... I read and experiment with it, only to find that they depricated it May 11 11:21:53 yeah...I knw many of their docs r from stone age...really May 11 11:22:01 I 2 had 2 struggle at times May 11 11:23:47 and they barely mention that their docs are ols... are you using Android Studio? May 11 11:30:28 danijoo: here is the code of the Adapter..http://pastebin.com/QxLcUkmm how do I get the FragmentManager May 11 11:30:30 ? May 11 11:43:02 emotionull: in your activity getFrragmentManager() May 11 11:43:47 ok..and how do I set the tag? Coz in the Adapter I cant do it right? May 11 11:44:37 if i remember right, the pager adapter should do that. but i cant remember the default tags it used May 11 11:44:45 also ou shouldnt use statePagerAdapter May 11 11:44:53 use the normal FragmentPagerAdapter May 11 11:45:14 but then it wont even call saveInstanceState May 11 11:45:50 and all the view data will be lost May 11 11:47:02 have to go. maybe another one can help May 11 11:48:19 kk...thnx 4 help! May 11 12:09:32 is it possible to get text based apps for android? May 11 12:09:51 like irssi for android running in terminal? May 11 12:10:09 no, all apps must use only icons - Android has no facility to display text May 11 12:10:34 lol May 11 12:10:42 hi leeds long time no see! May 11 12:10:58 yeah... May 11 12:11:12 but with terminal emulator you can display text! May 11 12:11:29 and with busybox you can get some tools i think May 11 12:12:09 no, no, you're imagining that May 11 12:12:37 what :| May 11 12:13:02 lol May 11 12:13:03 no text on Android May 11 12:13:12 just icons and emoji May 11 12:13:47 I WANT! TEXT!! May 11 12:14:11 THIS! IS! ANDROID! May 11 12:14:22 but than it would be more efficient to have a keyboard instead of a touchscreen! May 11 12:16:45 there are no keyboards May 11 12:19:52 and what is your favourite irc client for android May 11 12:20:44 N/A May 11 12:20:53 also, this is -dev - are you planning to write some text-only apps? May 11 12:21:56 Hi Leeds May 11 12:22:21 no May 11 12:23:03 What's the best way to save information that is processed by a single activity that is destroyed but may be opened later by the main activity (in which case you'd need to reload the information back into the activity that was destroyed, and you can't use the OnSavedInstance bundle in that case) May 11 12:23:17 Leeds this question is directed towards you, though others may participate if they please. May 11 12:23:32 sharedpreference is more than enough if data is not sensible May 11 12:23:42 BaconPancake: is there a particular reason you'd direct that to me? May 11 12:24:01 Leeds, you seem knowledgable, smart, willing to help and most importantly active May 11 12:24:10 ah... I should remedy that May 11 12:24:18 why? May 11 12:25:10 because I don't like it when people assume they should direct questions at me May 11 12:25:40 I am sorry May 11 12:25:47 but others may participate if they please. May 11 12:25:49 Anyway, what's done is done. May 11 12:26:21 people usually don't like feeling obligated to try to answer questions on irc May 11 12:26:24 so nice of you to give other people permission to answer your question... May 11 12:26:32 lol May 11 12:26:40 which was already given, but he did not notice May 11 12:26:54 When I'm using AsyncTask with listener like this http://pastebin.com/SY6t4Rsa May 11 12:26:54 How do I pass Context into int? There is only listener now in the constructor. May 11 12:27:03 *into it May 11 12:27:18 sharedpreference? May 11 12:27:22 bpe, thanks. May 11 12:27:24 indeed May 11 12:27:34 you gain one bonus star in my notebook of good deeds. May 11 12:28:20 creitve: Keep a week ref to the activity in the asyntask May 11 12:28:34 creitve: and initiate it via constructor May 11 12:28:47 *weak May 11 12:29:48 bpe, what if the information is sensitive and should be tied to the activity that processed it? May 11 12:32:28 emotionull: thanks, but I think I'm too new to the language. May 11 12:32:35 :-) May 11 12:33:30 if information is easily upset, you probably shouldn't be practicing consensual dominance games with it May 11 12:33:58 Leeds, I am experimenting with the structure of android applications May 11 12:34:30 what if I add a transaction and not commit it? May 11 12:34:35 any memory leak?? May 11 12:34:49 *add a fragment to transaction May 11 12:47:37 if any1 could help with this http://stackoverflow.com/questions/23580027/fetching-data-from-fragements-android May 11 12:57:12 so I have this long-running process going on, MU calibration for an instrument. So the button is pressed and then the device starts to listen, and keeps listening until something happens, and then does things to what it heard and then another listener fires up May 11 12:57:21 inside a thread, this is freezing my UI May 11 12:57:37 What's MU calibration? May 11 12:57:48 its something you do to get the guitar ready for tuning May 11 12:58:15 Sicp, you need to use a service or a broadcast receiver May 11 12:58:15 you measure deadzone and stuff like that, its something audio and takes some time to complete, meanwhile I don't want my app to freeze of course May 11 12:58:17 to listen to the music May 11 12:58:28 the activity itself should not be in charge of listening May 11 12:58:28 why a service? it's just for one activity May 11 12:58:32 service makes no sense May 11 12:58:41 the activity is in charge of updating your UI May 11 12:58:46 so if you tell it to listen May 11 12:58:52 naturally your UI will freeze May 11 12:59:10 well you see, if you want to know more, this calibration happens at the press of a button in the list that's being fed by an adapter May 11 12:59:17 so all the code Im talking about is inside the adapter now May 11 12:59:20 solve THAT! May 11 12:59:36 pay me 5000$ May 11 12:59:40 loll May 11 12:59:46 I'll be kind and ask for only half in advance May 11 12:59:50 anyway I think I'm gonna async May 11 12:59:57 it should work May 11 13:00:46 Hello. I'm having a hard time chosing an emulator target and skin. Mainly this is because it takes so long to load, but I was wondering if somewhere there is a comparations between them? May 11 13:03:09 just get Genymotion May 11 13:03:21 no need to wait and speculate about different emulators, just run and see result May 11 13:04:30 So genymotion is the best emulator out there? May 11 13:04:40 BaconPancake, at least speed wise May 11 13:05:31 best May 11 13:05:38 bestest. May 11 13:05:42 that's how good they are May 11 13:06:04 You are all ignored May 11 13:06:58 haha May 11 13:07:09 hatas gonna hate! May 11 13:08:20 לןגגןמע May 11 13:08:25 kidding May 11 13:09:29 israeli kidding May 11 13:09:31 lol May 11 13:09:34 nah May 11 13:09:39 probably russian font May 11 13:09:41 I can't really know May 11 13:09:46 this client can't decode it May 11 13:09:56 looks israeli May 11 13:10:10 I know russian font, I play Dota May 11 13:10:13 that ain't russian May 11 13:10:34 what does it look like May 11 13:10:37 print screen May 11 13:10:41 all I see is jibberish that is non hebrew May 11 13:11:54 it's gibberish to google translate, but it's hebrew writing May 11 13:12:51 Здравствуйте May 11 13:12:55 that's russian May 11 13:13:04 like the English alphabet, but mangled May 11 13:14:17 cyrillic is derived from greek alphabet mostly, iirc May 11 13:14:46 ע May 11 13:15:04 that one looks like the Arabic equivalent of "no" May 11 13:15:27 negation operator May 11 13:15:27 lol May 11 13:15:43 y u no understand, google translate? May 11 13:15:43 if you add it to anything, it becomes "not" that something May 11 13:16:10 what am I doing...why didn't I just become a carpenter May 11 13:18:00 splinters May 11 13:18:21 here there are bugs May 11 13:18:22 same May 11 13:19:34 can someone help me get android studio 0.5.8 back to work again? it suddenly stopped rendering my layouts May 11 13:19:42 claims there's no sdk installed... May 11 13:20:40 thnk Sicp May 11 13:20:42 Chais go to File -> Project Structure, and make sure that info is correct May 11 13:21:40 yup. android plugin is missing. don't know if it should be there May 11 13:22:21 do you see 'android sdk location' ? May 11 13:22:23 also it stopped working _while_ I was working withi t May 11 13:22:25 yup May 11 13:22:34 hm, i'd just restart May 11 13:22:42 if you didn't try that :) May 11 13:22:45 now it renders again. might have been an issue with a View? May 11 13:23:07 all in all AS doesn't seem very robust to me May 11 13:24:17 it isnt May 11 13:25:14 ADT isn't either. it's better, though May 11 13:25:49 but it would be nice if AS wouldn't fall apart as soon as you give it a strange look... May 11 13:26:02 s/ / / May 11 13:30:26 anyone know why the AS template for navigation drawer does 'drawerToggle.syncState(); May 11 13:30:36 posted as a runnable ? not explained very well May 11 13:30:45 some race condition, etc May 11 13:35:16 "// Defer code dependent on restoration of previous instance state." May 11 13:35:19 O.o ????? May 11 13:35:31 hahah May 11 13:35:56 it's funny because I don't understand it May 11 13:38:04 How do you test a your sqliteopenhelper class in a instrumentationtestcase? May 11 13:39:36 it says cannot open database.. May 11 13:43:01 I used gettargetcontext instead of getcontext and it worked May 11 13:55:06 what is the differences between View.offsetLeftAndRight and View.setTranslationX ? May 11 13:57:56 I spent weeks trying to understand the layout mechanisms, still I can wrap my head around the different translations... May 11 14:05:45 left and right are set by the viewgroup with View#layout .. offsetLeftAndRight just changes those values and forces a redraw May 11 14:06:00 This also means that next time the viewgroup calls layout, your offset is lost May 11 14:06:15 translationX is separate from that May 11 14:09:17 hmm, seems AS template has ic_drawer for one theme May 11 14:10:30 SimonVT: thank you ! May 11 14:11:10 maybe someday i'll know this stuff as well as SimonVT :) May 11 14:11:17 (not likely) May 11 14:12:22 i want to animate a ranked list. a user can click on a list entry and then the entry should move up in the list (i.e. from 7th to 2nd position). is there maybe a simple way to do this? May 11 14:12:40 i'm writing a custom ViewGroup with views that can be dragged arround, so to avoid invalidating the layout, i should use setTranslationX/Y on the children, right ? May 11 14:13:01 guys, do we know if there are reserved requestCode numbers in Android and if so, where can I find those? May 11 14:13:03 fancy42, move the entry in the adapters list and notify of change? May 11 14:13:33 darken, would that trigger an animation? May 11 14:13:38 Yeah, just use translation May 11 14:13:57 i want to see the entry "fly up" and the other entries making space for it May 11 14:14:05 (or something similar) May 11 14:14:14 fancy42, i see, I'm not sure then May 11 14:14:15 but the user should be able to see where the item moves May 11 14:14:48 fancy42: https://www.youtube.com/results?search_query=devbytes+listview+animations May 11 14:14:48 fancy42 there is a devbytes video on reordering listview things with animations May 11 14:14:54 Watch those, should give you an idea on how to do this May 11 14:15:12 i argue that stuff should be baked into a gui framework in 2014 but May 11 14:15:15 * g00s sighs May 11 14:16:35 I also made a small class that does this automatically (on API18+): https://github.com/SimonVT/adapterviewanimator May 11 14:16:45 SimonVT, g00s thanks, i'm checking the channel out now :) May 11 14:17:02 SimonVT, so this doesn't work i on api13? May 11 14:17:24 *api 9 May 11 14:17:46 Is this going to be a new app ? May 11 14:17:48 No May 11 14:17:51 if so scrap sup 4.0 May 11 14:17:57 *sub May 11 14:18:14 The animation framework sucks on pre-ICS(/JB) May 11 14:18:38 Consider if it's worth the development time to have animations on those platforms May 11 14:19:00 I had a requirement that didn't make it possible to make that library before api18 May 11 14:19:11 At least not as a drop-in animation library May 11 14:19:47 What exactly prevented you from doing so? May 11 14:19:52 As in, what was the requirement May 11 14:20:28 How can I set the witdh of a View to wrap_content programatically May 11 14:20:33 I wanted to animate items removing at the same time as items being added May 11 14:21:12 It's easy to animate an item disappearing, changing the dataset, moving items to new position May 11 14:21:37 But then I'd have to compare the old and new dataset May 11 14:21:44 And what was added on API 18 that made it possible? May 11 14:21:49 To whoever is doing the list thing, there's a nice video on DevBytes May 11 14:22:18 ViewGroupOverlay May 11 14:23:16 Before changing the dataset I fill the views into a map with their id as a key. After changing the dataset, I wait until right before drawing.. Compare the old set of id's to the new May 11 14:23:24 Anyone that still exists I start moving May 11 14:23:41 Anyone that doesn't exist I copy into a bitmap and draw it on the viewgroupoverlay May 11 14:23:57 I've joined in the middle of the conversation, what do you want to do exactly? May 11 14:24:16 duh, using setTranslation in OnGestureListener.onScroll, mess up the internals of GestureDetector : i get oscilating readings May 11 14:24:59 The issue is view reusing. The view for an item that disappears could have been reused for a new item. But because I copy the view into a bitmap BEFORE the data for the new view is drawn, I can still animate them away May 11 14:25:00 Is it normal that the Spinner indicator is so long? http://gyazo.com/6c000e3ec8374a313d992c2beb2d29b2 May 11 14:25:53 SimonVT any chance do you know - seems night mode depends on car mode. i would like to use -night -day resource qualifiers, but there seems no legit way since UIModeManager checks that (car mode is on when setting night mode). Napalm found a hack, is that just the way it is ? May 11 14:26:04 Now, I could substitute ViewGroupOverlay with a custom viewgroup that wraps the adapter view May 11 14:26:21 But then the API wouldn't be as simple as just adding two lines May 11 14:26:36 And I wanted the simple API May 11 14:26:44 i guess I have to work with the touch events of the parent (to get translation independant coordinates) ? May 11 14:33:30 kakazza: Basically, if you used the approaches discussed in various devbytes animating dataset changes would require comparing your entire dataset and do the animations in two steps. This started as a proof-of-concept that it was possible to do without any knowledge of the dataset (just need an adapterview and an adapter with stable id's). May 11 14:33:35 It just turned out to be useful :) May 11 14:35:00 At least for 17% of all users ;) May 11 14:35:05 I'll have a look May 11 14:36:18 hi May 11 14:36:27 Trade-off between ugly api and compatibility and awesome api and limited platforms :p May 11 14:36:28 i got a noob question, i got adt bundle with eclipse, i started a new app, then i added a button to the 'graphical layout' (drag/drop) and a textfield '@+id/TheText' - i added in fragment_main.xml to the button 'android:id="@+id/button1"' this 'android:onClick="doSomething"' and in MainActivity.java: public void doSomething(View view) { ... } now i want to change the text of TheText on button press May 11 14:36:39 i put ... TheText.setText("foo"); but that doesn't seem to work 'TheText can not be resolved or is not a field' May 11 14:39:55 Hi guys, can you please suggest any Async RSS library that is easy to use. May 11 14:40:48 what is an Aync RSS library? May 11 14:40:53 *Async May 11 14:41:14 you can probably find xmlpull implementations of rss reader easily May 11 14:41:15 loading rss feed asynchronously May 11 14:41:28 but as far as putting in a db, probably up to you May 11 14:41:43 you'll just have to put it in IntentService or something May 11 14:41:44 g00s, its for displaying only May 11 14:43:17 g00s, thanks, now i know it cant be better than what I am doing now xD May 11 15:02:12 I'm trying to build this Android app in Eclipse: https://github.com/dreeves/TagTime May 11 15:03:07 I've added ActionBarSherlock as a project and that resolves all the imports that complain about it missing, except that the line in AndroidManifest.xml that reads May 11 15:03:12 android:theme="@style/Theme.Sherlock" May 11 15:03:37 is producing an error "No resource found that matches the given name" May 11 15:04:11 Where will it look for this resource? On the classpath? I think there's a matching resource in ActionBarSherlock, but I don't know how to link the two up May 11 15:21:41 I ahte the way Action bar search works May 11 15:21:49 Why does it takes us to another activity :\ May 11 15:22:00 I would really like if I could get that query back to my main activity May 11 15:38:41 * g00s gets nav drawer in app for first time; thats a fiddly pain in the ass May 11 15:39:45 also, my action items are still not right; when the drawer shows other fragments still have their action in the AB May 11 15:40:34 g00s, please suggest a way to search, such that I can get the result/query back to the main activity May 11 15:40:39 because thats where my ListView is May 11 15:40:52 Omnipotent i have no idea; i never added that to my app :| May 11 15:41:02 i guess i'm lame, should have search May 11 15:41:14 ? May 11 15:41:25 I am sorry for whatever I did. May 11 15:41:29 heh May 11 15:41:58 Omnipotent there is still time to repent ! May 11 15:42:30 g00s, Sadly, you have to create another activity to get the Search Query in... mostly people (in the examples that I've searched so far) create a new ListActivity to show the result May 11 15:42:53 I was thinking if there is some way to get the Query in my main activity, so that I can modify the ListView there May 11 15:50:02 I can use intent.getData().getPath() to get a file URL from an intent. But how do I check if the Intent actually has this information before I access it, something like "if (intent.hasExtra(KEY_DATABASE_ID)))? May 11 15:56:04 Is it normal that the Spinner indicator is so long? http://gyazo.com/6c000e3ec8374a313d992c2beb2d29b2 May 11 16:06:35 I have it set to wrap_content, I wonder if it stretches so that it can fit any item May 11 16:06:52 It seems it's doing that, can't I have it only take up the space of the currently selected item? May 11 16:13:22 autrilla The link above doesn't work unless you have an account there I think. May 11 16:13:46 qkzoo1978, oh. And this? er.com) has joined May 11 16:13:46 I can use intent.getData().getPath() to get a file URL from an int May 11 16:13:51 Ah, no! May 11 16:14:07 qkzoo1978, how about this one? http://i.gyazo.com/6c000e3ec8374a313d992c2beb2d29b2.png May 11 16:14:32 The Ikea pic? May 11 16:14:54 Oh, nm I see. I was confused. May 11 16:15:10 That may be the minimum height, what does you XML look like? May 11 16:15:19 minimum width I mean. May 11 16:15:25 qkzoo1978, I don't have an XML, it's added programatically May 11 16:15:28 width you mean :) May 11 16:15:58 I'll try setting min width to 0 May 11 16:15:59 How long is the childrens text, could it be resizing to fit them? May 11 16:16:46 qkzoo1978, http://i.gyazo.com/a48ef76d77ebb82c121b035e752d9ab4.png May 11 16:17:09 I think it's doing that May 11 16:17:14 But I don't want it to do that May 11 16:17:35 You might have to give it a fixed width then. May 11 16:17:50 qkzoo1978, then there will be problems when the item selected is longer May 11 16:18:57 Well, I'm definately not an expert here, I'm just here for help, too :) It may be just the way it is? I'm guessing you want the top item big, but the items to stretch? May 11 16:19:13 err top item to fit IKEA May 11 16:19:28 qkzoo1978, exactly May 11 16:20:04 Hmm, for that you may have to implement your own list adapter and override everything with your own layouts, I'm not entirely sure if that's even possible. May 11 16:20:33 Do you have an example of another app doing that? May 11 16:20:53 qkzoo1978, Play Music does it May 11 16:21:08 But I think they're using their own view May 11 16:21:36 Ya, I think you may have to as well. May 11 16:22:01 There might be an easier way, but like I said, I'm still a rookie. May 11 16:23:20 For anyone curious about my question that went unanswered, I figured it out. May 11 16:50:04 Hi, can anybody help with an bug :-) May 11 16:50:24 With a bug ;-) May 11 16:51:27 Grilka, depends on the bug May 11 16:53:02 Thanks autrilla, I'm getting an unexpected token in a class, what is the best way that I can show you the class in question? May 11 16:53:12 Grilka, pastebin May 11 16:53:28 I'll try. May 11 17:00:53 It should be here autrilla, if not I've messed up :-). http://pastebin.com/0vgGLY8P May 11 17:01:30 Grilka, why would you call super() in the middle of nowhere? May 11 17:05:21 I wish I could answer that one, this is a class that I have aquired from a collegue, however when I remove the offending statement the error go from 1 to 599. May 11 17:07:21 e.g it throws everything else out without it. May 11 17:08:11 Grilka, that is because the compiler stops on that line May 11 17:08:18 You should call super() in the constructor May 11 17:09:11 Ok thank autrilla, that is helpfull. May 11 17:23:43 Guys I am trying to handle the config changes while Async task is running. Source: got this from SO - http://www.androiddesignpatterns.com/2013/04/retaining-objects-across-config-changes.html May 11 17:24:16 The problem are many field variable which I use during the process. AsyncTask - http://pastebin.com/8rqmxpNF May 11 17:24:25 Hello, I'm using Android Annotations in my app to deal with SharedPreferences. Currently I am encountering a bug where an EditTextPreference's summary field contains an incorrect value, yet when I click the EditTextPreference, it's value in the popup is correct. Does anyone have any insight to what may be causing this? May 11 17:26:27 If I turn my task into static, I need to make the variables static too. But it locks most of the stuff and the same thing is displayed even after another item is selected and detail fragment is reloaded May 11 17:37:32 I wonder why this channel is so dead on weekends May 11 17:38:23 autrilla: well android programming happens to be done in java, and on weekends people usually do things that make fun May 11 17:39:18 Programming is fun May 11 17:41:47 if you do programming for a living, you might want to do something that is not what you do for a living on your weekends. May 11 17:43:15 autrilla: i know, thats why i especially named java.. but what sonOfRa said.. if you don't do real weekends you'll go crazy May 11 17:43:50 sonOfRa, ah, it's just a hobby for me May 11 17:57:43 Would dragging from a ListView, then a trash can appearing be an intuitive way of deleting items? May 11 17:58:08 Or would you rather have it on "Edit" -> "Delete" May 11 18:01:06 Can anyone tell me what is the .MySercuityData directory in the sdcard? May 11 18:01:09 I want to make an app and I have android 2.2 on my phone. Should I set the target SDK to 4.4? Is having a "Holo Light" theme compatible with 2.2, or should I set not set a theme? May 11 18:02:26 or should I set the target SDK to 2.2 (what i have on my phone)? May 11 18:03:59 wagonboi, set the target to the latest API available May 11 18:04:12 And use AppCompat if you want Holo on old Android versions May 11 18:34:32 where can i find some information about using scaletype matrix? i would like to display part of an image May 11 18:41:08 Hi, I'm trying to use Gson to do some JSON deserialization, and when I do a new TypeToken>(){}.getType() I get this weird dalvik error java.lang.NoClassDefFoundError: com. ... .PositionTypeToken. (PositionTypeToken is a class that extends Gson's TypeToken, since I thought that anonymous classes were the problem.) May 11 18:41:19 Anyone have any ideas what could be causing this? May 11 18:42:00 hey everyone, i'm having a problem conceptually understanding something, maybe someone can give me a hand May 11 18:42:10 Ask... May 11 18:42:26 i currently have a lot of listviews in my application, which are driven by custom adapters May 11 18:42:49 Uh-huh... May 11 18:42:55 these adapters are backed by basic ArrayLists, no SQLite implementation yet May 11 18:43:22 so the only way I propagate changes in those listviews to the UI is by making the changes, then calling notifydatasetchanged() on the adapters May 11 18:43:42 I am trying to learn about android Loaders, and I had initially thought they were a concept used only for SQLite queries May 11 18:43:55 but the more i read the more i'm not sure that's the case May 11 18:44:18 bottom line i'm wondering if there is a way to use a Loader to somehow watch an ArrayList for changes + do the necessary UI updating on its own May 11 18:44:26 without having to call notifydatasetchanged May 11 18:44:31 ArrayLists work only in RAM (duh!) and you don't need to use loaders for them. (Unless thery are huge...) May 11 18:45:50 No, there is no way you can "watch" an ArrayList for changes. You can extend an ArrayList, eg. ObservableArrayList and have it do something whenever you modify it. May 11 18:46:48 Hey, I am trying to deal with handling AsyncTask while config changes. Source: http://www.androiddesignpatterns.com/2013/04/retaining-objects-across-config-changes.html May 11 18:47:00 ok, that's fair and it's what I initially thought. I was getting confused a little bit by the fact that so many of the examples i read involving loaders seem to use arraylists. May 11 18:47:14 But getting Classcast exception at Line 30 of TaskFragment May 11 18:47:18 has anyone ever used the app translation function in the developer console? May 11 18:48:36 WantToCode: do you iimplement TaskCallbacks in your activity? May 11 18:49:04 yes. let me make a pastebin of my fragment May 11 18:49:56 Anyone know of a good way to compare dates and times? May 11 18:51:00 SlashTag: not the best performancewise but I parse everything to unixdate in my programms because its very easy to handle May 11 18:52:02 danijoo: here. http://pastebin.com/CeaxExr7 I have deleted and commented irrelevant code.. May 11 18:52:43 WantToCode: at what point do you get your classcastexception May 11 18:52:58 line 25 May 11 18:53:09 cannot cast activity to callbabck May 11 18:53:34 Then your activity does not implement your callback interface May 11 18:54:24 danijoo: it does `implements WebsiteDetailFragment.TaskCallbacks` May 11 18:55:26 danijoo: stacktrace here http://pastebin.com/CrE7Sh7Y May 11 18:56:08 hm thats strange.. May 11 18:56:17 cant see an error in your code May 11 18:56:26 should work as long as you implement the interface correctly May 11 18:57:30 Is there any other way I can make this work? may be linking the activity some other way? May 11 18:57:52 not really. afaik this is the way suggested by google May 11 18:58:36 welp. stuck in a wierd way. Should I share the activity code? May 11 18:58:43 can you post your activity code? May 11 18:59:25 SlashTag: I use the method from Google I/O 2012 app. Here http://stackoverflow.com/questions/13203018/how-to-create-a-localized-time-ago-string-on-android May 11 18:59:29 danijoo: on it May 11 19:00:40 danijoo: here http://pastebin.com/DxCYUshL May 11 19:01:48 for creating a clock in android, is there a solution that works off of android's internal clock? or should I have to use Thread/Timer? May 11 19:02:04 also, if I use THread/Timer, will my clock ever be out of sync with the android clock if ran for a long time? May 11 19:02:06 tylertylertyler you could look at deskclock app in aosp :) May 11 19:02:31 ooo I've never been on that, let me look May 11 19:03:15 g00s: where can I find source code of play newsstand? couldnt find it. May 11 19:03:38 WantToCode: this really should work. i have no idea.. May 11 19:04:05 danijoo: wow. weird things happen with me! :O May 11 19:04:41 danijoo: any other way or should I go back to onRetainNonConfigurationInstance? May 11 19:05:01 I let androidannotations handle these things for me :D May 11 19:05:15 but the fragmentcallback attaach really should work May 11 19:05:23 and there is no other way to do this nicely May 11 19:14:32 danijoo: I added the code check `instanceof TaskCallbacks`, now it gives exception saying I havent implemented the interface! May 11 19:20:53 The activity from the stack trace and the one you pastebinned are not the same May 11 19:22:26 SimonVT: oh yes yes! thanks! let me see whats going on here! thanks a lot May 11 19:33:46 SimonVT: danijoo I think I have found the idiotic mistake I had made. I am using master detail flow. so the "detail" activity never gets called indeed in two pane mode. Am I right? May 11 19:47:11 Napalm ok, i think i finally understand onCreatePanelMenu now, man talk about the implementation being for more interesting than the documentation leads one to believe May 11 19:47:43 the magic line show |= mFragments.dispatchCreateOptionsMenu(menu, getMenuInflater()); May 11 20:08:16 alert dialog does not shown May 11 20:08:22 public static void showList(final String[] items){ May 11 20:08:22 new AlertDialog.Builder(WebControl.activity) May 11 20:08:22 .setTitle(name) May 11 20:08:22 .setItems(items, new OnClickListener(){ May 11 20:08:22 @Override May 11 20:08:22 public void onClick(DialogInterface arg0, int pos) { May 11 20:08:23 TextView txt = (TextView) v.findViewById(R.id.list_second); May 11 20:08:23 txt.setText(items[pos]); May 11 20:08:24 } May 11 20:08:24 May 11 20:08:25 }) May 11 20:08:25 .setIcon(R.drawable.ic_launcher) May 11 20:08:26 .create().show(); May 11 20:08:26 } May 11 20:08:28 Woah woah May 11 20:08:32 pastebin May 11 20:09:24 whats wrong in my func? May 11 20:09:39 For starters you pasted it all here instead of using pastebin May 11 20:11:17 Then, onClick is not where you should set the view for each item May 11 20:11:52 http://pastebin.com/wYT9wHHf May 11 20:12:11 what is the problem? May 11 20:13:05 I already told you May 11 20:13:22 how to set? May 11 20:13:51 No clue. I doubt using an AlertDialog is the correct approach. May 11 20:14:51 hmm May 11 20:15:02 And you don't need to use create(), show() is enough May 11 20:17:31 good to know May 11 20:32:07 After hammering my head for a couple of hours, I am yet to find a good way to add products to shopping lists, in a way that you can later reuse those products, having a list of items you commonly buy, and therefore allowing you to save time May 11 20:34:17 autrilla: look at the tesco app - if it is available in your market May 11 20:34:31 It simply adds to favourites items you've previously ordered May 11 20:34:37 https://play.google.com/store/apps/details?id=com.tesco.grocery.view ? May 11 20:34:48 Not available in my country :/ May 11 20:34:51 And adds to 'usuals' items you've ordered on the last 2 orders May 11 20:34:57 (or something like that) May 11 20:35:26 SpeedEvil, but I guess you can only have one shopping list there, the app is intended to be used in just one store May 11 20:35:32 If I use a custom actionLayout for a menu item in an ActionBar, how can I give it the style where touching it highlights the background like it would if I just used the icon attribute instead of actionLayout May 11 20:35:33 ah May 11 20:36:27 As it's not an app for my store, but an app for people to use in multiple stores, it is a bit more difficult May 11 21:17:06 In my main Activity, I check if a user is logged in onCreate, and push one of two fragments depending on the result (if logged in => login screen; else another fragment). I also have a settings button, which takes the user to a PreferencesActivity with a logout button. When I user clicks logout, I expect them to be brought back to the login screen, however, since I check for login onCreate,... May 11 21:17:08 ...my main activity doesn't know the user has logged out. Is there a pattern I could follow here that would "refresh" (possibly invalidate?) the main activity in the event of a logout? Hooking into onResume and pushing fragments shouldn't give me the result I want (since it should push a new Fragment everytime: if I leave and come back to the app, I get a new Fragment). May 11 21:32:23 MarkyC: a service (if it has to be detected when the activity isn't in the foreground) or a thread that routinely checks for the logged in status. Optimally being logged out is something you know about because you've got some form of async login already May 11 21:32:48 MarkyC: then just do a callback to the main activity from whatever async monitoring service you have for login state. You may have to do a runonuithread() May 11 21:37:39 :/ they deleted my post on the Android Design community May 11 21:54:40 dragorn: Do you have an example? May 11 21:55:17 not offhand, no; look at runnable and runonuithread May 11 21:56:06 if you're doing a service and it's not its own process (services don't often need to be their own process so this is a safe bet) you can pass callbacks to the service via your binder and just fire them in the service when your login state changes May 11 21:56:35 Similarly for a thread; if it's an inner class thread of your activity you can just call functions in the activity; Beware of changing the ui, hence runonuithread May 11 21:56:38 Hi! I want to add an icon to an EditText, by using the drawableLeft XML-property. But what size should the icon be in? May 11 22:00:06 mEck0: 48x48 May 11 22:00:22 shmooz: thanks, will try! May 11 22:02:28 Do you know if there exist a website with native Android icons? Specifically I would need a user- and a padlock icon May 11 22:03:54 mEck0: just images.google it like 'padlock icon 48x48' May 11 22:04:58 shmooz: ok, I just thought that there existed specific Android-ones. Thanks May 11 22:05:39 mEck0: There's a collection of google actionbar icons. hang on. May 11 22:06:24 mEck0: https://developer.android.com/design/downloads/index.html action bar icon pack May 11 22:07:43 dragorn: oh, nice! May 11 22:08:16 it's a pretty good collection of the icons you're likely to need May 11 22:08:57 I’ve already find a user icon, just the padlock left for the password field May 11 22:43:45 i have a screen with multiple independant spinners and one coded so far, i have: class mySpinnerListener implements Spinner.OnItemSelectedListener { ....}. spinner1.setOnItemSelectedListener(new mySpinnerListener()); May 11 22:44:03 so i can just do spinner2.setOnItemSelectedListener(new mySpinnerListener()); and spinner3.setOnItemSelectedListener(new mySpinnerListener()); and they wont conflict? May 11 22:47:55 it seems to work ok May 11 22:48:54 they both use the same adapter and list too May 11 23:26:26 I keep running into an issue with the wifi on my HTC Inspire (Desire) 4G. If I turn the screen off my wifi goes very slow. No matter what settings I change or how i control the CPU frequency. Seems have have no effect at all. I am streaming some music from my home server and I get my full speed (100KB/sec) with screen on and drops to about 15KB/sec with screen off May 11 23:40:05 fk_007 please see topic; that doesn't have anything to do with programming ;) May 11 23:40:51 right sry bout that May 12 00:39:41 anyone here used Parceler before? Looks pretty good: https://github.com/johncarl81/parceler May 12 00:54:24 hi all May 12 02:28:50 RxJava combineLatest is a great way to merge events from different places May 12 02:39:19 i think you're on commission May 12 02:39:56 * g00s can't sell anything for his life ;) May 12 02:45:39 did you get all your service integration stuff playing happy with RX? May 12 02:46:01 yes May 12 02:46:19 hi May 12 02:46:40 my todo-list is growing bigger and bigger by the day and i never seem to be making any progress :( May 12 02:47:08 bankai_au : .skip(10).take(1) :) May 12 02:47:35 :P May 12 02:48:31 ugh, putting a lot of effort into the nav drawer thing - not sure its worth it May 12 02:49:19 were you trying to do a spinner or something in there? May 12 02:49:49 hm maybe - the apis just feel really clunky May 12 02:50:14 the drawer is a bit of a bolt on, but i like it May 12 02:50:21 i used a trick Napalm gave me to prevent fragment menus from showing up when the drawer was pulled out May 12 02:50:29 never would have figured that one out May 12 02:50:29 I have a listview with a header and a selector, but every time I make a selection, the previous listview item is highlighted May 12 02:50:36 noticed a few apps recently that open the draw on 'back'... fuck that's annoying. "no no i want to exit, stop showing me new stuff" May 12 02:50:51 hmm **** ENDING LOGGING AT Mon May 12 02:59:59 2014