提交 a1e38fda 编写于 作者: B Blankj

see 07/05 log

上级 af207c08
......@@ -17,12 +17,12 @@ public final class RegexConstants {
/**
* 正则:手机号(精确)
* <p>移动:134(0-8)、135、136、137、138、139、147、150、151、152、157、158、159、178、182、183、184、187、188</p>
* <p>联通:130、131、132、145、155、156、175、176、185、186</p>
* <p>联通:130、131、132、145、155、156、171、175、176、185、186</p>
* <p>电信:133、153、173、177、180、181、189</p>
* <p>全球星:1349</p>
* <p>虚拟运营商:170</p>
*/
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}$";
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}$";
/**
* 正则:电话号码
*/
......
......@@ -10,6 +10,8 @@ import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewCompat;
import android.view.View;
import java.util.ArrayList;
......@@ -867,14 +869,7 @@ public final class FragmentUtils {
* @param background 背景
*/
public static void setBackground(@NonNull final Fragment fragment, final Drawable background) {
View view = fragment.getView();
if (view != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
view.setBackground(background);
} else {
view.setBackgroundDrawable(background);
}
}
ViewCompat.setBackground(fragment.getView(), background);
}
static class Args {
......
......@@ -1034,9 +1034,7 @@ public final class SpanUtils {
@Override
public void chooseHeight(final CharSequence text, final int start, final int end, final int spanstartv, final int v, final Paint.FontMetricsInt fm) {
int ht = height;
int need = ht - (v + fm.descent - fm.ascent - spanstartv);
int need = height - (v + fm.descent - fm.ascent - spanstartv);
if (need > 0) {
if (mVerticalAlignment == ALIGN_TOP) {
fm.descent += need;
......@@ -1047,7 +1045,7 @@ public final class SpanUtils {
fm.ascent -= need;
}
}
need = ht - (v + fm.bottom - fm.top - spanstartv);
need = height - (v + fm.bottom - fm.top - spanstartv);
if (need > 0) {
if (mVerticalAlignment == ALIGN_TOP) {
fm.top += need;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册