I have SettingsActivity that extends PreferenceActivity and in setting I can specify how many EditTexts my MainActivity needs to show on screen. I am using global variable from helper class to achieve this. My SettingsActivity changes the value of global variable and my MainActivity reads this value and add as many EditTexts as needed.
But there is one problem, my MainActivity draws new EditTexts only after it has been minimized and then maximized, because this method that adds EditTexts is in onCreate method. I tried to acces my public void addEditTexts(int amount) method (which is in MainActivity) from SettingsActivity without success. Is there any other method to do this?
You should put your method that draws the EditTexts in the
onResume();