diff --git a/Documents/note.md b/Documents/note.md index 36c4ce7..e734975 100644 --- a/Documents/note.md +++ b/Documents/note.md @@ -1 +1,3 @@ https://github.com/developerHaoz/DialogFragmentDemos/blob/master/app/src/main/java/com/example/haoz/dialogfragmentdemos/activity/DialogActivity.java + +SDLineEditText 增加下划线高度动态设置 diff --git a/androidutil/src/main/java/com/siberiadante/androidutil/util/SDDateUtil.java b/androidutil/src/main/java/com/siberiadante/androidutil/util/SDDateUtil.java index c461625..76194a5 100644 --- a/androidutil/src/main/java/com/siberiadante/androidutil/util/SDDateUtil.java +++ b/androidutil/src/main/java/com/siberiadante/androidutil/util/SDDateUtil.java @@ -448,8 +448,8 @@ public static long string2Millis(String time, String pattern) { /** * convert to time according to the millisecond timestamp adn date pattern * - * @param millisecond the millisecond timestamp - * @param pattern time pattern + * @param millisecond the millisecond timestamp + * @param pattern time pattern * @return time, date */ public static String getSDFDateFromMillisTimeStamp(String millisecond, String pattern) { diff --git a/androidutil/src/main/java/com/siberiadante/androidutil/widget/edittext/SDLineEditText.java b/androidutil/src/main/java/com/siberiadante/androidutil/widget/edittext/SDLineEditText.java index bfbfbf8..ebc3905 100644 --- a/androidutil/src/main/java/com/siberiadante/androidutil/widget/edittext/SDLineEditText.java +++ b/androidutil/src/main/java/com/siberiadante/androidutil/widget/edittext/SDLineEditText.java @@ -39,6 +39,8 @@ private void initData(Context context, AttributeSet attrs) { mPaint = new Paint(); mLineColor = attrArrays.getColor(R.styleable.SDLineEditText_sd_line_color, mLineColor); + mPaint.setStyle(Paint.Style.STROKE); + mPaint.setColor(mLineColor); // int lenght = attrArrays.getIndexCount(); // for (int i = 0; i < lenght; i++) { // int index = attrArrays.getIndex(i); @@ -59,8 +61,8 @@ public SDLineEditText(Context context, AttributeSet attrs, int defStyleAttr) { @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); - mPaint.setStyle(Paint.Style.STROKE); - mPaint.setColor(mLineColor); +// mPaint.setStyle(Paint.Style.STROKE); +// mPaint.setColor(mLineColor); canvas.drawLine(0, getHeight() - 1, getWidth() - 1, getHeight() - 1, mPaint); } } \ No newline at end of file diff --git a/androidutil/src/main/java/com/siberiadante/androidutil/widget/special/SDTitleLayout.java b/androidutil/src/main/java/com/siberiadante/androidutil/widget/special/SDTitleLayout.java index 02393e6..97eb3d6 100644 --- a/androidutil/src/main/java/com/siberiadante/androidutil/widget/special/SDTitleLayout.java +++ b/androidutil/src/main/java/com/siberiadante/androidutil/widget/special/SDTitleLayout.java @@ -367,6 +367,14 @@ private void settingLine() { } } + /** + * setting title layout background + * @param colorRes + */ + public void setTitleLayoutBackground(int colorRes) { + mRlLayout.setBackgroundColor(colorRes); + } + /** * 设置title *