dimanche 19 avril 2015

Change value from resources (int / strings / styles / etc ) programmatically

I'm trying to change the value of a resource, but many post say you can not change, I think if you can, but do not know how yet.


In the Xml I have something like this:



<resources xmlns:android="http://ift.tt/nIICcg">
<integer name="textSize">11</integer>
</resources>


to obtain the value



int update_str = this.getResources().getInteger (R.integer.textSize);


but to change it?



???


I can get all the textviews and change the parameter individually, but if we have 1000 textviews on each page, I think it is a bit forced and drastic to the% cpu hardware.


Aucun commentaire:

Enregistrer un commentaire