« first day (1784 days earlier)      last day (3163 days later) » 

6:03 PM
Looks like Dave is taking some time to go through the starred messages before chatting
 
always do
 
:)
That's how bored I am. I was watching the messages jump around after you arrived
 
you are seriously on your slack game today
 
much slack
 
6:05 PM
Can I get some answer feedback? stackoverflow.com/questions/13197702/…
 
can't you see I'm busy?
 
Oh, you missed one way
sun.misc.Unsafe
(just kidding, don't put that in)
 
I think we just lost cM for a few hours
 
but yeah, it seems like solid answer
it's the third question of that type I see today
 
Anu, how's your answer better than the accepted one?
 
6:11 PM
yeah that seems like an edit not a new answer
 
haha, Dave
 
@cygery I actually explain how to do it, and have sample code and links
 
well, I agree with Dave, better edit the accepted answer
 
The accepted answer is "yo system.arraycopy or arrays.copyof or arraylist"
Is it acceptable to make such a drastic edit?
 
Thank you guys for all your supports.
I am at number 1 now. :)
 
6:16 PM
Who supported you?
Oh, the meta post. I saw that
 
You ^^
 
congrats!
 
nice :)
 
Thanks :)
 
6:16 PM
But I haven't given mine yet so enjoy it while you can
j/k :D
 
11 september is last submission day
haha I want you to give an answer.
:)
 
I know. I should quit procrastinating
 
Today would have been a good day since I haven't done anything else. But then I would have been doing stuff and, you know
 
that other meta swag-question ends today, right?
 
6:17 PM
too lazy to think an answer ?
 
I think so
Yes
Well, too lazy for a good-ish answer
 
Com'on! You're too good.
 
:P
 
without any doubt
 
Link?
 
6:18 PM
My other meta swag post got a bunch of downvotes. And I thought it was pretty good
103
Q: How Did Stack Overflow Help You?

bluefeetAs we continue the celebration of 10 million questions on Stack Overflow, we want to give away more stuff! We’ve already received some awesome stories about users going above and beyond for others, but before we give away more swag we need something from you. We want some stories about how Sta...

I still have it pinned so I don't forget
 
It's just 4. You have got plenty of days
and we're your supporters
 
thanks!
 
But at the same time I want to win as well, at least that SO stickers T-shirt :)
 
I should have done it right away so I'm not repeating what everyone else has probably said but oh well
Everyone wins
 
Really ?
 
6:21 PM
Lol. yeah
 
Whoever gives an answer, win a gift anyway ? Is that what you meant ?
 
yes :D
 
Ohh Man!
 
Yeah, as long as it follows the rules
 
didn't you read the question?
 
6:22 PM
Cool
I think I should read again
 
I was wondering why you were so stoked about being at the top. But I was letting you enjoy it because it's still cool
 
^
 
I am an idiot.
 
:D
 
laters
 
6:23 PM
See ya, cygery!
 
Cya cygery
 
Enjoy the weekend
 
bye
 
Hey Een
 
posted on September 04, 2015 by Reto Meier

Posted by Nick Butcher, pixel pusher What makes an app intuitive and easy to use? What makes it hard or frustrating? How can your app stand out in a competitive market? Learn the fundamentals of good Android design and the patterns that have proven to work on Android to help you to build better apps. This 5-lesson series, available on Udacity, begins with a crash course on the fundament

 
6:50 PM
signed up :o
 
