diff --git a/.idea/misc.xml b/.idea/misc.xml index 7bfef59..b6ea2b1 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/app/build.gradle b/app/build.gradle index c2c1f0c..e88d242 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 30 buildToolsVersion "30.0.3" - //ndkVersion '23.0.7123448' + ndkVersion '23.0.7123448' defaultConfig { applicationId "com.example.myapplication" diff --git a/app/src/main/java/com/navinfo/outdoor/activity/FragmentManagement.java b/app/src/main/java/com/navinfo/outdoor/activity/FragmentManagement.java index c13b0c0..cfd1a51 100644 --- a/app/src/main/java/com/navinfo/outdoor/activity/FragmentManagement.java +++ b/app/src/main/java/com/navinfo/outdoor/activity/FragmentManagement.java @@ -15,6 +15,7 @@ import com.navinfo.outdoor.fragment.ForgetPawFragment; import com.navinfo.outdoor.fragment.GatheringFragment; import com.navinfo.outdoor.fragment.GradeFragment; import com.navinfo.outdoor.fragment.IssueFragment; +import com.navinfo.outdoor.fragment.IssueWebFragment; import com.navinfo.outdoor.fragment.MapDownloadFragment; import com.navinfo.outdoor.fragment.MineFragment; import com.navinfo.outdoor.fragment.PrivilegeFragment; @@ -69,6 +70,7 @@ public class FragmentManagement extends BaseActivity { private AboutFragment aboutFragment;//我的-关于的fragment -23 private GatheringFragment gatheringFragment;//我的-用户资料-收款信息的fragment -24 private UserAttestationFragment userAttestationFragment;//我的-用户资料-实名认证的fragment -25 + private IssueWebFragment issueWebFragment;//我的-常见问题-web的fragment -27 @Override @@ -140,7 +142,9 @@ public class FragmentManagement extends BaseActivity { if (userAttestationFragment!=null){//我的-用户资料-实名认证的fragment-25 fragmentTransaction.hide(userAttestationFragment); } - + if (issueWebFragment!=null){//我的-常见问题-web的fragment -27 + fragmentTransaction.hide(issueWebFragment); + } } @@ -351,6 +355,14 @@ public class FragmentManagement extends BaseActivity { fragmentTransaction.show(userAttestationFragment); } break; + case 27://我的-常见问题-web的fragment + if (issueWebFragment == null) { + issueWebFragment = new IssueWebFragment(); + fragmentTransaction.add(R.id.frame_layout, issueWebFragment); + } else { + fragmentTransaction.show(issueWebFragment); + } + break; } fragmentTransaction.commit(); } @@ -434,6 +446,9 @@ public class FragmentManagement extends BaseActivity { case 25: userAttestationFragment.onActivityResult(requestCode,resultCode,data); break; + case 27: + issueWebFragment.onActivityResult(requestCode,resultCode,data); + break; } } diff --git a/app/src/main/java/com/navinfo/outdoor/activity/LoginActivity.java b/app/src/main/java/com/navinfo/outdoor/activity/LoginActivity.java index c3e2807..338eb9a 100644 --- a/app/src/main/java/com/navinfo/outdoor/activity/LoginActivity.java +++ b/app/src/main/java/com/navinfo/outdoor/activity/LoginActivity.java @@ -2,6 +2,7 @@ package com.navinfo.outdoor.activity; import android.content.Intent; import android.view.View; +import android.widget.Button; import android.widget.EditText; import android.widget.TextView; @@ -16,7 +17,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener private android.widget.EditText etLoginName; private android.widget.EditText etLoginPaw; private TextView tvForgetPaw; - private TextView tvLogin; + private Button btnLogin; @Override protected int getLayout() { @@ -36,8 +37,8 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener etLoginName = (EditText) findViewById(R.id.et_login_name); etLoginPaw = (EditText) findViewById(R.id.et_login_paw); tvForgetPaw = (TextView) findViewById(R.id.tv_forget_paw); - tvLogin = (TextView) findViewById(R.id.tv_login); - tvLogin.setOnClickListener(this::onClick); + btnLogin = (Button) findViewById(R.id.btn_login); + btnLogin.setOnClickListener(this::onClick); tvRegister.setOnClickListener(this); tvForgetPaw.setOnClickListener(this); } @@ -55,8 +56,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener forgetPaw.putExtra("tag", 6); startActivity(forgetPaw); break; - case R.id.tv_login: - + case R.id.btn_login: Intent intent = new Intent(this, HomeActivity.class); startActivity(intent); break; diff --git a/app/src/main/java/com/navinfo/outdoor/adapter/CapacityMeasureAdapter.java b/app/src/main/java/com/navinfo/outdoor/adapter/CapacityMeasureAdapter.java index d07cd57..e0c4b7a 100644 --- a/app/src/main/java/com/navinfo/outdoor/adapter/CapacityMeasureAdapter.java +++ b/app/src/main/java/com/navinfo/outdoor/adapter/CapacityMeasureAdapter.java @@ -137,7 +137,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter定义和用法\n" + + "\n" + + "

\n" + + "\t\n" + + "

\n" + + "\n" + + "

<style> 标签用于为 HTML 文档定义样式信息。

\n" + + "\n" + + "

在 style 中,您可以规定在浏览器中如何呈现 HTML 文档。

\n" + + "\n" + + "

type 属性是必需的,定义 style 元素的内容。唯一可能的值是 \"text/css\"。

\n" + + "\n" + + "

style 元素位于 head 部分中。

