Debdeep Ganguly

Greenhorn
+ Follow
since Dec 27, 2015
Debdeep likes ...
Android IntelliJ IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
9
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Debdeep Ganguly

For avoiding such cases, make sure:

1. You have complete implementations of and and .
2. Handling for all cases whether you're handling null values or say when a certain kind of item should or shouldn't be refreshed along with returning appropriate results.
3. Avoid object reference checks as they might be different. Only use fine item comparisons - override and write your own implementation.
4. Make sure to always use DiffUtil for any kind of list updations.
10 months ago
I am trying to pass few lists of values into a fragment through Bundle. However I have done the same before without any problems. It looks so silly - I can't figure out why the size of lists are shown 0 when we retrieve the bundle in fragment.

Pojo:

   

The part where I am putting data into Bundle. The size of `countriesFromBundle` is more than 0.

   


And this is where I am getting the empty lists, like for ex. the size of `countriesList` is 0.



   
1 year ago
I am removing and adding same list items as required and updating the view. I know I should use during adding new elements. When I have less list items on, it gets updated but when there are more items, no change occurs. Can't understand this. Help would be appreciated!


Here's the adapter:

2 years ago
Here is my EditListItemsFragment.java which supports a separate fragment to edit the list items



Here's my DataListFragment.java containing the recyclerview list items


About that updateListItem(), how to implement it ?
2 years ago
Ohh thanks! Before going through the docs, I was implementing the the older version (without the custom Builder) due to which I was stuck. Thanks again btw.  
2 years ago
My question is two fold, so please co-operate.

First, I am new to these concepts so I am really confused between the above two.

Second, take a look at the part where I've already instantiated OkHttpClient and here I have to use the setConnectedTimeout and setReadTimeout methods. So what do I do next ? Any help will be greatly appreciated.

         
2 years ago
Take a look at the json (or my app data) :



Now take a look at the normal data from the offical website:

Temp is rising. Pressure is falling.
Low, 22° at 5AM,
High, 25° at 3PM.
Wind: 3 km/h
Humidity: 91%  // And see this one!
Dew Pt: 22
Visibility: —
Pressure: 1011 mb

My question is I took the recordings at very short instance of time gap but still they differ, why so or this is just some of just my misconceptions ? Any help please, thanks.
2 years ago
I've followed the docs and couple of other sites but couldn't confirm whether center keeps the aspect ratio or not. If no, then for the same we've to set adjustViewBounds = true, right ? Thanks.
3 years ago
Yes sure, an object is created, referenced to null but in the LinkedList class, it is given so what actually happens here ? Does the object takes all its values of next node and store it ? Where does the previous node's data go into, is it overwritten - mean how is memory allocation taking place ? Sorry if I am not able to clearly present my actual query here.
3 years ago
I don't have any idea what you did with the line but as far as i know, surrounding the statement with a try catch or adding to your main method signature will definitely make it work.
3 years ago
I am a beginner, so feel free to point out any mistakes or misconceptions.
I have a generic class Node, which i implemented in an other class - LinkedList. My question is - what does the line marked in the Node class part represent exactly. Thanks in advance.


Node class - Node.java




LinkedList class - LinkedList.java



3 years ago
@ Carrey Brown

Thanks for pointing me that silly one out.
I will try to be careful next time.

@ Campbell Ritchie

Thank you for highlighting my misconception. I am learning to code in Java now and this will really be in the top of list of my do's and don't's.
3 years ago
I have not been successful in running this code, it is showing NPE at the part where i add elements to a HashMap. I am also confused about how to generate the Random ID's during runtime. It is my beginner level so please feel free to sort out almost anything. Thanks.








The stack trace is:


3 years ago
@Winston Gutkowski

Thank you very much.
I got what are trying to explain , so i guess i may also use
Sorry for the mistakes i did by messing up the line numbers.
And thanks for that List suggestion too. I will certainly change that.
3 years ago
3 years ago