Closed Dullyoung closed 4 years ago
//顶部标题 TextView tvTitle = (TextView) findViewById(R.id.tvTitle); RelativeLayout rv_top_bar = (RelativeLayout) findViewById(R.id.rv_topbar); rv_top_bar.setBackgroundColor(mPickerOptions.bgColorTitle); 看了源码 设置顶部标题背景是用这个方法实现的 ,现在所做项目中需要标题左上和右上两侧有圆角, 所以希望新增接口, rv_top_bar.setBackgroundResource(int resID) 或者将标题设置为public变量或新增直接设置圆角接口。
//顶部标题 TextView tvTitle = (TextView) findViewById(R.id.tvTitle); RelativeLayout rv_top_bar = (RelativeLayout) findViewById(R.id.rv_topbar); rv_top_bar.setBackgroundColor(mPickerOptions.bgColorTitle);
RelativeLayout relativeLayout= (RelativeLayout) mPickerView.findViewById(R.id.rv_topbar); 是我憨批了,可以用build完的PickView直接find到。。。打扰了。。。
//顶部标题 TextView tvTitle = (TextView) findViewById(R.id.tvTitle); RelativeLayout rv_top_bar = (RelativeLayout) findViewById(R.id.rv_topbar); rv_top_bar.setBackgroundColor(mPickerOptions.bgColorTitle);
看了源码 设置顶部标题背景是用这个方法实现的 ,现在所做项目中需要标题左上和右上两侧有圆角, 所以希望新增接口, rv_top_bar.setBackgroundResource(int resID) 或者将标题设置为public变量或新增直接设置圆角接口。