Skip to content

Commit a1e38fd

Browse files
committed
see 07/05 log
1 parent af207c0 commit a1e38fd

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

utilcode/src/main/java/com/blankj/utilcode/constant/RegexConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ public final class RegexConstants {
1717
/**
1818
* 正则:手机号(精确)
1919
* <p>移动:134(0-8)、135、136、137、138、139、147、150、151、152、157、158、159、178、182、183、184、187、188</p>
20-
* <p>联通:130、131、132、145、155、156、175、176、185、186</p>
20+
* <p>联通:130、131、132、145、155、156、171、175、176、185、186</p>
2121
* <p>电信:133、153、173、177、180、181、189</p>
2222
* <p>全球星:1349</p>
2323
* <p>虚拟运营商:170</p>
2424
*/
25-
public static final String REGEX_MOBILE_EXACT = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(147))\\d{8}$";
25+
public static final String REGEX_MOBILE_EXACT = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,1,3,5-8])|(18[0-9])|(147))\\d{8}$";
2626
/**
2727
* 正则:电话号码
2828
*/

utilcode/src/main/java/com/blankj/utilcode/util/FragmentUtils.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import android.support.v4.app.Fragment;
1111
import android.support.v4.app.FragmentManager;
1212
import android.support.v4.app.FragmentTransaction;
13+
import android.support.v4.content.ContextCompat;
14+
import android.support.v4.view.ViewCompat;
1315
import android.view.View;
1416

1517
import java.util.ArrayList;
@@ -867,14 +869,7 @@ public static void setBackgroundResource(@NonNull final Fragment fragment, @Draw
867869
* @param background 背景
868870
*/
869871
public static void setBackground(@NonNull final Fragment fragment, final Drawable background) {
870-
View view = fragment.getView();
871-
if (view != null) {
872-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
873-
view.setBackground(background);
874-
} else {
875-
view.setBackgroundDrawable(background);
876-
}
877-
}
872+
ViewCompat.setBackground(fragment.getView(), background);
878873
}
879874

880875
static class Args {

utilcode/src/main/java/com/blankj/utilcode/util/SpanUtils.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,9 +1034,7 @@ class CustomLineHeightSpan extends CharacterStyle
10341034

10351035
@Override
10361036
public void chooseHeight(final CharSequence text, final int start, final int end, final int spanstartv, final int v, final Paint.FontMetricsInt fm) {
1037-
int ht = height;
1038-
1039-
int need = ht - (v + fm.descent - fm.ascent - spanstartv);
1037+
int need = height - (v + fm.descent - fm.ascent - spanstartv);
10401038
if (need > 0) {
10411039
if (mVerticalAlignment == ALIGN_TOP) {
10421040
fm.descent += need;
@@ -1047,7 +1045,7 @@ public void chooseHeight(final CharSequence text, final int start, final int end
10471045
fm.ascent -= need;
10481046
}
10491047
}
1050-
need = ht - (v + fm.bottom - fm.top - spanstartv);
1048+
need = height - (v + fm.bottom - fm.top - spanstartv);
10511049
if (need > 0) {
10521050
if (mVerticalAlignment == ALIGN_TOP) {
10531051
fm.top += need;

0 commit comments

Comments
 (0)