如何显示可供选择的颜色列表。我有一个带有彩色文本的列表视图[用户可以选择他们想要的颜色。]
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]));
我怎样才能制作一个更直观的颜色选择器颜色选择器?