コード例 #1
0
 /**
  * Set the four colors used in the progress animation. The first color will also be the color of
  * the bar that grows in response to a user swipe gesture.
  *
  * @param colorRes1 Color resource.
  * @param colorRes2 Color resource.
  * @param colorRes3 Color resource.
  * @param colorRes4 Color resource.
  */
 public void setColorScheme(int colorRes1, int colorRes2, int colorRes3, int colorRes4) {
   ensureTarget();
   final Resources res = getResources();
   final int color1 = res.getColor(colorRes1);
   final int color2 = res.getColor(colorRes2);
   final int color3 = res.getColor(colorRes3);
   final int color4 = res.getColor(colorRes4);
   mProgressBar.setColorScheme(color1, color2, color3, color4);
 }
コード例 #2
0
 /**
  * Set the four colors used in the progress animation. The first color will also be the color of
  * the bar that grows in response to a user swipe gesture.
  *
  * @param color1 Color.
  * @param color2 Color.
  * @param color3 Color.
  * @param color4 Color.
  */
 public void setColorSchemeFromColors(int color1, int color2, int color3, int color4) {
   ensureTarget();
   mProgressBar.setColorScheme(color1, color2, color3, color4);
 }