Feb 17, 2019 21:15
Glad that it worked, notifyDataSetChanged might help others
Feb 17, 2019 21:10
I would just warm-up the cache before hand and not have to query the DB when I need the resources
Feb 17, 2019 21:09
are you using just few key values (100-1000)? or the number might exponentially grow ?
Feb 17, 2019 21:03
We just assumed it was elsewhere xD
Feb 17, 2019 20:58
notifyDataSetChanged will trigger the rendering of the items, you just need to make sure you call it on the right reference of your adapter
Feb 17, 2019 20:55
This is why I thought setBackground is part of your adapter
Feb 17, 2019 20:55
```
public final View getView(int i, View view, ViewGroup viewGroup){\
...
view = inflate(R.layout.my_view, viewGroup, false);
setBackground(view);
...
}
```
Feb 17, 2019 20:54
Hey, the problem is for sure coming from the re-rendering of the items
Feb 17, 2019 20:52
Are you able to share the code on how you setup the adapter and how you call setBackgroundColor ? if so please update the question
Feb 17, 2019 20:52
@SamzSakerz have you tried myAdapter.notifyDataSetChanged(); on the setBackgroundColor ?
Feb 17, 2019 20:52
@SamzSakerz the purpose of using AsyncTask as you mentioned is to not block your UI while loading the stuff from cache/DB. So when the result is back onCreateViewHolder is not called again and therefore your color doesn't get applied.
 
Sep 20, 2017 08:05
Thanks very much for your help !
Sep 20, 2017 08:00
hmm, appreciate your help :) The closest to what I want to achieve is the RewriteRule ^(?:city1|city2)/?$ / [P] However the controller doesn't get the city1 in the request uri
Sep 20, 2017 07:54
This redirects to the homepage and remove the /city I guess that's removed by the index.php
Sep 20, 2017 07:52
drupal.org/node/38960 seems to use rewrite?
Sep 20, 2017 07:50
I've also check drupal internal rewrites and there is nothing to flag there ;?
Sep 20, 2017 07:49
I've tried but since using index.php it never goes to home page, it always gives a 404
Sep 20, 2017 07:45
I've tried that, It still gives me a 404 for city1 and city2
Sep 20, 2017 07:44
I updated the question with the .htaccess file. I've run some tests and without P flag I can't get the homepage to display.
Sep 20, 2017 07:44
If I remove P for the proxy the www.example.com page is not reached. the server tries to server www.example.com/city1 which doesn't exist. I believe the issue is more about keeping the proxy but somehow sending through the URI to the server? From my experiment it seems like if I use the proxy the URI is not reaching the server.
Sep 20, 2017 07:44
Thanks for quick reply, however when using your rule I get a 404 as the server tries to get the page www.example.com/city1, which doesn't really exist.