android - Change Cuboid circle button color on runtime -


cuboid circle button custom circle button in android (source: github cuboid circle button).

i'm using button in app. works well, cannot find way change color programmatically on runtime.

in class, before oncreate have:

com.cuboid.cuboidcirclebutton.cuboidbutton btnreplayend;

then in oncreate:

btnreplayend = (com.cuboid.cuboidcirclebutton.cuboidbutton) findviewbyid(r.id.btnreplayend);

and in 'settheme' method (in same class):

btnreplayend.setcircle_color(getresources().getcolor(r.color‌.replaynormaldark));

there no way change circler color of com.cuboid.cuboidcirclebutton.cuboidbutton programatically you can change via xml using app:cub_color="@color/color_03a9f4" this

<com.cuboid.cuboidcirclebutton.cuboidbutton             android:layout_width="120dp"             android:layout_height="120dp"             android:layout_centerinparent="true"             android:text="no border"             android:textcolor="#000000"             android:textsize="18sp"             app:cub_border_radius="0dp"             app:cub_color="@color/color_03a9f4"             app:cub_fontstyle="fonts/bellerose.ttf"             app:cub_hover_color="#00bfff1"             /> 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -