diff --git a/app/src/main/java/afkt/project/ui/activity/ListenerActivity.kt b/app/src/main/java/afkt/project/ui/activity/ListenerActivity.kt index 3422af2c2a..71a9e3d951 100644 --- a/app/src/main/java/afkt/project/ui/activity/ListenerActivity.kt +++ b/app/src/main/java/afkt/project/ui/activity/ListenerActivity.kt @@ -57,7 +57,7 @@ class ListenerActivity : BaseActivity() { override fun initValue() { super.initValue() - val view = ViewUtils.inflate(R.layout.base_view_textview) + val view = ViewUtils.inflate(this, R.layout.base_view_textview) ViewHelper.get().setText(view, "单击绑定, 长按注销") .setTextColor(view, ResourceUtils.getColor(R.color.gray)) binding.vidActLinear.addView(view) diff --git a/art/regex.txt b/art/regex.txt index fc76ef47e2..e7a36db751 100644 --- a/art/regex.txt +++ b/art/regex.txt @@ -43,3 +43,15 @@ lambda alternative anonymous type can be replaced with lambda + +========= += Regex = +========= + + + +Dev[\w]+Engine\.(get|set)Engine\( + + + + diff --git a/lib/DevApp/src/main/java/dev/utils/app/ViewUtils.java b/lib/DevApp/src/main/java/dev/utils/app/ViewUtils.java index b5c8da66d8..b585d284cb 100644 --- a/lib/DevApp/src/main/java/dev/utils/app/ViewUtils.java +++ b/lib/DevApp/src/main/java/dev/utils/app/ViewUtils.java @@ -130,48 +130,6 @@ public static Activity getActivity(final View view) { // = - /** - * 获取 View - * @param resource R.layout.id - * @return {@link View} - */ - public static View inflate(@LayoutRes final int resource) { - return inflate(resource, null, false); - } - - /** - * 获取 View - * @param resource R.layout.id - * @param root {@link ViewGroup} - * @return {@link View} - */ - public static View inflate( - @LayoutRes final int resource, - final ViewGroup root - ) { - return inflate(resource, root, root != null); - } - - /** - * 获取 View - * @param resource R.layout.id - * @param root {@link ViewGroup} - * @param attachToRoot 是否添加到 root 上 - * @return {@link View} - */ - public static View inflate( - @LayoutRes final int resource, - final ViewGroup root, - final boolean attachToRoot - ) { - try { - return LayoutInflater.from(DevUtils.getContext()).inflate(resource, root, attachToRoot); - } catch (Exception e) { - LogPrintUtils.eTag(TAG, e, "inflate"); - } - return null; - } - /** * 获取 View * @param context {@link Context}