I tried but the page just sits there and looks at me :(
internets are hard
Oh, I can click sign in after and it lets me. Strange
 
the interwebz hate u cM?
 
uh huh
and I started debugging and making a big change on the master branch
4 hours ago, by codeMagic
user image
 
When did the dropdown on the reputation thing change?
It shows community stuff
 
Must be some new A/B testing they are doing. I don't have that
But I'm not sure how that will work for 20k+ers
 
7:06 PM
It reads 'get a life'.
Or maybe that's why you don't have it?
 
I mean because there are no more privileges after that
 
I closed as 'unclear what you're asking' because there's not any question. not even a programming one.
 
That's fine. There are several reasons why it would fit. So I used a custom message and used his own words :P
Thanks
 
omg I need to take that developers class
 
Me too. Sign up, Mac
 
7:11 PM
I did
I'll be damned if I don't fly through it tonight.
lol
 
Good, then I can cheat off of you
 
lol
It's okay, we know I'm the better developer.
My code is good, and I should feel good.
 
you need some oil to rub your face with cM, after that burn
 
@TristanWiley you should sign up for the udacity course mentioned a little further up ^
 
7:15 PM
Lol, Een
 
I've got just the thing for him.
(for those who aren't as nerdy as me it's the Burn Heal item from Pokemon)
 
I don't have that thing in rep dropdown and I have just over 100rep
 
Hmm. Guess that mean's I'm the chosen one.
 
Thanks, Mac. I had no idea as pokemon is dumb
 
:O blasphemy
Jun 11 at 13:04, by McAdam331
I'd be lying if I said I didn't have a pokemon emulator on my phone.
 
7:21 PM
My now 11 year old was getting into it when he was 4 or 5. I'm so glad he grew out of it. Maybe you will someday too
 
Haha. I only got nostalgic once because my nephew got into it. So I taught him everything I knew.
 
me too McAdam
 
Pokemon was the only thing I enjoyed in my childhood cM, don't take that from me lol
 
haha
 
It was before I met room-15 and my life was fulfilled
 
7:36 PM
I have a basic CursorAdapter for RecyclerView and hide on swipe (ItemTouchHelper registered to recycler) + undo option in Snackbar when item gets hidden. When I swipe a card, it disappears from recycler, but the cards below don't lift up. I don't want to remove that item from the database, because I think it'd be too slow with larger datasets (that'd be 3 queries in a few seconds at max if I'm not mistaken?)
or is that more of a question for SO?
well, hopefully you'll find inspiration for your blog posts from my Database&Cursor-related questions McAdam :p
 
CursorAdapter on REcyclerView?
Please explain how you accomplished such magic
I wanted to write my blog solely on databases in android first haha but that's too niched
 
I was going to do a weekend segment sometime about contentproviders
 
changed some code according to comments
 
oh yeah I tried this out didn't have a ton of luck
It was hard to handle notifying data changes. Which sounds like part of your issue too
 
7:40 PM
well, yeah
are there better alternatives?
 
I didn't try it for very long though because I gave up on using an RV in my case. In your case that might not be a consideration.
Well, more than just the CursorAdapter I like using a CursorLoader for Listviews.
But, as far as this goes, I have no idea. I think it is a suitable question for SO, if no one in here knows.
 
I could change it to ListView, but I'm not sure whether that will introduce more problems than it will solve
 
That's always a risk ha.
 
I'm a fucking idiot, no, seriously. I need a damn debugging 101 course
 
So, let me reiterate I guess. When you swipe, it disappears, but the next item doesn't move up?
So, that sounds like, to me, that the swipe is working for removing the View's visiblity, but it's not actually removing it from the adapter. Do you think that's the case?
 
7:43 PM
yes
well, that item is still in the cursor
if I call notifyDatasetChanged it reappears
 
So you want to remove it from the adapter but not from the database?
 
I want to keep it in the Database while Snackbar is shown
so I can undo it without querying db
 
Oh like a 'this item has been archived' with an undo button?
 
yes
 
@AndroidHacker this room requires a min 100 rep on SO
 
7:45 PM
it deletes it from the local db, but just marks it as hidden on server (can be shown again)
 
Apparently, it should also require a min level of debugging skills
 
You could, if possible, add an archived column.
Oh, so you're doing that already, in a way.
 
@AndroidHacker still denied. You can read about it in the room rules
 
yeah, I got archiving sorted out back-end, it's just the front-end that isn't working properly
 
You could still use the hidden column on the local DB, and then when you leave the activity or something run a quick query to delete where hidden = 1.
(as long as that only runs on device DB haha)
And then, write your query for the adapter to pull where hidden = 0.
 
7:47 PM
@AndroidHacker if you request again without a min of 100 rep then I will put you on the ban list
 
so when you call notifyDataSetchangeD() it won't reappear
 
hm, okay, that's better. Still, I need to update DB once when it gets swiped away, requery, and if it gets undoed, reset hidden status and requery again
And from what I've seen, Loaders will just serve cached data unless explicitly told to reset
or I got something wrong?
 
I'm not sure how Loaders work underneath but I really want to learn because they do great in my Cash Caretaker app lol
I have a question.
How likely is the data to change in the database while the user is viewing this recyclerview?
nevermind that thought process was going nowhere
 
I had an issue where refresh wouldn't work with initLoader, but only with resetLoader, that's why I assumed so
 
Ah. I've had that problem oh my god now I can't remember what the reason was
 
7:52 PM
Well, data is probably not going to change at all
 
> Call to initialize a particular ID with a Loader. If this ID already has a Loader associated with it, it is left unchanged and any previous callbacks replaced with the newly provided ones. If there is not currently a Loader for the ID, a new one is created and started.

This function should generally be used when a component is initializing, to ensure that a Loader it relies on is created. This allows it to re-use an existing Loader's data if there already is one, so that for example when an Activity is re-created after a configuration change it does not need to re-create its loaders.
that's for initLoader
Beautiful answer about them here. Might help explain the problem you previously had.
 
yeah, I think I actually stumbled upon that one
well, my current problem seems difficult enough, I'm gonna put it on SO, so if you have any idea, feel free to answer it (I'll link it when I write it)
I just hope it won't become ghost town like most of my previous questions
 
