正在查看: Top浏览器 v4.6.16 应用的 CustomSearchEngineDialog.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Top浏览器 v4.6.16 应用的 CustomSearchEngineDialog.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.pocket.common.dialog;
import android.os.Bundle;
import android.text.Editable;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import c.h.a.e.d;
import c.h.b.i.c;
import c.t.a.d.n;
import com.pocket.common.R$id;
import com.pocket.common.R$layout;
import com.pocket.common.R$style;
import com.pocket.common.base.BaseDialogFragment;
import com.pocket.common.dialog.CustomSearchEngineDialog;
import h.b0.c.a;
import h.b0.d.l;
import h.i0.t;
import h.u;
public final class CustomSearchEngineDialog extends BaseDialogFragment {
public a<u> f746p;
public CustomSearchEngineDialog() {
f(R$style.BottomEnterAnimation);
n(true);
o(true);
m(0);
p(-1, -2);
}
public static final void u(CustomSearchEngineDialog customSearchEngineDialog, View view) {
l.f(customSearchEngineDialog, "this$0");
customSearchEngineDialog.dismiss();
}
public static final void v(CustomSearchEngineDialog customSearchEngineDialog, View view) {
l.f(customSearchEngineDialog, "this$0");
View view2 = customSearchEngineDialog.getView();
Editable text = ((EditText) (view2 == null ? null : view2.findViewById(R$id.tv_content))).getText();
if (text == null || text.length() == 0) {
d.c("搜索引擎地址不能为空");
return;
}
View view3 = customSearchEngineDialog.getView();
Editable text2 = ((EditText) (view3 == null ? null : view3.findViewById(R$id.tv_content))).getText();
l.e(text2, "tv_content.text");
if (!t.y0(text2, "http://", false, 2, (Object) null)) {
View view4 = customSearchEngineDialog.getView();
Editable text3 = ((EditText) (view4 == null ? null : view4.findViewById(R$id.tv_content))).getText();
l.e(text3, "tv_content.text");
if (!t.y0(text3, "https://", false, 2, (Object) null)) {
d.c("搜索引擎地址有误");
return;
}
}
View view5 = customSearchEngineDialog.getView();
c.m("searchurl", ((EditText) (view5 != null ? view5.findViewById(R$id.tv_content) : null)).getText().toString());
a<u> r2 = customSearchEngineDialog.r();
if (r2 != null) {
r2.invoke();
}
customSearchEngineDialog.dismiss();
}
@Override
public n getDataBindingConfig() {
return new n(R$layout.common_app_custom_search_engine, 0, null);
}
@Override
public void initViewModel() {
}
@Override
public void onViewCreated(View view, Bundle bundle) {
l.f(view, "view");
super.onViewCreated(view, bundle);
View view2 = getView();
((EditText) (view2 == null ? null : view2.findViewById(R$id.tv_content))).setText(c.i("searchurl", "https://m.baidu.com/s?from=1029078g&wd="));
View view3 = getView();
((TextView) (view3 == null ? null : view3.findViewById(R$id.tv_cancel))).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view4) {
CustomSearchEngineDialog.u(CustomSearchEngineDialog.this, view4);
}
});
View view4 = getView();
((TextView) (view4 != null ? view4.findViewById(R$id.tv_confirm) : null)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view5) {
CustomSearchEngineDialog.v(CustomSearchEngineDialog.this, view5);
}
});
}
public final a<u> r() {
return this.f746p;
}
public final CustomSearchEngineDialog w(a<u> aVar) {
l.f(aVar, "clickListener");
this.f746p = aVar;
return this;
}
}