\n" + + ""; + private WebView issueWebView; + + @Override + protected int getLayout() { + return R.layout.fragment_issue_web; + } + + @Override + protected void initView() { + super.initView(); + ivIssueWebFinish = (ImageView) findViewById(R.id.iv_issueWeb_finish); + issueWebView = (WebView) findViewById(R.id.issue_webView); + ivIssueWebFinish.setOnClickListener(this::onClick); + issueWebView.getSettings().setBlockNetworkImage(false); + WebSettings settings = issueWebView.getSettings(); + settings.setJavaScriptEnabled(true); + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { + issueWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); + } + settings.setBuiltInZoomControls(false); + content = content.replace(" 11) { + Toast.makeText(getActivity(), "QQ号输入错误", Toast.LENGTH_SHORT).show(); + return; + } + if (usermailbox.length() > 31) { + Toast.makeText(getActivity(), "邮箱输入错误", Toast.LENGTH_SHORT).show(); + } + break; } } + private static String qq() { + + String qq = "23412312"; + String regex = "[1-9][0-9]{4,11}"; + boolean flag = qq.matches(regex); + if (flag) { + System.out.println("输入正确!!"); + } else { + System.out.println("输入正确!!"); + } + return qq(); + + } + + public static boolean isEmail(String email) { + if (null == email || "".equals(email)) return false; + Matcher m = compile.matcher(email); + return m.matches(); + } + } diff --git a/app/src/main/java/com/navinfo/outdoor/util/RegexUtil.java b/app/src/main/java/com/navinfo/outdoor/util/RegexUtil.java new file mode 100644 index 0000000..8d2902d --- /dev/null +++ b/app/src/main/java/com/navinfo/outdoor/util/RegexUtil.java @@ -0,0 +1,27 @@ +package com.navinfo.outdoor.util; + +import android.text.TextUtils; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 手机号验证 + */ +public class RegexUtil { + public static boolean isPhone(String name) { + if (TextUtils.isEmpty(name))return false; + Pattern p = Pattern.compile("^1[3,4,5,6,7,8,9]\\d{9}$"); + Matcher m = p.matcher(name); + return m.matches(); + } + public static boolean checkPassword(String password) { + if (TextUtils.isEmpty(password))return false; + //字母+数字。最少6位的正则表达式 + Pattern p = Pattern.compile("(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,}"); + Matcher m = p.matcher(password); + boolean isPassword = m.matches(); + return isPassword; + } + +} diff --git a/app/src/main/res/drawable/gethering_shape.xml b/app/src/main/res/drawable/gethering_shape.xml new file mode 100644 index 0000000..ef9fd04 --- /dev/null +++ b/app/src/main/res/drawable/gethering_shape.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/image_shape.xml b/app/src/main/res/drawable/image_shape.xml new file mode 100644 index 0000000..0f063e6 --- /dev/null +++ b/app/src/main/res/drawable/image_shape.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/login_ripple.xml b/app/src/main/res/drawable/login_ripple.xml new file mode 100644 index 0000000..120361c --- /dev/null +++ b/app/src/main/res/drawable/login_ripple.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/main_shape_outlogin.xml b/app/src/main/res/drawable/main_shape_outlogin.xml index 7794695..49f4021 100644 --- a/app/src/main/res/drawable/main_shape_outlogin.xml +++ b/app/src/main/res/drawable/main_shape_outlogin.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/mine_outlogin_ripple.xml b/app/src/main/res/drawable/mine_outlogin_ripple.xml new file mode 100644 index 0000000..e481081 --- /dev/null +++ b/app/src/main/res/drawable/mine_outlogin_ripple.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_login.xml b/app/src/main/res/drawable/shape_login.xml index 039c308..1c908b2 100644 --- a/app/src/main/res/drawable/shape_login.xml +++ b/app/src/main/res/drawable/shape_login.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_red_radius_bg.xml b/app/src/main/res/drawable/shape_red_radius_bg.xml index 208e9bd..3870d26 100644 --- a/app/src/main/res/drawable/shape_red_radius_bg.xml +++ b/app/src/main/res/drawable/shape_red_radius_bg.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/user_data_shape.xml b/app/src/main/res/drawable/user_data_shape.xml new file mode 100644 index 0000000..0e321c6 --- /dev/null +++ b/app/src/main/res/drawable/user_data_shape.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/user_rz.xml b/app/src/main/res/drawable/user_rz.xml new file mode 100644 index 0000000..d4e8a2b --- /dev/null +++ b/app/src/main/res/drawable/user_rz.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/user_style.xml b/app/src/main/res/drawable/user_style.xml new file mode 100644 index 0000000..cef62bc --- /dev/null +++ b/app/src/main/res/drawable/user_style.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/about_fragment.xml b/app/src/main/res/layout/about_fragment.xml index db8b67d..ffe9346 100644 --- a/app/src/main/res/layout/about_fragment.xml +++ b/app/src/main/res/layout/about_fragment.xml @@ -1,8 +1,8 @@ + android:layout_height="match_parent"> + android:background="@drawable/image_shape" + android:src="@mipmap/ic_launcher" /> + android:background="?android:attr/selectableItemBackground" + android:gravity="center"> - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_issue_web.xml b/app/src/main/res/layout/fragment_issue_web.xml new file mode 100644 index 0000000..d46d237 --- /dev/null +++ b/app/src/main/res/layout/fragment_issue_web.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_register.xml b/app/src/main/res/layout/fragment_register.xml index 05a00bc..07b1066 100644 --- a/app/src/main/res/layout/fragment_register.xml +++ b/app/src/main/res/layout/fragment_register.xml @@ -112,6 +112,7 @@ app:layout_constraintLeft_toLeftOf="@id/register_note" app:layout_constraintTop_toBottomOf="@id/register_note" /> + android:text="持 卡 人:" /> + android:text="银行卡号:" /> + android:text="所属银行:" />