android - How to show a list of color's to chose from -


this question has answer here:

how show list of color's chose . have list view colored text [user has option choose color want .]

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])); 

how can make more ittutive color picker color choser ??

check wheel color picker in apidemo example. sample app provided sdk. run , check out


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -