标签:onclick set 关于 bottom class down image 动画 控件
public class HiddenUtils {
private View hideView, clickView, down;//需要展开隐藏的布局,开关控件,控件样式改变
public static HiddenUtils newInstance(Context context, View hideView, View clickView, ImageView down) {
clickView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (View.VISIBLE == hideView.getVisibility()) {
hideView.setVisibility(View.GONE);
down.setImageResource(R.drawable.svg_bottom_c126);
} else {
hideView.setVisibility(View.VISIBLE);
down.setImageResource(R.drawable.svg_top_c126);
}
}
});
return new HiddenUtils(context, hideView, clickView, down);
}
private HiddenUtils(Context context, View hideView, View clickView, View down) {
this.hideView = hideView;
this.down = down;
this.clickView = clickView;
}
}
标签:onclick set 关于 bottom class down image 动画 控件
原文地址:https://www.cnblogs.com/sunjian43792901/p/11113438.html