1
來選擇如何顯示顏色的選擇從列表。 我有彩色文本列表視圖[用戶選項來選擇他們想要的顏色。]如何顯示顏色的列表,從
String available_colors[]={"#FF0000","#00FF00","#0000FF"};
String color_options[]={"Red","Green","Blue"};
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("selected_color",position);
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
selected_color= preferences.getInt("selected_color", 0);
msg.setTextColor(Color.parseColor(available_colors[selected_color]));
我怎樣才能做出更ittutive顏色選擇器choser?
我認爲你正在尋找一個顏色選擇器。你看看這個問題:http://stackoverflow.com/questions/2442407/android-color-picker? – 2013-05-04 13:57:23
在顏色選擇器上回答了一個問題@ http://stackoverflow.com/questions/16363235/android-color-picker-to-be-included-in-the-activity – Raghunandan 2013-05-04 17:47:09