can someone rectify this add , a background on java and change it with stat pressed left or right
hy everybody , i need a help traying to add a background on android slider.java , so i want to have a background and to change it like this :
getBackground ( R.drawable_slider_bg);
if leftslider = PRESSED (getBackground = (R.drawable.slider_left_bg));
if rightslider = PRESSED (getBackgro开发者_如何学运维und = (R.drawable.slider_right_bg));
can someone help pleas ?
Edit : what about this , any sugestion ?
public void setBackgroundDrawable (int) {
setBackgroundDrawable(R.drawable.slider_bg);
if (LeftSlider == STATE_PRESSED) {
setBackgroundDrawable(R.drawable_slider_bg_left);
}
if (RightSlider == STATE_PRESSED) {
setBackgroundDrawable(R.drawable_slider_bg_right);
}
};
cheers
精彩评论