Oh luke I found my question ha
0
Q: Calling initLoader() only works once when using callbacks for CursorAdapter

McAdam331Inside of my Activity I have a listview that represents doctors. Each row has the doctor's name and a checkbox. I have implemented a callback interface so that when a doctor is selected, all other doctors are removed from the listview and only the selected doctor remains. It appears to work, bec...

Yeah please link it and I'll look it over for sure.
god that problem I was trying to solve there was an absolute nightmare.
 
is it OK if I link Gist?
 
In here? Sure
 
7:57 PM
no, I mean in question
 
Oh. Yeah. If the file is really long, it's probably preferred.
 
150 lines, not that long
and I didn't actually write that CursorAdapter, so I meant to provide some attribution
 
@Eenvincible I don't get it.
 
Yeah I know; (jk)
 
8:01 PM
Lol
I came back in at the right time ;)
 
I don't get why you don't get it adam
 
I had a boolean variable that I was never changing when needed :(
 
That is a bunch of (bool) cM
4
haha
 
^^ lol!
 
Nice one, Een
 
8:03 PM
lol
 
cM first bug I ever fixed in the professional world was when my supervisor at the time had a 1 year in development prototype that analyzed incoming packets, mostly working, except when you looked at stuff later it didn't make much sense. Turned out that the 100k+ objects he was making was just essentially a chain of pointers so all 100k+ objects were pointing to the same space in memory which was the buffer containing the latest packet that came in.
All I had to do was make a copy of the packet before passing it down the line and everything worked, he was stuck on that for at least a month.
 
You were a hero Dave
 
more like my supervisor needed to l2pointer
 
I think I should start my weekend early.
 
@McAdam I think I got it
what would happen if I set height to 0?
 
8:14 PM
oh wait
That'd be the same as setting view.setVisibility(View.GONE)
 
or Visibility to GONE
yeah, I've just thought of that
might work, gonna try it out
 
Worth a shot, I suppose. Then you can easily maintain a reference to the item if you need to show it again (view undo)
 
yeah
well, it's in the same method
undo is defined in a listener, and I have a reference to ViewHolder
 
Gotcha.
I am going to leave work in a moment, good luck with this. If you have troubles I will be back on in a couple hours and I can take a look at anything then too.
 
Sure, thanks
 
8:17 PM
We aren't friends on G+ are we?
We'll add it later. I gotta run. Or stalk me down, it's not hard. o/
 
Doesn't work :'(
I think I've stalked you down
 
Well, 'luke' at you Luke, stalking people down
 
Een is all over the puns today :)
Well, figured out the big problem. Now to figure out all the little problems that caused
 
Well, I do have a history of stalking people down
 
Like this beauty java.lang.ArrayIndexOutOfBoundsException: length=15; index=2262
4
 
8:25 PM
askfm being my favourite, too bad no one uses that anymore
lol cM
what the fuck is that?
 
damn cM, that is really crazy index
 
Haha! I know!
 
What could have caused that
 
I think I coded the thingz bad somewhere
Probably some fucking static variable that isn't being cleared out or that shouldn't have been static in the first place
 
list.get(2262); is the only thing I can think of
 
8:28 PM
hm...no I get the list then run a for loop getting data from that list. I don't fucking know
 
That is a lot of iteration alright
 
It was like 1500 or something earlier so there's something not getting cleared out I guess
 
wait, you sure for loop can go from 15 to 2262?
 
I think it's something internal with hashmap. I'll put a try/catch around it and see what's happening
 
0
Q: Hiding (and re-showing) cards in RecyclerView backed by Cursor

LukeI have a RecyclerView with CursorAdapter implemented as shown here: https://gist.github.com/skyfishjy/443b7448f59be978bc59 I also have a ItemTouchHelper attached to recycler implemented this way (don't mind my Snackbar modifications): private class TouchHelperCallbacks extends ItemTouchHelper.S...

ideas welcome
 
8:33 PM
@codeMagic silly cM just increase the size of the Array from 15 to 5000, that should take care of it!
#noBugs #china
 
:D
Now it's java.lang.ArrayIndexOutOfBoundsException: length=15; index=127
So maybe if I run it a few more times, let it crash, then package it up and ship it we will be good
right?
 
That is one way to do it
Run it like 112 times
Or wrap it in another loop
mmmm
 
Genius! More loops!
 
I love codezz
 
It must be some threading issue. The length of the list is 15 but the index is 41 when I set a breakpoint in the catch block.
I think?
 
8:44 PM
are multiple threads accessing the index?
or object containing the index?
 
0/
And one more turned into circle.
 
Probably. This shit I'm looking at is a mess
 
have you tried throwing a synchronized in front of the method that contains the loop?
 
I've considered it, yes
I've not done it
 
8:49 PM
even if it's not a permanent solution if it solves the crash you know it's a concurrent access issue
maybe some stupid AsyncTask is getting too handsy
 
Yeah, I'll try after I try this other thing
But it's almost 5 and Friday so maybe I should save it for Tuesday
yay now I got java.lang.OutOfMemoryError and nope, not dealing with images at all. Guess it's time to go home
Talk to you folks after awhile
Thanks for talking through it with me
 
lol wow
 
yeah right?
 
9:26 PM
@codeMagic I actually laughed out loud at that. You made my day.
 
9:45 PM
user image
3
@Luke I can't figure out what you need to do but I'm definitely interested haha. Have you tried notifyItemRemoved()? developer.android.com/reference/android/support/v7/widget/…
 
You're welcome, Mac :P
 
ExpandableListViews are interesting, cM. I am trying to figure out how the adapter works right now.
 
@Luke using a cursor adapter means your tying the dataset of your list directly to the DB, if you want to make shallow changes without performing queries you're going to want to separate the DB and the listview by using an intermediary data set
 
^That's what I was thinking earlier. That's why I asked about the likelihood of the dataset changing.
 
9:58 PM
See you guys on Tuesday
am out of this place
Enjoy your weekend
 
o/ Een
 
If you need any help I might be useful but, then again, maybe not. I need to tweak mine still
See you, Een
 
I thought I was researching these for you? ;P
 
In that case, don't ask me any questions
 

« first day (1784 days earlier)      last day (3163 days later) »