视频直播app源码,自定义View 线型EditText输入框
视频直播app源码,自定义View 线型EditText输入框
public class LineEditText extends AppCompatEditText {
private Paint mPaint;
/**
* @param context
* @param attrs
*/
public LineEditText(Context context, AttributeSet attrs) {
super(context, attrs);
// TODO Auto-generated constructor stub
mPaint = new Paint();
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setColor(context.getResources().getColor(R.color.white));
}
@Override
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
// 画底线
canvas.drawLine(0, this.getHeight() - 1, this.getWidth() - 1, this.getHeight() - 1, mPaint);
}
}
以上就是 视频直播app源码,自定义View 线型EditText输入框,更多内容欢迎关注之后的文章