In Android GUI flickers when reading the properties file
Posted
by
ManojValiveti
on Stack Overflow
See other posts from Stack Overflow
or by ManojValiveti
Published on 2011-01-17T02:00:21Z
Indexed on
2011/01/17
2:53 UTC
Read the original article
Hit count: 219
Hi,
I am getting the GUI flicker when reading a file properties and accordingly enabling/disabling checkbox and List value in listbox. when i remove this file reading code the GUI doesnt have flicker.
I am reading the properties before creating the Preferences in OnCreate(). Attached the file write code below for reference.Please let us know is there any other way to read and update the preference staus.
private void SetExtendConf(String key, String strValue)
{
mProperties = new Properties();
try {
File file = new File(FILE_EXT);
if(!file.exists())
file.createNewFile();
file.setWritable(true,false);
FileInputStream fis = new FileInputStream(file);
mProperties.load(fis);
fis.close();
FileOutputStream stream = new FileOutputStream(file);
Log.d(TAG, "Setting Values " + key + ":"+ strValue);
mProperties.setProperty(key, strValue);
mProperties.store(stream,"ext.conf");
stream.close();
} catch (IOException e) {
Log.d(TAG, "Could not open properties file: " + GPS_FILE_EXT);
}
}
-Manoj
© Stack Overflow or respective owner