« first day (3178 days earlier)      last day (1993 days later) » 

01:30
😝 🤯 I have not slept since yesterday 😝 🤯
@RaymondArteaga Frog is nice
01:47
Thanks I guess
Do you know what we say Frog in our language?
'Daddo'
Say it like "daaddu"
 
2 hours later…
03:35
Ribbit ribbit
o/
13 hours ago, by grrigore
How would you handle this situation:

From Fragment A you can go to Fragment B and complete the fields from Frag B and submits some data.

Fragment A contains some data that has to be sent to the database, also in this fragment there is a variable isFragBCompleted that stores the status of the Fragment B. How can I navigate to Frag B and return to Frag A without losing my data from Frag A?
 
2 hours later…
05:24
Use shared view model
05:48
I'll check that out thanks
 
2 hours later…
07:52
Thinking about getting an iPad
Because Google has orphaned the tablet market
08:13
Not worth it, you are better off with a mini laptop than a tablet
Why are tablets still a thing?
08:47
I like to draw on it
09:43
Not entirely sure what exactly is your whole use case, but I would buy a small, slim and a detachable screen laptop to fit my needs, also it would be way powerful than a tablet
eLi
eLi
10:00
Why this String mUid = FirebaseAuth.getInstance().getCurrentUser().getUid() give me NPE ?
10:12
Is the user logged in?
10:28
stackoverflow.com/a/36903437/7972851 What is ApplicationActivity.class?
Also why is there intent declared again?.. in BootReceiver class
10:55
This was the most starred message last year on this day:
Jun 29 '18 at 16:56, by Tim Castelijns
only a person who really smells needs 2 baths
@grrigore don't worry about it, it says not to use that answer for oreo+
why not use workmanager?
I read that it's not good for sending scheduled notifications
11:26
@TimCastelijns I have two fragments with under 150 lines of code each(including imports). Can you go through the code and suggest any improvements?
At first glance, what do you think should be changed?
name it fragment instead of frag
1 line between blocks instead of 2
what is state listener? why is it not private
initViewModel has only 1 line, just do it in the oncreate directly
use expression body for functions that have only 1 line that is a return (onCreateView)
11:41
@TimCastelijns it's an interface that sends data to MainActivity, the data is about current state of recycler view, like SETTLING, SCROLLING and etc
ok
use brackets around if else
why do you observe in onActivityCreated?
nice use of .also
because, this fragment get's only loaded when the UI thread is done onDraw()
Just a little optimization to reduce UI creation time
It's like -> App get's started -> UI thread solely handles MainActivity UI creation -> UI created -> start loading and creating fragment
you can do private val layoutId: Int? get() = arguments?.getInt("layout_config")
nice shared element transition
context as MainActivity do you need this cast? How about requireActivity() ?
11:47
@TimCastelijns Yes, I just noticed, I will change it to more 'dynamic' casting
in getActivityContext the branches do the same, it will crash if hosted in another activity
Yes, it's bad, but the fragment right now is only being loaded in MainActivity only
If you look at the second fragment, you would notice that it is highly similar to first fragment, only major differences are in change of view references
the fragment should not know in which activity it is hosted
Personally, I don't like this approach, I wanted to create some class that handles view generics and I only write code once but I don't understand how to do it
you never need to cast like that unless you directly call functions on your main activity, which you should not do. If you just need the context use requireActivity()
11:52
Ok
this@ArchiveFragment just use this
So is it okay to use requireContext() instead of requireActivity and vice versa? According to their docs, they are pretty similar
yes usually you just need a context
it depends on the function you're calling. If it needs activity use requireActivity
what is emptyArchiveFragImg and why is it nullable?
@TimCastelijns I forgot to convert it to synthetic views, I will change it up
"some class that handles view generics" what does that mean
12:01
I meant that should I create a separate class that handles the common functionality of these fragments? Like both fragments register a scroll listener on their respective recyclerviews and notify MainActivity
they are identical in what they do?
I can move that to a class along with other common functions, that way I only write their code once
They are identical in, making a shared transition, register a recyclerview state listener and check for their saved layout managers
Also, for future proofing, I could be introducing new common functionalities, so it really feels dirty to write common features for every fragment
But that is where I am stuck at, should not I refrain from passing view references to non-Android classes?
Use livedata with mvvm
12:06
no you can pass views to helper classes np
or usually you make a file with some extensions on View
o/
@netpork I am using them, but for such simple cases it makes no sense to use observables
@RaymondArteaga Now you woke up at the right time
Thanks Tim for the feedback!
12:11
Why is this the right time?
because this is the time you usually go online
@Reno a piece of paper is cheaper
12:51
o/
@netpork welcome brother
13:33
o/
 
2 hours later…
eLi
eLi
15:29
63
 
2 hours later…
17:14
Ribbit ribbit
holy shit what a game of cricket pakistan just played
they are so predictably unpredictable
You mean cricket like crickets?
They make them fight?
yeah the team to stomp most of them wins
usually played out in the open on a patch of green
you can only use a wooden bat with which you have to squish them but you can only hit the bat 300 times
@Ahmad the only thing I know about cricket is that it's as corrupt as football youtu.be/v5DWJv1hiwM
hehe everything is
 
1 hour later…
18:28
Ribbit
18:49
yes
19:02
@RaymondArteaga SooS
Anyone uses MotionLayouts? If so, what is your impression on it?
they are awesome
19:29
@Ahmad yup too close
20:08
What's the right format for this 17/07/2019 13:15 - dd/MM/yyyy HH:mm?
@TaseerAhmad soup
I'm having a problem with getting some delays please have a look here: gist.github.com/grrigore/98a8b02a590a6f8dfc53df42c1b2024b
I know SimpleDateFormat is not the best way to do this..
OOPS Studio requested access. Rep: 21 - Questions: 0 - Answers: 2 (ratio 4:Infinity)
20:31
:( I was writing him a message that he'd only need 29rep to join in because of his bio, now he left :/
@OOPSStudio - feel free to request access once again when you reach a rep of 50
!reject
@OOPSStudio you currently do not meet the requirements to chat here. You can find our requirements in the rules.
 
2 hours later…
22:34
@MehdiB. that is very lenient of you master mehdi
23:09
fuchsia.dev is online
8

« first day (3178 days earlier)      last day (1993 days later) »