« first day (2381 days earlier)      last day (2559 days later) » 

12:40 AM
0
Q: Backbutton in fragment instead of Hamburger

newToEverythingI have implemented this to make a backbutton appear and disappear at certain times I want: public void BackNav(boolean y) { if(y) {toggle.setDrawerIndicatorEnabled(false); getSupportActionBar().setDisplayHomeAsUpEnabled(true);} else {getSupportActionBar().setDisplayHomeAsUpEnabled(false)...

This almost seems like a real question.
 
@Code-Apprentice you almost seem like a real question
 
1:06 AM
@TheWanderer Glad to know I fooled you
 
 
2 hours later…
3:21 AM
o/
 
o\
How are you, cM?
 
Not too bad when the stress levels are down for a bit. haha
How about yourself?
 
 
2 hours later…
5:53 AM
@codeMagic watching transformers
 
6:23 AM
o/
 
 
2 hours later…
8:34 AM
o/
 
 
1 hour later…
9:37 AM
!/meow
 
!/meowgif
 
!/meowgif
 
9:43 AM
O/ from qatar
 
9:59 AM
o/
 
o/
 
@AndroidDev You need a a:q ratio of 3:4 to talk here. Please see this link for more details.
 
KITTEH
 
10:14 AM
@AndroidDev Stop. Do not pass go. Do not collect 200. Repeatedly requesting access will result in a ban. Come back when you have fixed the issues outlined in the last message. Requesting access again in less than 24 hours will result in a ban.
 
 
2 hours later…
12:41 PM
morning
 
hi
got one question about app architecture
 
@ValeriyPosvistak You need at least 80 rep to talk here. Please see this link for more details.
 
basically we started MVP, and we would place api calls from retrofit in presenter
then we added repository pattern, and presenter now depends on repository instance
problem with this new repository layer, is that for example if user rotate screen when request is not finished it would leak activity for some time
with first implementation i could just call.cancel() them from presenter, but now they are in repository
 
@MahdiHraybi You need at least 80 rep, and a a:q ratio of 3:4 to talk here. Please see this link for more details.
 
 
2 hours later…
3:13 PM
hmm
I feel like my app needs a new color palette
purple and teal look kinda weird
 
3:31 PM
 
@AnjaniKumar You need at least 80 rep, and a a:q ratio of 3:4 to talk here. Please see this link for more details.
 
@MageshPandian Welcome! Please read, confirm reading, and follow the room rules before you do anything else: room-15.github.io
 
4:57 PM
2
Q: Interest and location based algorithm for android mobile app

WilliamsI am trying to work on android mobile app where I have a functionality to find matches according to interest and location. Many dating apps are already doing some kinda functionality for example Tinder matches based on locations, gender and age etc. I do not want to reinvent the wheel if it has ...

Any idea ?
 
Yup, CV as too broad
That said, great question for chat
Geolocation is simple. There's about a billion existing databases that allow you to search with geopoints, wouldn't worry too much about that
Interests is also not too hard
 
do you know clustering algo ?
 
When a user signs up, categorise their interests into broader groups
For instance, if someone lists "Call of Duty" and someone else lists "Halo" they both go in the gaming group
When search, first filter by geolocation, then filter by common interest groups
If you set up your indices right in most databases, those queries should be easy enough to run for any reasonable database even with a few million rows
 
@RaghavSood No offense I am not sure how it is too broad! It is not see algorithm tag what kinda questions are being asked there. I have researched and showed my research there. anyways
 
It's not a bad question, just not specific enough for SO
 
5:10 PM
It is specific for SO
 
You might have better luck on a geospatial mailing list or a mailing list for a particular database
 
You need to read what kinda of question are being asked for algorithm
This is not android
Just go and read
 
Just my opinion, nothing set in concrete
 
See if you can retract your vote
 
Is there a way to do like a foreach loop for every button in the current view?
Or would I need to set that up manually?
 
5:16 PM
Why do you need to do that?
If you want something consistent across all buttons, it may be easier to set a theme for that app/activity or have a subclass of Button that you use instead
 
It's weird defining tens of buttons, then having dozens of method calls for all of them
No for button listeners
 
You could set all of them to have the same listener and then do a switch case by ID if they are similar in functionality
 
That's what I am doing
But I still have to define each button, then call the listener method for each
 
If they're identical enough, you could have a loop creating the buttons too
 
Should I define them, add them to an arraylist and then pass that into the method instead, with a foreach loop?
@RaghavSood creating?
 
5:19 PM
You could just have a Button array, loop through it and create the buttons, and use those instead.
 
Hmm
 
Why define ten when you can define Button[10]?
 
5:40 PM
but how would I link those buttons to what I have in my layout?
 
LayoutParams
 
6:29 PM
 
6:49 PM
@RaghavSood I actually don't know if that'll work, since I'm also passing two strings along with the buttons/switches
 
@netpork XD
 
 
3 hours later…
9:37 PM
 
10:19 PM
Hmm
What's a good way to add an exit button to my app?
super.onBackPressed() is causing a crash dialog to show up
 
11:17 PM
what's the exception you get?
 
Activity destroyed
this.finish() has the same problem
I think it's because I'm using fragments, but idk
 
I'm not sure I understand, but usually you don't handle the quitting of the app yourself
you need to finish the activity when no longer needed and let android handle where the back press redirects the user to
 
my back button doesn't handle the exit
I made it open the drawer because reasons
shush with your UX :p
 
:D
 
but super.onBackPressed() and finish() both cause an illegal state exception
I guess I could just catch the exception though....
 
11:26 PM
no
 
why
 
that's not how it works :D
 
or is it >_>
ooooooh
 
You don't fix bugs by just catching the exception :D
 
you don't know me!
I mean the app is closing anyway
I just don't want it to show the crash dialog when it does
 
11:28 PM
your app shouldn't crash, regardless of what you wanna do
step 1: fix the crash
 
idk what's even causing the crash
wait
I know what's causing it
but I don't know why
 
what's that?
 
well it crashes when I call finish() or super.onBackPressed()
 
I'm no magician, I can't help if you don't share your exception
 
java.lang.IllegalStateException: Activity has been destroyed
	at android.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1433)
	at android.app.BackStackRecord.commitInternal(BackStackRecord.java:687)
	at android.app.BackStackRecord.commit(BackStackRecord.java:663)
	at com.zacharee1.systemuituner.MainActivity$1.run(MainActivity.java:161)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:148)
 
11:38 PM
what's in MainActivity.java:161
 
finish()
like I said
 
where do you use addToBackStack ?
 
I don't...
 
ahh
 
11:55 PM
Anyone work in RAD Studio (android)?
No one?
 
that was it @MehdiB.
 
so you fixed it?
 
yup
 
cool
good night
 

« first day (2381 days earlier)      last day (2559 days later) »