At the moment I am trying to run this lines of code:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle("Tell me");
setContentView(R.layout.activity_post);
getSupportActionBar().setDisplayHomeAsUpEnabled(true)
;
editText = (EditText) findViewById(R.id.editText1);
textView = (TextView) findViewById(R.id.textView);
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
String s = sharedPreferences.getString("font_list", "null");
Typeface face = Typeface.createFromAsset(getAssets(), "fonts/" + s);
editText.setTypeface(face);
String s2 = sharedPreferences.getString("font_size", "8");
editText.setTextSize(Float.parseFloat(s2));
String s3 = sharedPreferences.getString("font_color", "#000");
editText.setTextColor(Color.parseColor(s3));
// File directory = new File(path);
// directory.mkdirs();
}
here is logcat image
As per you log cat image you have IllegalArgumentException exception
You have color string which is not in correct format see this Color.parseColor
Parse the color string, and return the corresponding color-int. If the string cannot be parsed, throws an IllegalArgumentException exception. Supported formats are: #RRGGBB #AARRGGBB or one of the following names: 'red', 'blue', 'green', 'black', 'white', 'gray', 'cyan', 'magenta', 'yellow', 'lightgray', 'darkgray', 'grey', 'lightgrey', 'darkgrey', 'aqua', 'fuchsia', 'lime', 'maroon', 'navy', 'olive', 'purple', 'silver', 'teal'.
Change
String s3 = sharedPreferences.getString("font_color", "#000");
to
String s3 = sharedPreferences.getString("font_color", "#000000");