Posts by lassuli • 64 points
10 posts
-
-2
votes8
answers309745
viewsA: Reduce image size and maintain CSS aspect ratio
You can set the minimum and maximum size to equal, so the image will always have the same ratio. For example: .give-wrap .give-card__media img { display: block; margin: 0 auto; object-fit: cover;…
-
0
votes1
answer146
viewsA: Could someone explain to me how this new Navegation Drawer works?
I faced the same problem, actually it is an error of androidstudio in version 3.5. In your activity_main.xml file, make sure that navigationView is before include. If you are, leave it after include…
-
1
votes0
answers69
viewsQ: Find out if App has been terminated
Hi, I’m a beginner in android and I’m developing an app. I can find out if my Activity was closed using the onStop method using isFinishing() and isDestroyed() and that went very well. But I would…
-
0
votes1
answer35
viewsA: Correct use of the onChildRemoved method in Childeventlistener
I haven’t figured out the best way to use onChildRemoved yet, but as a stopgap measure I am updating Fragment manually whenever there is a removal. For this I added the lines of code within the…
-
1
votes1
answer35
viewsQ: Correct use of the onChildRemoved method in Childeventlistener
Good evening! I’m making a chat app and I list the conversations in a recyclerview. I chose to use the addChildEventListener method, because (I think) it will consume less resources since the data…
-
0
votes1
answer286
viewsA: How to Iterate on Datasnapshot correctly in Firebase?
How is your node arranged in firebase? For example, if your node is with two keys you will need to traverse the data with two for. One for the first key and one for the second key. Something like…
-
1
votes2
answers236
viewsA: Find out if Activity has been closed
I found a better way to detect if the app was closed by the user. I used the isfinishing and isDestroyed methods within the onStop method. @Override protected void onStop() { super.onStop(); if…
-
1
votes1
answer33
viewsA: My app is picking up the same settings even after using Finish
I’ve solved the problem! I had created an eventListener to search for other users to talk to and when I found one I opened a new chat screen without closing this eventlistener. So even if I ended…
-
0
votes1
answer33
viewsQ: My app is picking up the same settings even after using Finish
I’m a beginner on android and I’m developing a chat app in which I connect two people based on their preferences. When one of the two people ends the conversation and decides to go back to the queue…
-
1
votes2
answers236
viewsQ: Find out if Activity has been closed
Good night! I’m a beginner on android and I’m developing a chat app where two users connect through a queue based on their chosen preferences. When one of the users disconnects from the chat (end…