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;
}
}
关于android studio 的无动画,文本折行