I'm finding a displaying problem in my app and one of the users开发者_高级运维 advices me to not use ArrayAdapter... i'm wondering if i can't use other thing... here is my function that i have to use an ArrayAdapter on it:
public void updatelv(Activity activity) {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
String fileName = getResources().getString(R.string.fileName);
fileDir = "" + preferences.getString("login", "") + "."+ preferences.getString("marque", "") + ".";
s = myIO.ReadFilePerLine(getApplicationContext(), fileDir+fileName);
ListView L = (ListView) findViewById(R.id.lv);
L.setAdapter(new ArrayAdapter<String>(this, R.layout.list_item, s[0]));
}
And this is the data that i want to store whenever i tap on a button:
data = date + " : " + y + "L/100KM\n"+ " " + value1 + "L "+ value2 + "KM\n";
Thank you for your help :).
精彩评论