One of the problems with the development of an Android project is this:
There is a checkbox multi-box in the configuration page of the program that shows whether a configuration module is displayed, after the following series of procedures: Select Module to display >> serialization save >> read out configuration >> display module according to configuration
The module shown is not the same as the configured content.
After a variety of guesses, output log and debug, finally found the problem:
One of the following is written:
Panelinfo panelinfo = new Panelinfo (Paneltitlelist[i],paneliconlist[i],panelclasslist[i],boolean.parseboolean ( Gridviewadapter.gChecked.get (i)));
We can see that the last parameter of Panelinfo converts a string to a Boolean type, and the content is found to contain a "space" after printing the conversion!!
If "true" is actually "true", it is converted directly to false! after conversion.
That should be the way it works.
Panelinfo panelinfo = new Panelinfo (Paneltitlelist[i],paneliconlist[i],panelclasslist[i],boolean.parseboolean ( Gridviewadapter.gChecked.get (i). Trim ()));
Note that the trim!! is added to the rear.
This problem has really been committed many times, sometimes really do not think, may wish to see if there is no trim brought about by the problem. Therefore, there is a need to be aware of type conversions.
Trim has the following effects:
Causes the string to remove the copy of the leading and trailing blanks, and returns this string if there is no leading and trailing whitespace
About the trim of Java