« first day (2171 days earlier)      last day (2778 days later) » 

12:20 AM
for some reason IDK why, Android M requestPermission(String[], int) is not found when used inside a support fragment. But when used on an Activity it's found. =/
 
¯\_(ツ)_/¯
 
That makes sense
one sec
@rogcg It's because that method is in AppCompatActivity, not fragment. developer.android.com/reference/android/support/v4/app/…, java.lang.String[], int)
 
Mac
 
12:44 AM
cM
 
¯\_(ツ)_/¯
 
@McAdam331 what about this? developer.android.com/reference/android/app/…, int)
 
Hmm there are two fragment classes, one in the support lib and the original one. Are you sure you're using the same one as that doc?
 
in my project im using support v4
 
That doc looks like it's for the regular fragment class.
 
12:49 AM
so, to use requestPermission inside the Fragment I should use android.app.Fragment. Support won`t support it, right?
 
Hmm apparently the v4 version should have it too? - developer.android.com/reference/android/support/v4/app/…, int)
 
weird. =/ When I run my application, the build console shows "cannot find symbol method requestPermissions(String[],int)"
 
 
2 hours later…
3:09 AM
¯\_(ツ)_/¯
 
3:20 AM
my java+res folder is 587KB, but my app is 8.97MB. why?
 
someone is holding upper bottle
 
¯\_(ツ)_/¯
 
3:59 AM
how can i have different manifest files for different APIs
 
4:40 AM
~~ Intense ~~
going sleepless for the hackathon; we have like 10h left before submitting; trying to wrap up
 
4:57 AM
goodluck
 
5:11 AM
Thanks
 
5:30 AM
0
Q: Android RecyclerView Adapter: notifyItemInserted and notifyItemMoved at index 0 not working

JMRboostiesI have a RecyclerView with a horizontal linear layout manager declared like this: RecyclerView graph = (RecyclerView) findViewById(R.id.graph); RecyclerView.LayoutManager classManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false); graph.setLayoutManager(classManager); g...

 
6:16 AM
can someone confirm if i need 'System Images, Intel x86, ARM' from SDK Manager?
 
probably not
 
heyyo
 
Will i ablE to crEatE aVD
 
@rupinderjeet47 dependencies
 
the emulator will work? i am getting Naugat
 
6:25 AM
hey JMR
 
whats up
got a comment on that issue, looks like it was an known bug in a previous version
of the recyclerview support lib
 
good still solving your issue i see?
 
wonder if it resurfaced, im def using the latest
 
@JMRboosties yes i am aware it was a bug it previous release
but since it was resolved
i didnt tell you about it
 
it makes me think it might be some shit where like
the branch the pr was on was based on the version with the bug
and the merge got goofed up
something silly like that
 
6:28 AM
can you do one thing create a sample and try to insert at 0 position
could be
 
i found something interesting
i cant do any dev now btw i am watching my nieces and theyre sleeping in my office
and i didnt push to git with my latest changes since like thursday
and this laptop sucks and would be super slow to dev on anyway
but, this is what i found interesting:
so if you recall the case i was talking about, what im trying to do is like you drag an object into a recyclerview, and have the adapter for it insert an empty view where the dropped item would go
i wrote some code which measures the full length of the recyclerview, like what its actual size is if you counted up all of its elements, not just what fits on the screen
 
ok so what you found
it was indeed inserting just not shown
 
it uses the current dx of the recyclerview itself to determine where in the recyclerview the item is, so if the user scrolls down to item 30 on the list and you drag an object below it, it would know thats object 31
yea, the insertion was happening correctly
 
high level of conversation
 
like the array which the adapter manages was correctly having a new object added to it
 
6:33 AM
yes
 
anyways, whats interesting is if you scroll away from the 0 index
to like 10 for instance
so index 10 is the left-most item in the horizontal recyclerview
and you try to do notifyItemInserted(10)
the same error occurs
was this the case with the previous bug?
what it tells me is that its not an issue of the actual index rather its relative position in the collection of active views managed by the recyclerview
like if viewholder.getLayoutPosition == 0 it wont work, regardless of viewholder.getAdapterPosition
 
i see
well that is right getlayoutposition shouldnt be 0
becoz RV uses that for layout views
 
 
1 hour later…
7:46 AM
Hey
anybody has used MPAndroidChart?
 
o/
 
0
Q: How to change background of value-text in PieChart

Mangesh GhotageI'm drawing PieChart on white background and I need to have the text in white color too. Now the problem is, the value-text is either too long and runs over the white space making it invisible or the color of the pie slice is very light making it hard to read. I was wondering if there is any pro...

 
8:11 AM
the label color is fixed to white?
 
yes cygery
any suggestion?
 
sure
clone the lib
open PieChartRenderer.java
edit drawEntryLabel
and draw your background there
pro-tip: add (a) parameter(s) to drawEntryLabel to control the background
 
it may sound stupid but i have not done this yet.. good time to clone and do stuff
i'll try it, thanks :)
 
I guess you'll need to adapt drawValue in DataRenderer.java, too, if I understand the lib correctly
looks like the value and label are drawn using different methods
which makes setting a shared background more difficult
in that case, I'd suggest creating a new method to draw the background
and some logic to compute its dimensions based on both the value and label text
anyway, did you check if any fork already exists with such a functionality?
 
 
1 hour later…
9:26 AM
no cygery
i'll do that
thanks for the help!
 
10:02 AM
yw
 
 
2 hours later…
11:39 AM
does someone have any clue about what this message means in Logcat?
dalvikvm-heap: Grow heap (frag case) to 13.807MB for 2623385-byte allocation
 
hint: do some basic web/SO search
 
i feel like outOfMemory error is near
and i started searching when i posted this
 
 
2 hours later…
1:41 PM
¯\_(ツ)_/¯
 
 
1 hour later…
2:53 PM
@rupinderjeet47 search first, then post
 
@TristanWiley Carl says hi, and had no idea that SO had chats haha
 
¯\_(ツ)_/¯
 
3:08 PM
o/ Carl
He's so old that he forgot we had a chat? :O
 
omg not that Carl lmao
sorry
 
¯\_(ツ)_/¯
 
3:24 PM
21 hours ago, by codeMagic
I think someone needs to reboot Tristan. His last 3 messages have been the same thing
 
4:20 PM
@McAdam331 I knew it wasn't. I was being "funny"
 
4:35 PM
Hey, What's up
 
o/
 
o/
 
 
4 hours later…
9:07 PM
o/
 
9:32 PM
yo!
how was the hackathon @mcadam
 
It was pretty good. :)
I left early during closing ceremonies because they started over an hour late, but otherwise they did pretty well.
Registered over 300 domains for Namecheap (goal was 250), so that was awesome.
 
haha woah
that's dope!
300?!
how the hell is this even possible?!
in other news
properly learning relational algebra made me understand sql joins so much better
 
Well there was ~1000 attendees I think
 
9:55 PM
¯\_(ツ)_/¯
 
10:13 PM
@jayeshkv welcome! please read the room rules
 
10:29 PM
=)
 
10:47 PM
/o
Anyone used GDB debugger here?
@rupinderjeet47 your heap grew exponentially is my guess. I'm not sure their is dynamic Memory allocation in Java though. :/
 
11:11 PM
I use gdb
but not that much
usually just use it through Clion which is a lot easier
 
@Ahmad I mean through terminal
For kernel debugging. But should be almost the same
 
what are you trying to do?
 
Debug my kernel
But question is
How to
 
is it possible to read a json object from a file and append a new element to that object in a file via writer ?
i am reading the json object via filereader then reading it in a stringbuilder and then converting it to JSONObject (jsonelement) and adding the new element to it via jsonelement.put(""+jsonelement.length, newstuff) ?
 
How to
Basically see the full value of a variable even if. It is really big
P variablename. . Won't work. As if it is a big variable it will just put three dots... .
You know how?
 
11:41 PM
@Ahmad
 
oh hmm
sorry don't really know about that
 
Oh ok
 

« first day (2171 days earlier)      last day (2778 days later) »