Feb 17, 2019 21:17
Looks like I cant award bounty before 24 hours, I accepted it for now
Feb 17, 2019 21:16
ight
Feb 17, 2019 21:12
Just removed the datasetChange code, It works without it so no need to include it on your answer if you dont want to.
Feb 17, 2019 21:12
but the number is well above 150 at this moment.
Feb 17, 2019 21:11
So yes it will depand
Feb 17, 2019 21:11
the user can pick the color of all the views as they wish and share it on another app that I will create.
Feb 17, 2019 21:11
I am making a theme picker for my app
Feb 17, 2019 21:04
Do you happen to know a better way to get the value from database? I think looping the keys is slowing it a fair bit
Feb 17, 2019 21:04
Well you can update your answer with that ^ and also keep the notify part and I will accept and reward the bounty
Feb 17, 2019 21:03
That was the error all along
Feb 17, 2019 21:03
That actually fixed it!
Feb 17, 2019 20:59
I will change this and see if it fixes it
Feb 17, 2019 20:59
this might be the error.
Feb 17, 2019 20:59
I am caching the default value and not the actual value!
Feb 17, 2019 20:59
                String k = cursor.getString(cursor.getColumnIndex(ThemeDatabaseHelper.COLUMN_NAME_TITLE));
                String value = cursor.getString(cursor.getColumnIndex(ThemeDatabaseHelper.COLUMN_NAME_SUBTITLE));
                if (k.equals(key)) {
                    cursor.close();
                    if (database.isOpen()) database.close();
                    ThemeDatabaseCache.lruCache.put(key, defaultValue);
                    return value;
                }
Feb 17, 2019 20:59
Look at the getString method in my code
Feb 17, 2019 20:59
Wait, I think I know where the problem is coming from :O
Feb 17, 2019 20:56
But I am not sure how to combat that
Feb 17, 2019 20:56
I think whats happening here is the onPostExecute is getting called after my adapter returns the view.
Feb 17, 2019 20:56
Oh, It's in an outside class. I just showed an example of how its called
Feb 17, 2019 20:52
Hi
Feb 17, 2019 20:52
Updated post. .
Feb 17, 2019 20:52
Hi, I tried what you suggested just now, and it didnt work.
Feb 17, 2019 20:52
I am gonna try to pass this to my setBackground method as BaseAdapter and try to call notifyDatasetChanged inside onPostExecute and let you know how it goes.
Feb 17, 2019 20:52
Updated the question, showing how I call the setBackground
Feb 17, 2019 20:52
I am afraid I can't show you how I setup the adapter. but basically this is what I do for the setBackgroundColor part. I just call it on my custom layout on the getView method.
Feb 17, 2019 20:52
No I did not, Since I am only passing the view. I don't think I am allowed to pass the adapter.
Feb 17, 2019 20:52
I updated the question but yeah, I can't access the ListView reference, Since I don't want to pass it to my adapter.
Feb 17, 2019 20:52
Oops, I actually made a mistake on the question I am not actually using a recylerview I forgot I switched my code to github.com/ksoichiro/Android-ObservableScrollView/blob/maste‌​r/…, So Its actually a ListVIew. I will update the question
Feb 17, 2019 20:52
Well my issue is I can't access the recylerView ref, Since the workspace I am working on is limited, I only have access to the getView on the adapter
Feb 17, 2019 20:52
and if I have over 100 items, Its gonna call that piece of code 100 times, I don't see a way my code isn't called on UIThread either since it's called on onPostExecute?
Feb 17, 2019 20:52
I actually can't access my recyclerView I only have access to the view objects. I can't update the adapter nor the layoutManager.
 

Android

Don't say hi. Don't ask questions. Don't have fun. Don't do an...
Feb 17, 2019 19:30
Just opened a bounty on my question if anyone wants to take a look stackoverflow.com/questions/54715709/…
Feb 17, 2019 19:30
Hey :p
Feb 11, 2019 13:39
If anyone has the time can they look into this question? stackoverflow.com/questions/54605772/…
Feb 11, 2019 13:28
What's up?
Feb 11, 2019 13:26
Hey
Jan 3, 2019 02:44
I asked a question 2 days ago, Got no attention still just 2 upvotes, if Anyone has the time you can take a look at it. stackoverflow.com/questions/53986074/…
Jan 3, 2019 02:44
Hey
 
Dec 13, 2018 12:42
@edwin can you try it and see if it's resolved?
Dec 13, 2018 12:38
I am posting an answer
Dec 13, 2018 12:38
I fixed it
Dec 13, 2018 12:38
Okay
Dec 13, 2018 12:31
Okay I fixed BufferUnderflowException but it only returns the #
Dec 13, 2018 12:30
What I am getting is that calling messageBuffer2.get(data);after calling getInt() causes BufferUnderflowException
Dec 13, 2018 12:28
Okay let me do some testing
Dec 13, 2018 12:25
It shows 35 for me, but after that you can't get the data correct? you want to get the data after getting the int?
Dec 13, 2018 12:25
System.out.println(messageBuffer2.getInt()); doesn't this prints out the 35 so what's the issue here?
Dec 13, 2018 12:24
Okay, It wasn't clear enough which because you just showed output of the data.
Dec 13, 2018 12:23
I see 33 on both... this is first output messageDecoded=CARR0033TRANSACTION IGNORED+ and this is the second output #CARR0033TRANSACTION IGNORED+ only thing that changed is there is #