0
我有一個TextView和其默認的顏色,以獲得從偏好的新的文字顏色設置爲無法設置TEXTCOLOR與ColorDrawable
textView.setTextColor(Color.BLACK);
現在,我做了以下內容:
textcolor = Color.BLACK;
SharedPreferences sharedPreferences5 = android.preference.PreferenceManager.getDefaultSharedPreferences(this);
textcolorpri = sharedPreferences5.getInt("tabletextcolor", textcolor);
但我不能設置這種顏色的文本,得到一個錯誤與下面的代碼
textView.setTextColor(new ColorDrawable(textcolorpri));
我不知道我什麼時候開始嘗試它,它並沒有更早的工作,現在在我們的指導下,它的工作就像。 – Panache