第一次提交

This commit is contained in:
lianlilong 2024-04-05 21:53:51 +08:00
commit 0187e23ede
130 changed files with 9432 additions and 0 deletions

16
.gitignore vendored Normal file
View File

@ -0,0 +1,16 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
/.idea/

2
app/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/build
/release/

75
app/build.gradle Normal file
View File

@ -0,0 +1,75 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.police.policedatasystem'
compileSdk 33
viewBinding {
enabled = true
}
defaultConfig {
applicationId "com.police.policedatasystem"
minSdk 24
targetSdk 33
versionCode 10019
versionName "1.0.19"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "app_release${variant.versionName}.apk"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
viewBinding true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.3'
}
packaging {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
// implementation 'com.squareup.retrofit2:adapter-okhttp3:2.9.0' // OkHttp适配器
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3'
implementation 'com.scwang.smart:refresh-footer-classics:2.0.3'//
implementation 'com.scwang.smart:refresh-header-classics:2.0.3'//
// implementation 'io.reactivex:rxjava:1.3.8'
// implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0' //
implementation 'com.squareup.retrofit2:converter-gson:2.9.0' // 使 Gson JSON
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
implementation 'com.squareup.okhttp3:okhttp:4.8.1' // OkHttp库
implementation 'com.github.bumptech.glide:glide:4.16.0'
implementation 'com.google.android.material:material:1.8.0'
}

21
app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="1">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<queries>
<provider android:authorities="com.xdja.app.pj" />
<provider android:authorities="com.ydjw.ua.getCredential" />
<provider android:authorities="com.ydjw.ua.getDeviceCredential" />
<provider android:authorities="com.ydjw.rsb.getResourceAddress" />
</queries>
<application
android:name=".MyApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/jinghui"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/jinghui"
android:supportsRtl="true"
android:theme="@style/Theme.PoliceDataSystem"
tools:targetApi="31">
<activity
android:name=".activity.PoliceEmergencyDetailActivity"
android:exported="false"
android:label="@string/title_activity_police_emergency_detail"
android:theme="@style/Theme.PoliceDataSystem" />
<meta-data
android:name="appId"
android:value="请输入您的应用id" />
<meta-data
android:name="regionalismCode"
android:value="行政区划编码" />
<meta-data
android:name="networkCode"
android:value="网络区域编码" />
<activity
android:name=".activity.KeyPersonDetailActivity"
android:exported="false" />
<activity
android:name=".indexActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/Theme.PoliceDataSystem">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<data android:host="indexActivity" android:scheme="indexActivity" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -0,0 +1,26 @@
package com.police.policedatasystem;
import android.app.Application;
import android.os.Handler;
public class MyApplication extends Application {
private static MyApplication instance;
private static Handler handler;
public static MyApplication getInstance() {
return instance;
}
@Override
public void onCreate() {
super.onCreate();
handler = new Handler();
instance = this;
}
public static Handler getHandler() {
return handler;
}
}

View File

@ -0,0 +1,173 @@
package com.police.policedatasystem.activity;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.google.gson.Gson;
import com.police.policedatasystem.databinding.ActivityKeyPersonDetailBinding;
import com.police.policedatasystem.model.KeyPersonDetail;
import com.police.policedatasystem.util.Constants;
import com.police.policedatasystem.util.UiUtils;
public class KeyPersonDetailActivity extends Activity {
private ActivityKeyPersonDetailBinding binding;
private KeyPersonDetail keyPersonDetail;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityKeyPersonDetailBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
initListener();
String sfzh = getIntent().getStringExtra("sfzh");
keyPersonDetail = new Gson().fromJson(sfzh, KeyPersonDetail.class);
binding.wm.setTextSize(50);
binding.wm.setText(Constants.SFZH);
showData();
}
private void showData() {
/**
* 基本信息数据显示
*/
binding.tvName.setText(keyPersonDetail.getXm());
binding.tvSex.setText(keyPersonDetail.getXb());
if (UiUtils.isNotEmpty(keyPersonDetail.getHypo())) {
binding.tvMarital.setVisibility(View.VISIBLE);
binding.tvMarital.setText("已婚");
}
if (UiUtils.isNotEmpty(keyPersonDetail.getBq())) {
binding.tvBq.setText(keyPersonDetail.getBq());
binding.tvBq.setVisibility(View.VISIBLE);
}
setText(binding.tvNation, keyPersonDetail.getMz());
setText(binding.detailSfzh, keyPersonDetail.getGmsfhm());
if (UiUtils.isNotEmpty(keyPersonDetail.getJzdhhm())) {
String[] split = keyPersonDetail.getJzdhhm().split(",");
binding.detailSjh.setText(split[0]);//手机号
}
setText(binding.detailHj, keyPersonDetail.getJg());
setText(binding.detailGldz, keyPersonDetail.getHjdz());
setText(binding.detailFwcs, keyPersonDetail.getFwcs());
if (UiUtils.isNotEmpty(keyPersonDetail.getDjchphm())) {
binding.detailClxx.setText(keyPersonDetail.getDjchphm());//车辆信息
}
/**
* 位置信息数据显示
*/
if (UiUtils.isNotEmpty(keyPersonDetail.getSjgj())) {
setText(binding.tvBodyLastLocationPhone, sCountSp(keyPersonDetail.getSjgj()));//手机基站位置信息
setText(binding.tvBodyLastLocationPhoneTime, UiUtils.formatTime(keyPersonDetail.getSjgj().split(",")[1]));//手机最后定位时间
}
if (UiUtils.isNotEmpty(keyPersonDetail.getClzhwz())) {
setText(binding.tvBodyLastLocation, sCountSp(keyPersonDetail.getClzhwz()));//车辆最后位置
setText(binding.tvBodyLastTime, UiUtils.formatTime(keyPersonDetail.getClzhwz().split(",")[1]));//车辆最后定位时间
}
if (UiUtils.isNotEmpty(keyPersonDetail.getHcdp())) {
setText(binding.tvBodyTrainInfo, keyPersonDetail.getHcdp().split(",")[3] + "" + keyPersonDetail.getHcdp().split(",")[4] + " - " + keyPersonDetail.getHcdp().split(",")[5]);//火车订票
setText(binding.tvBodyTrainTime, UiUtils.formatTime(keyPersonDetail.getHcdp().split(",")[2]));//火车发车时间
}
if (UiUtils.isNotEmpty(keyPersonDetail.getKcdp())) {
setText(binding.tvBodyBusInfo, keyPersonDetail.getKcdp().split(",")[7] + "" + keyPersonDetail.getKcdp().split(",")[2] + " - " + keyPersonDetail.getKcdp().split(",")[6]);//客车订票 tCount(keyPersonDetail.getKcdp())
setText(binding.tvBodyBusTime, UiUtils.formatTime(keyPersonDetail.getKcdp().split(",")[4]));//客车发车时间
}
if (UiUtils.isNotEmpty(keyPersonDetail.getFjdp())) {
setText(binding.tvBodyFlyInfo, keyPersonDetail.getFjdp().split(",")[4] + "" + keyPersonDetail.getFjdp().split(",")[6] + " - " + keyPersonDetail.getFjdp().split(",")[9]);//飞机订票
setText(binding.tvBodyFlyTime, UiUtils.formatTime(keyPersonDetail.getFjdp().split(",")[7]));//飞机起飞时间
}
if (UiUtils.isNotEmpty(keyPersonDetail.getZjzs())) {
setText(binding.tvBodyRestInfo, tCount(keyPersonDetail.getZjzs()));//最近住宿
}
if (keyPersonDetail.getZp() != null) {
loadBase64Image(binding.ivPhoto, keyPersonDetail.getZp());
}
/**
* 列控数据信息显示
*/
if (keyPersonDetail.getLsajcs() > 0) {
setText(binding.tvBodyCtrlLevel, keyPersonDetail.getZdryLkxxList().get(0).getGklb());//管理级别
setText(binding.tvBodyCtrlType, keyPersonDetail.getZdryLkxxList().get(0).getQtlb());//列管级别
setText(binding.tvBodyCtrlTag, keyPersonDetail.getZdryLkxxList().get(0).getLkjz());//列控警种
setText(binding.tvBodyCtrlTime, UiUtils.formatTime(keyPersonDetail.getZdryLkxxList().get(0).getLksj()));//列控时间
setText(binding.tvBodyCtrlCause, keyPersonDetail.getZdryLkxxList().get(0).getLkyy());//列控原因
setText(binding.tvBodyCtrlPerson, keyPersonDetail.getZdryLkxxList().get(0).getZrdw());//责任单位
setText(binding.tvBodyCtrlPolice, keyPersonDetail.getZdryLkxxList().get(0).getZrmj());//责任民警
}
}
public void loadBase64Image(ImageView imageView, String base64Str) {
Glide.with(imageView.getContext())
.asBitmap()
.load(base64Str)
.into(imageView);
}
/**
* 第3次索引
*
* @param str
* @return
*/
private String tCount(String str) {
String c = ",";
int firstIndex = str.indexOf(c);
int secondIndex = str.indexOf(c, firstIndex + 1);
int thirdIndex = str.indexOf(c, secondIndex + 1);
return str.substring(thirdIndex + 1, str.length());
}
/**
* 第2个索引
*
* @param str
* @return
*/
private String sCount(String str) {
String c = ",";
int firstIndex = str.indexOf(c);
int secondIndex = str.indexOf(c, firstIndex + 1);
return str.substring(secondIndex + 1, str.length());
}
/**
* 第2个索引
*
* @param str
* @return
*/
private String sCountSp(String str) {
try {
return str.split(",")[3];
} catch (Exception e) {
return "";
}
}
private void initListener() {
binding.ivBack.setOnClickListener(view -> finish());
}
public static void startAction(Context context, String num) {
Intent intent = new Intent(context, KeyPersonDetailActivity.class);
intent.putExtra("sfzh", num);
context.startActivity(intent);
}
private void setText(TextView view, String str) {
if (UiUtils.isNotEmpty(str)) {
view.setText(str);
} else {
view.setText("");
}
}
}

View File

@ -0,0 +1,71 @@
package com.police.policedatasystem.activity;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.google.gson.Gson;
import com.police.policedatasystem.MyApplication;
import com.police.policedatasystem.databinding.ActivityPoliceEmergencyDetailBinding;
import com.police.policedatasystem.model.PoliceEmergencyDetail;
import com.police.policedatasystem.util.Constants;
import com.police.policedatasystem.util.UiUtils;
/**
* 警情详情页面
*/
public class PoliceEmergencyDetailActivity extends Activity {
private ActivityPoliceEmergencyDetailBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityPoliceEmergencyDetailBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
binding.wm.setTextSize(50);
binding.wm.setText(Constants.SFZH);
binding.ivBack.setOnClickListener(view -> finish());
PoliceEmergencyDetail detail = new Gson().fromJson(getIntent().getStringExtra("param"), PoliceEmergencyDetail.class);
if (UiUtils.isNotEmpty(detail.getZp())) {
Glide.with(MyApplication.getInstance()).asBitmap().load(detail.getZp()).into(binding.ivZp);
}
setText(binding.tvJcjbh, detail.getJcjbh());//报警编号
setText(binding.tvBjjyqk, detail.getBjjyqk());//报警内容
setText(binding.tvBjrlxdh, detail.getBjrlxdh());//报警电话
setText(binding.tvJjsj, UiUtils.formatTime(detail.getJjsj()));//报警时间
setText(binding.tvAsjfsdddzmc, detail.getAsjfsdddzmc());//报警位置
setText(binding.tvCjdwgajgjgdm, detail.getCjdwgajgjgdm());//出警单位
setText(binding.tvCjrxm, detail.getCjrxm());//出警民警
setText(binding.tvBq, detail.getBq());//标签
setText(binding.tvJg, detail.getJg());//籍贯
setText(binding.tvXm, detail.getXm());//姓名
setText(binding.tvXb, detail.getXb());//性别
setText(binding.tvMz, detail.getMz());//民族
setText(binding.tvHyzk, detail.getHyzk());//婚姻状况
setText(binding.tvSfzh, detail.getBjrzjhm());//身份证号
setText(binding.tvNl, detail.getNl());//年龄
setText(binding.tvFwcs, detail.getFwcs());//服务场所
setText(binding.tvLsbjcs, detail.getLsbjcs());//历史报警次数
setText(binding.tvJqlb, detail.getJqlb());//警情类别
setText(binding.tvCllb, detail.getCllx());//处理类型
setText(binding.tvCljg, detail.getCljg());//处理结果
}
public static void startAction(Context context, String num) {
Intent intent = new Intent(context, PoliceEmergencyDetailActivity.class);
intent.putExtra("param", num);
context.startActivity(intent);
}
private void setText(TextView view, String str) {
if (UiUtils.isNotEmpty(str)) {
view.setText(str);
} else {
view.setText("");
}
}
}

View File

@ -0,0 +1,43 @@
package com.police.policedatasystem.activity;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.TextView;
public class RotatedTextView extends TextView {
private float rotationAngle=300; // 旋转角度
public RotatedTextView(Context context) {
super(context);
}
public RotatedTextView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public RotatedTextView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
// 设置旋转角度
public void setRotationAngle(float angle) {
this.rotationAngle = angle;
invalidate(); // 重新绘制
}
@Override
protected void onDraw(Canvas canvas) {
int width = getWidth();
int height = getHeight();
int centerX = width / 10;
int centerY = height / 3;
canvas.save(); // 保存当前画布状态
canvas.translate(centerX, centerY); // 将坐标原点移动到中心点
canvas.rotate(rotationAngle, centerX, centerY); // 旋转画布
super.onDraw(canvas); // 绘制原始的TextView
canvas.restore(); // 恢复画布状态
}
}

View File

@ -0,0 +1,35 @@
package com.police.policedatasystem.adapter;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.police.policedatasystem.MyApplication;
import com.police.policedatasystem.R;
import com.police.policedatasystem.model.KeyPerson;
import com.police.policedatasystem.util.UiUtils;
public class KeyPersonAdapter extends BaseQuickAdapter<KeyPerson, BaseViewHolder> {
public KeyPersonAdapter() {
super(R.layout.item_key_person); // 指定列表项的布局
}
@Override
protected void convert(BaseViewHolder helper, KeyPerson item) {
helper.setText(R.id.item_name, item.getXm());
helper.setText(R.id.item_sfzh, item.getSfzh());
helper.setText(R.id.item_gklb, item.getGklb());
helper.setText(R.id.item_qtlb, item.getQtlb());
helper.setText(R.id.item_zrmj, item.getZrmj());
if (UiUtils.isNotEmpty(item.getZp())) {
Glide.with(MyApplication.getInstance())
.asBitmap()
.load(item.getZp())
.into((ImageView) helper.getView(R.id.iv_photo));
} else {
helper.setImageResource(R.id.iv_photo, R.drawable.photo);
}
}
}

View File

@ -0,0 +1,23 @@
package com.police.policedatasystem.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.police.policedatasystem.R;
import com.police.policedatasystem.model.PoliceEmergency;
import com.police.policedatasystem.util.UiUtils;
public class PoliceEmergencyAdapter extends BaseQuickAdapter<PoliceEmergency, BaseViewHolder> {
public PoliceEmergencyAdapter() {
super(R.layout.item_police_emergency); // 指定列表项的布局
}
@Override
protected void convert(BaseViewHolder helper, PoliceEmergency item) {
helper.setText(R.id.tv_police_num_title, "警情编号:"+item.getJcjbh());//警情编号
helper.setText(R.id.item_content, item.getBjjyqk());//报警内容
helper.setText(R.id.tv_police_tel, item.getBjrlxdh());//报警电话
helper.setText(R.id.tv_police_time, UiUtils.formatTime(item.getJjsj()));//报警时间
helper.setText(R.id.tv_police_loc, item.getAsjfsdddzmc());//报警地址
}
}

View File

@ -0,0 +1,99 @@
package com.police.policedatasystem.fragment;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.police.policedatasystem.R;
import com.police.policedatasystem.databinding.FragmentApplyBinding;
public class ApplyFragment extends Fragment {
private FragmentApplyBinding binding;
private PopupWindow popupWindow;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = FragmentApplyBinding.inflate(inflater);
initView();
return binding.getRoot();
}
private void initView() {
setPopupWindow();
binding.typeGroup.setOnClickListener(view -> {
popupWindow.setWidth(binding.typeGroup.getWidth());
popupWindow.showAsDropDown(binding.typeGroup);
});
}
private void setPopupWindow() {
// 初始化 PopupWindow
popupWindow = new PopupWindow(getContext());
// 加载自定义布局
LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View contentView = inflater.inflate(R.layout.dropdown_layout4, null);
// 设置 PopupWindow 的宽高
popupWindow.setWidth(LinearLayout.LayoutParams.MATCH_PARENT);
popupWindow.setBackgroundDrawable(getResources().getDrawable(R.drawable.all_7_fff_bg));
popupWindow.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);
// 设置 PopupWindow 的背景
// popupWindow.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
// 设置 PopupWindow 显示的位置相对于按钮
popupWindow.showAtLocation(binding.typeGroup, Gravity.NO_GRAVITY, 0, 0);
// 为每个菜单项设置点击事件
TextView textView1 = contentView.findViewById(R.id.textView1); // 假设这是菜单项1的ID
TextView textView2 = contentView.findViewById(R.id.textView2); // 假设这是菜单项2的ID
TextView textView3 = contentView.findViewById(R.id.textView3); // 假设这是菜单项2的ID
TextView textView4 = contentView.findViewById(R.id.textView4); // 假设这是菜单项2的ID
TextView textView5 = contentView.findViewById(R.id.textView5); // 假设这是菜单项2的ID
TextView textView6 = contentView.findViewById(R.id.textView6); // 假设这是菜单项2的ID
textView1.setOnClickListener(v -> {
// 处理菜单项 1 的点击事件
binding.tvApplySearchTitle.setText("处置警情");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView2.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvApplySearchTitle.setText("处置案情");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView3.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvApplySearchTitle.setText("管控重点人");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView4.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvApplySearchTitle.setText("追踪逃犯");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView5.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvApplySearchTitle.setText("核查线索");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView6.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvApplySearchTitle.setText("核验信息");
popupWindow.dismiss(); // 关闭 PopupWindow
});
// 将自定义布局设置为 PopupWindow 的内容视图
popupWindow.setContentView(contentView);
// 设置 PopupWindow 的焦点
popupWindow.setFocusable(true);
popupWindow.setOutsideTouchable(true); // 设置点击 PopupWindow 外部区域使其消失
}
}

View File

@ -0,0 +1,415 @@
package com.police.policedatasystem.fragment;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.police.policedatasystem.R;
import com.police.policedatasystem.adapter.KeyPersonAdapter;
import com.police.policedatasystem.adapter.PoliceEmergencyAdapter;
import com.police.policedatasystem.databinding.FragmentDataBinding;
import com.police.policedatasystem.indexActivity;
import com.police.policedatasystem.model.KeyPerson;
import com.police.policedatasystem.model.PoliceEmergency;
import com.police.policedatasystem.viewmodel.DataViewModel;
import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.ClassicsHeader;
import java.util.ArrayList;
import java.util.List;
public class DataFragment extends Fragment {
public FragmentDataBinding binding;
private DataViewModel viewModel;
private PopupWindow popupWindow;
private PopupWindow popupWindow2;
private PopupWindow popupWindow3;
public final List<KeyPerson> personList = new ArrayList<>();
public final List<PoliceEmergency> policeList = new ArrayList<>();
public BaseQuickAdapter adapter;
private int currentTabBar = 1;
private int currentTab = 1;
public int filterType = 0;
indexActivity act;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = FragmentDataBinding.inflate(inflater);
initView();
Activity activity = getActivity();
if (activity instanceof indexActivity) {
act = (indexActivity) activity;
}
viewModel = new DataViewModel(this, act);
initListener();
return binding.getRoot();
}
private void initView() {
binding.refreshLayout.setRefreshHeader(new ClassicsHeader(getContext()));
binding.refreshLayout.setRefreshFooter(new ClassicsFooter(getContext()));
binding.rvGroup.setLayoutManager(new LinearLayoutManager(getContext()));
keyPersonInitAdapter();
setPopupWindow();
setPopupWindow2();
setPopupWindow3();
}
public void initData() {
viewModel.keyPersonInit();
viewModel.getKeyPersonMessageCount();
}
@Override
public void onResume() {
super.onResume();
if (!act.findAddress) {
act.requestClient.init();
} else {
initData();
}
}
private void initListener() {
//重点人案情案件点击事件
binding.llKeyPerson.setOnClickListener(view -> tabBarOnClick(1));
binding.llPoliceEmergency.setOnClickListener(view -> tabBarOnClick(2));
binding.llCaseDetails.setOnClickListener(view -> tabBarOnClick(3));
//搜索按钮添加点击事件
binding.tvSearchBtn.setOnClickListener(view -> {
if (!act.findAddress) return;
if (currentTabBar == 1) {
if (currentTab == 1) {
viewModel.keyPersonInit();
} else {
viewModel.orgKeyPersonInit();
}
} else if (currentTabBar == 2) {
viewModel.policeEmergencyInit();
}
});
//我的重点人与区域重点人tab点击切换事件
binding.llMyKeyPerson.setOnClickListener(view -> tabOnClick(1));
binding.llAreaKeyPerson.setOnClickListener(view -> tabOnClick(2));
//loading视图设置空的点击事件
binding.rlLoading.setOnClickListener(view -> {
});
//筛选文字下拉菜单按钮点击事件
binding.typeGroup.setOnClickListener(view -> {
if (!act.findAddress) return;
if (currentTabBar == 1) {
popupWindow.showAsDropDown(binding.typeGroup);
} else if (currentTabBar == 2) {
popupWindow2.showAsDropDown(binding.typeGroup);
} else {
popupWindow3.showAsDropDown(binding.typeGroup);
}
});
//重点人列表条目点击事件
adapter.setOnItemClickListener((adapter1, view, position) -> viewModel.keyPersonDetail(personList.get(position).getSfzh()));
//刷新列表
binding.refreshLayout.setOnRefreshListener(refreshlayout -> {
if (currentTabBar == 1) {
if (currentTab == 1) {
viewModel.keyPersonRefresh();
} else {
viewModel.orgKeyPersonRefresh();
}
return;
}
if (currentTabBar == 2) {
viewModel.policeEmergencyRefresh();
return;
}
if (currentTabBar == 3) {
if (currentTab == 1) {
viewModel.keyPersonRefresh();
} else {
viewModel.orgKeyPersonRefresh();
}
}
});
//加载更多
binding.refreshLayout.setOnLoadMoreListener(refreshlayout -> {
if (currentTabBar == 1) {
if (currentTab == 1) {
viewModel.keyPersonLoadMore();
} else {
viewModel.orgKeyPersonLoadMore();
}
return;
}
if (currentTabBar == 2) {
viewModel.policeEmergencyLoadMore();
}
});
}
private void keyPersonInitAdapter() {
adapter = new KeyPersonAdapter();
adapter.setNewInstance(personList);
binding.rvGroup.setAdapter(adapter);
adapter.setOnItemClickListener((adapter1, view, position) -> viewModel.keyPersonDetail(personList.get(position).getSfzh()));
}
private void policeEmergencyInitAdapter() {
adapter = new PoliceEmergencyAdapter();
adapter.setNewInstance(policeList);
binding.rvGroup.setAdapter(adapter);
adapter.setOnItemClickListener((adapter1, view, position) -> viewModel.policeEmergencyDetail(policeList.get(position).getJcjbh()));
}
/**
* tab按钮点击切换
*
* @param i
*/
private void tabOnClick(int i) {
//如果点击tab与当前的一致当前点击事件无效.
if (currentTab == i) return;
currentTab = i;
//清空搜索框内容
binding.etInput.setText("");
//切换效果设置
binding.tvAreaKeyPerson.setTextColor(getResources().getColor(R.color.color_666));
binding.selectAreaKeyPerson.setBackgroundColor(getResources().getColor(R.color.transparent_color));
binding.tvMyKeyPerson.setTextColor(getResources().getColor(R.color.color_666));
binding.selectMyKeyPerson.setBackgroundColor(getResources().getColor(R.color.transparent_color));
if (i == 1) {
binding.tvMyKeyPerson.setTextColor(getResources().getColor(R.color.selected_color));
binding.selectMyKeyPerson.setBackgroundColor(getResources().getColor(R.color.selected_color));
} else {
binding.tvAreaKeyPerson.setTextColor(getResources().getColor(R.color.selected_color));
binding.selectAreaKeyPerson.setBackgroundColor(getResources().getColor(R.color.selected_color));
}
if (currentTabBar == 1) {
if (currentTab == 1) {
//加载我的重点人
viewModel.keyPersonInit();
} else {
viewModel.orgKeyPersonInit();
}
}
}
/**
* 顶部tabBar切换
*
* @param i
*/
private void tabBarOnClick(int i) {
if (currentTabBar == i) return;
currentTabBar = i;
binding.etInput.setText("");
binding.iconKeyPerson.setBackgroundResource(R.drawable.mine_icon);
binding.tvKeyPerson.setTextColor(getResources().getColor(R.color.black));
binding.selectKeyPerson.setBackgroundColor(getResources().getColor(R.color.white));
binding.iconPoliceEmergency.setBackgroundResource(R.drawable.huizhang_icon);
binding.tvPoliceEmergency.setTextColor(getResources().getColor(R.color.black));
binding.selectPoliceEmergency.setBackgroundColor(getResources().getColor(R.color.white));
binding.iconCaseDetails.setBackgroundResource(R.drawable.wenjianjia_icon);
binding.tvCaseDetails.setTextColor(getResources().getColor(R.color.black));
binding.selectCaseDetails.setBackgroundColor(getResources().getColor(R.color.white));
filterType = 0;
switch (i) {
case 1:
binding.iconKeyPerson.setBackgroundResource(R.drawable.mine_normal);
binding.tvKeyPerson.setTextColor(getResources().getColor(R.color.selected_color));
binding.selectKeyPerson.setBackgroundColor(getResources().getColor(R.color.selected_color));
binding.tvSearchTitle.setText("姓名");
keyPersonInitAdapter();
if (currentTab == 1) {
viewModel.keyPersonInit();
} else {
viewModel.orgKeyPersonInit();
}
binding.tvMyKeyPerson.setText("我的重点人");
binding.tvAreaKeyPerson.setText("辖区(警种)重点人");
binding.tabGroup.setVisibility(View.VISIBLE);
break;
case 2:
binding.iconPoliceEmergency.setBackgroundResource(R.drawable.huizhang);
binding.tvPoliceEmergency.setTextColor(getResources().getColor(R.color.selected_color));
binding.selectPoliceEmergency.setBackgroundColor(getResources().getColor(R.color.selected_color));
binding.tvSearchTitle.setText("警情编号");
policeEmergencyInitAdapter();
viewModel.policeEmergencyInit();
binding.tabGroup.setVisibility(View.GONE);
break;
default:
binding.iconCaseDetails.setBackgroundResource(R.drawable.wenjianjia);
binding.tvCaseDetails.setTextColor(getResources().getColor(R.color.selected_color));
binding.selectCaseDetails.setBackgroundColor(getResources().getColor(R.color.selected_color));
binding.tvSearchTitle.setText("案件编号");
binding.tvMyKeyPerson.setText("在办案件");
binding.tvAreaKeyPerson.setText("历史案件");
binding.tabGroup.setVisibility(View.GONE);
loadCase(new ArrayList<>());
}
}
/**
* 加载案情布局
*/
public void loadCase(List<KeyPerson> data) {
KeyPersonAdapter adapter = new KeyPersonAdapter();
adapter.setNewInstance(data);
binding.rvGroup.setLayoutManager(new LinearLayoutManager(getContext()));
binding.rvGroup.setAdapter(adapter);
adapter.setOnItemClickListener((adapter1, view, position) -> {
viewModel.keyPersonDetail(data.get(position).getSfzh());
});
}
public void loadingShow() {
getActivity().runOnUiThread(() -> binding.rlLoading.setVisibility(View.VISIBLE));
}
public void loadingNone() {
getActivity().runOnUiThread(() -> binding.rlLoading.setVisibility(View.GONE));
}
private void setPopupWindow() {
// 初始化 PopupWindow
popupWindow = new PopupWindow(getContext());
// 加载自定义布局
LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View contentView = inflater.inflate(R.layout.dropdown_layout, null);
// 设置 PopupWindow 的宽高
popupWindow.setWidth(LinearLayout.LayoutParams.WRAP_CONTENT);
popupWindow.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);
// 设置 PopupWindow 的背景
popupWindow.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
// 设置 PopupWindow 显示的位置相对于按钮
popupWindow.showAtLocation(binding.typeGroup, Gravity.NO_GRAVITY, 0, 0);
// 为每个菜单项设置点击事件
TextView textView1 = contentView.findViewById(R.id.textView1); // 假设这是菜单项1的ID
TextView textView2 = contentView.findViewById(R.id.textView2); // 假设这是菜单项2的ID
textView1.setOnClickListener(v -> {
// 处理菜单项 1 的点击事件
binding.tvSearchTitle.setText("姓名");
filterType = 0;
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView2.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvSearchTitle.setText("身份证号");
filterType = 1;
popupWindow.dismiss(); // 关闭 PopupWindow
});
// 将自定义布局设置为 PopupWindow 的内容视图
popupWindow.setContentView(contentView);
// 设置 PopupWindow 的焦点
popupWindow.setFocusable(true);
popupWindow.setOutsideTouchable(true); // 设置点击 PopupWindow 外部区域使其消失
}
private void setPopupWindow2() {
// 初始化 PopupWindow
popupWindow2 = new PopupWindow(getContext());
// 加载自定义布局
LayoutInflater inflater2 = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View contentView2 = inflater2.inflate(R.layout.dropdown_layout2, null);
// 设置 PopupWindow 的宽高
popupWindow2.setWidth(LinearLayout.LayoutParams.WRAP_CONTENT);
popupWindow2.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);
// 设置 PopupWindow 的背景
popupWindow2.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
// 设置 PopupWindow 显示的位置相对于按钮
popupWindow2.showAtLocation(binding.typeGroup, Gravity.NO_GRAVITY, 0, 0);
// 为每个菜单项设置点击事件
TextView textView3 = contentView2.findViewById(R.id.textView3); // 假设这是菜单项1的ID
TextView textView4 = contentView2.findViewById(R.id.textView4); // 假设这是菜单项2的ID
TextView textView5 = contentView2.findViewById(R.id.textView5); // 假设这是菜单项2的ID
textView3.setOnClickListener(v -> {
// 处理菜单项 1 的点击事件
binding.tvSearchTitle.setText("警情编号");
filterType = 0;
popupWindow2.dismiss(); // 关闭 PopupWindow
});
textView4.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvSearchTitle.setText("报警内容");
filterType = 1;
popupWindow2.dismiss(); // 关闭 PopupWindow
});
textView5.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvSearchTitle.setText("报警电话");
filterType = 2;
popupWindow2.dismiss(); // 关闭 PopupWindow
});
// 将自定义布局设置为 PopupWindow 的内容视图
popupWindow2.setContentView(contentView2);
// 设置 PopupWindow 的焦点
popupWindow2.setFocusable(true);
popupWindow2.setOutsideTouchable(true); // 设置点击 PopupWindow 外部区域使其消失
}
private void setPopupWindow3() {
// 初始化 PopupWindow
popupWindow3 = new PopupWindow(getContext());
// 加载自定义布局
LayoutInflater inflater2 = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View contentView2 = inflater2.inflate(R.layout.dropdown_layout3, null);
// 设置 PopupWindow 的宽高
popupWindow3.setWidth(LinearLayout.LayoutParams.WRAP_CONTENT);
popupWindow3.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);
// 设置 PopupWindow 的背景
popupWindow3.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
// 设置 PopupWindow 显示的位置相对于按钮
popupWindow3.showAtLocation(binding.typeGroup, Gravity.NO_GRAVITY, 0, 0);
// 为每个菜单项设置点击事件
TextView textView6 = contentView2.findViewById(R.id.textView6); // 假设这是菜单项1的ID
TextView textView7 = contentView2.findViewById(R.id.textView7); // 假设这是菜单项2的ID
TextView textView8 = contentView2.findViewById(R.id.textView8); // 假设这是菜单项2的ID
TextView textView9 = contentView2.findViewById(R.id.textView9); // 假设这是菜单项2的ID
textView6.setOnClickListener(v -> {
// 处理菜单项 1 的点击事件
binding.tvSearchTitle.setText("案件编号");
filterType = 0;
popupWindow3.dismiss(); // 关闭 PopupWindow
});
textView7.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvSearchTitle.setText("案件名称");
filterType = 1;
popupWindow3.dismiss(); // 关闭 PopupWindow
});
textView8.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvSearchTitle.setText("嫌疑人姓名");
filterType = 3;
popupWindow3.dismiss(); // 关闭 PopupWindow
});
textView9.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvSearchTitle.setText("受害人姓名");
filterType = 4;
popupWindow3.dismiss(); // 关闭 PopupWindow
});
// 将自定义布局设置为 PopupWindow 的内容视图
popupWindow3.setContentView(contentView2);
// 设置 PopupWindow 的焦点
popupWindow3.setFocusable(true);
popupWindow3.setOutsideTouchable(true); // 设置点击 PopupWindow 外部区域使其消失
}
}

View File

@ -0,0 +1,91 @@
package com.police.policedatasystem.fragment;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.police.policedatasystem.R;
import com.police.policedatasystem.databinding.FragmentMineBinding;
public class MineFragment extends Fragment {
private FragmentMineBinding binding;
private PopupWindow popupWindow;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = FragmentMineBinding.inflate(inflater);
initView();
return binding.getRoot();
}
private void initView() {
setPopupWindow();
binding.mineTypeGroup.setOnClickListener(view -> {
popupWindow.setWidth(binding.mineTypeGroup.getWidth());
popupWindow.showAsDropDown(binding.mineTypeGroup);
});
}
private void setPopupWindow() {
// 初始化 PopupWindow
popupWindow = new PopupWindow(getContext());
// 加载自定义布局
LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View contentView = inflater.inflate(R.layout.dropdown_layout5, null);
// 设置 PopupWindow 的宽高
popupWindow.setWidth(LinearLayout.LayoutParams.MATCH_PARENT);
popupWindow.setBackgroundDrawable(getResources().getDrawable(R.drawable.all_7_fff_bg));
popupWindow.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);
// 设置 PopupWindow 的背景
// popupWindow.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
// 设置 PopupWindow 显示的位置相对于按钮
popupWindow.showAtLocation(binding.mineTypeGroup, Gravity.NO_GRAVITY, 0, 0);
// 为每个菜单项设置点击事件
TextView textView1 = contentView.findViewById(R.id.textView1); // 假设这是菜单项1的ID
TextView textView2 = contentView.findViewById(R.id.textView2); // 假设这是菜单项2的ID
TextView textView3 = contentView.findViewById(R.id.textView3); // 假设这是菜单项2的ID
TextView textView4 = contentView.findViewById(R.id.textView4); // 假设这是菜单项2的ID
TextView textView5 = contentView.findViewById(R.id.textView5); // 假设这是菜单项2的ID
textView1.setOnClickListener(v -> {
// 处理菜单项 1 的点击事件
binding.tvMineSearchTitle.setText("赋能编码");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView2.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvMineSearchTitle.setText("申请事由");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView3.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvMineSearchTitle.setText("申请时间");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView4.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvMineSearchTitle.setText("信息来源");
popupWindow.dismiss(); // 关闭 PopupWindow
});
textView5.setOnClickListener(v -> {
// 处理菜单项 2 的点击事件
binding.tvMineSearchTitle.setText("办理状态");
popupWindow.dismiss(); // 关闭 PopupWindow
});
// 将自定义布局设置为 PopupWindow 的内容视图
popupWindow.setContentView(contentView);
// 设置 PopupWindow 的焦点
popupWindow.setFocusable(true);
popupWindow.setOutsideTouchable(true); // 设置点击 PopupWindow 外部区域使其消失
}
}

View File

@ -0,0 +1,40 @@
package com.police.policedatasystem.http;
import androidx.annotation.NonNull;
import okhttp3.Call;
public abstract class CustomCallBack<T> {
public abstract void onError(Call call, @NonNull Exception e);
public abstract void onSuccess(T value);
// @Override
// public void onFailure(@NonNull Call call, @NonNull IOException e) {
// onError(call, e);
// }
//
// @Override
// public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {
// if (!response.isSuccessful()) {
// onError(call, new IOException("Unexpected code " + response));
// return;
// }
// try {
// ResponseParams responseParams = new Gson().fromJson(response.body().string(), ResponseParams.class);
// if ("200".equals(responseParams.getCode())) {
// for (ResponseParams.FieldData item : responseParams.getData().getDataList()) {
// for (ResponseParams.FieldValues i : item.getFieldValues()) {
//// new Gson().fromJson()
//// onSuccess(i.getValue());
// }
// }
// } else {
// onError(call, new IOException(responseParams.getMessage()));
// }
// } catch (Exception e) {
// onError(call, new IOException("Unexpected code " + response));
// }
// }
}

View File

@ -0,0 +1,593 @@
package com.police.policedatasystem.http;
import static com.police.policedatasystem.util.UaCredentialApi.PARAMS_KEY_UA_APP_CREDENTIAL;
import static com.police.policedatasystem.util.UaCredentialApi.PARAMS_KEY_UA_RET_CODE;
import static com.police.policedatasystem.util.UaCredentialApi.PARAMS_KEY_UA_RET_SUCCESS;
import static com.police.policedatasystem.util.UaCredentialApi.PARAMS_KEY_UA_USER_CREDENTIAL;
import android.net.Uri;
import android.os.Bundle;
import androidx.annotation.NonNull;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.police.policedatasystem.MyApplication;
import com.police.policedatasystem.http.requestparams.GetKeyPersonDetailParams;
import com.police.policedatasystem.http.requestparams.GetKeyPersonListParams;
import com.police.policedatasystem.http.requestparams.GetKeyPersonMessageCountParams;
import com.police.policedatasystem.http.requestparams.GetOrgKeyPersonListParams;
import com.police.policedatasystem.http.requestparams.GetPoliceEmergencyDetailParams;
import com.police.policedatasystem.http.requestparams.GetPoliceEmergencyListParams;
import com.police.policedatasystem.http.requestparams.RequestParams;
import com.police.policedatasystem.http.requestparams.ResponseParams;
import com.police.policedatasystem.indexActivity;
import com.police.policedatasystem.model.DataCount;
import com.police.policedatasystem.model.KeyPerson;
import com.police.policedatasystem.model.KeyPersonDetail;
import com.police.policedatasystem.model.PoliceEmergency;
import com.police.policedatasystem.model.PoliceEmergencyDetail;
import com.police.policedatasystem.model.ResourceList;
import com.police.policedatasystem.model.UserCredential;
import com.police.policedatasystem.util.Constants;
import com.police.policedatasystem.util.UiUtils;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.logging.HttpLoggingInterceptor;
public class RequestClient {
private final indexActivity activity;
private OkHttpClient okHttpClient;
public RequestClient(indexActivity activity) {
this.activity = activity;
}
/*
*/
private void call(String url, RequestParams params, Callback callback) {
try {
RequestBody body = RequestBody.create(new Gson().toJson(params), MediaType.parse("application/json; charset=utf-8"));
Request request = new Request.Builder()
.url(url)
.post(body)
.addHeader("userCredential", URLEncoder.encode(Constants.USER_CREDENTIAL, "UTF-8"))
.addHeader("appCredential", URLEncoder.encode(Constants.APP_CREDENTIAL, "UTF-8"))
.build();
okHttpClient.newCall(request).enqueue(callback);
} catch (Exception e) {
e.printStackTrace();
}
}
public void init() {
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); // 设置日志级别例如打印请求和响应的body
okHttpClient = new OkHttpClient.Builder()
.addInterceptor(loggingInterceptor) // 添加日志拦截器
.callTimeout(30, TimeUnit.SECONDS)
.connectTimeout(30, TimeUnit.SECONDS)
.build();
//获取接口需要用到的凭证
getInterface();
}
//获取接口需要用到的凭证
private void getInterface() {
Uri uri = Uri.parse("content://com.ydjw.ua.getCredential");
Bundle params = new Bundle();
String paramsMessageId = UiUtils.uuid();
//构建参数
params.putString("messageId", paramsMessageId);//消息id
params.putString("version", "1");//接口版本号当前为1
params.putString("appId", Constants.APP_ID);//
params.putString("orgId", Constants.ORG_ID);//
params.putString("networkAreaCode", "3");//
params.putString("packageName", "com.police.policedatasystem");//应用包名可空
//获取票据
Bundle bundle = MyApplication.getInstance().getContentResolver().call(uri, "", null, params);
//解析结果
if (bundle == null) {
UiUtils.toast("获取应用凭证失败bundle为空");
return;
}
String messageId = bundle.getString("messageId");
if (paramsMessageId.equals(messageId)) {
int resultCode = bundle.getInt(PARAMS_KEY_UA_RET_CODE);
if (PARAMS_KEY_UA_RET_SUCCESS == resultCode) {
Constants.APP_CREDENTIAL = bundle.getString(PARAMS_KEY_UA_APP_CREDENTIAL);
Constants.USER_CREDENTIAL = bundle.getString(PARAMS_KEY_UA_USER_CREDENTIAL);
Constants.USER_ID = new Gson().fromJson(Constants.USER_CREDENTIAL, UserCredential.class).getCredential().getLoad().getUserInfo().getJh();
Constants.SFZH = new Gson().fromJson(Constants.USER_CREDENTIAL, UserCredential.class).getCredential().getLoad().getUserInfo().getSfzh();
Constants.USER_ORG_ID = new Gson().fromJson(Constants.USER_CREDENTIAL, UserCredential.class).getCredential().getLoad().getUserInfo().getOrgId();
//根据票据寻址
findAddress();
} else {
UiUtils.toast(bundle.getString("message") + ",resultCode:" + resultCode);
}
} else {
UiUtils.toast("获取应用凭证失败messageId不一致");
}
}
//第二步寻址
private void findAddress() {
Thread thread = new Thread(() -> {
// 在这里执行耗时任务
Uri uri = Uri.parse("content://com.ydjw.rsb.getResourceAddress");
Bundle bundle = new Bundle();
String paramsMessageId = UiUtils.uuid();
bundle.putString("appCredential", Constants.APP_CREDENTIAL);//应用凭证由上一步获得
bundle.putString("userCredential", Constants.USER_CREDENTIAL);//用户凭证由上一步获得
bundle.putString("version", "1");//服务总线接口版本号当前为1
bundle.putString("messageId", paramsMessageId);//消息 ID
Bundle callBack = MyApplication.getInstance().getContentResolver().call(uri, "", null, bundle);
if (callBack == null) {
UiUtils.toast("获取应用资源地址失败,bundle为空");
return;
}
String messageId = callBack.getString("messageId");
String resourceList = callBack.getString("resourceList");
if (paramsMessageId.equals(messageId)) {
int resultCode = callBack.getInt("resultCode");
if (resultCode == 0) {
if (UiUtils.isEmpty(resourceList)) {
UiUtils.toast("寻址失败resourceList为空");
return;
}
List<ResourceList> resourceLists = new Gson().fromJson(resourceList, new TypeToken<List<ResourceList>>() {
}.getType());
for (ResourceList item : resourceLists) {
Constants.resourceListsMap.put(item.getResourceId(), item);
}
//2.发起请求获取重点人数据
activity.initData();
} else {
if (UiUtils.isEmpty(resourceList)) {
UiUtils.toast("寻址失败,错误码:" + resultCode);
}
}
}
});
thread.start();
}
/**
* 获取重点人
*
* @param params 参数对象
* @param callback 回调函数
*/
public void getKeyPerson(GetKeyPersonListParams params, CustomCallBack<List<KeyPerson>> callback) {
ResourceList resourceList = Constants.resourceListsMap.get(Constants.KEY_PERSON_ID);
RequestParams.Condition condition = new RequestParams.Condition();
condition.setLogicalOperate("and");
RequestParams.KeyValues keyValues = new RequestParams.KeyValues();
keyValues.setKey("injson");
params.setJybh(Constants.USER_ID);
params.setSfhm(Constants.SFZH);
params.setPageSize(Constants.PAGE_SIZE + "");
keyValues.setValue(new Gson().toJson(params));
List<RequestParams.KeyValues> keyValuesList = new ArrayList<>();
keyValuesList.add(keyValues);
condition.setKeyValueList(keyValuesList);
RequestParams.Parameter parameter = new RequestParams.Parameter();
parameter.setCondition(condition);
parameter.setPage(new RequestParams.Page());
parameter.setFields("outjson");
parameter.setNetworkCode("3");
parameter.setOrderBy(null);
parameter.setRegionalismCode(Constants.ORG_ID);
parameter.setDataObjId(Constants.KEY_PERSON_ID);
RequestParams requestParams = new RequestParams();
requestParams.setMessageId(UiUtils.uuid());
requestParams.setVersion("1.0");
requestParams.setParameter(parameter);
if (resourceList == null) return;
call(resourceList.getResourceAddress(), requestParams, new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
activity.runOnUiThread(() -> callback.onError(call, e));
// 请求失败
e.printStackTrace();
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) {
try {
// 请求成功处理响应数据
String responseBody = response.body().string();
activity.runOnUiThread(() -> {
if (!response.isSuccessful()) {
callback.onError(call, new IOException("Unexpected code " + response));
return;
}
ResponseParams responseParams = new Gson().fromJson(responseBody, ResponseParams.class);
if ("200".equals(responseParams.getCode())) {
for (ResponseParams.FieldData item : responseParams.getData().getDataList()) {
for (ResponseParams.FieldValues i : item.getFieldValues()) {
List<KeyPerson> keyPersonList = new Gson().fromJson(i.getValue(), new TypeToken<List<KeyPerson>>() {
}.getType());
callback.onSuccess(keyPersonList);
}
}
} else {
callback.onError(call, new IOException(responseParams.getMessage()));
}
});
} catch (Exception e) {
callback.onError(call, e);
e.printStackTrace();
}
}
});
}
/**
* 获取组织重点人数据
*
* @param params 搜索关键字姓名
* @param callBack 回调函数
*/
public void getOrgKeyPerson(GetOrgKeyPersonListParams params, CustomCallBack<List<KeyPerson>> callBack) {
ResourceList resourceList = Constants.resourceListsMap.get(Constants.ORG_KEY_PERSON_ID);
RequestParams.Condition condition = new RequestParams.Condition();
condition.setLogicalOperate("and");
RequestParams.KeyValues keyValues = new RequestParams.KeyValues();
keyValues.setKey("injson");
params.setSfhm(Constants.SFZH);
params.setDept(Constants.USER_ORG_ID);
params.setPageSize(Constants.PAGE_SIZE + "");
keyValues.setValue(new Gson().toJson(params));
List<RequestParams.KeyValues> keyValuesList = new ArrayList<>();
keyValuesList.add(keyValues);
condition.setKeyValueList(keyValuesList);
RequestParams.Parameter parameter = new RequestParams.Parameter();
parameter.setCondition(condition);
parameter.setPage(new RequestParams.Page());
parameter.setFields("outjson");
parameter.setNetworkCode("3");
parameter.setOrderBy(null);
parameter.setRegionalismCode(Constants.ORG_ID);
parameter.setDataObjId(Constants.ORG_KEY_PERSON_ID);
RequestParams requestParams = new RequestParams();
requestParams.setMessageId(UiUtils.uuid());
requestParams.setVersion("1.0");
requestParams.setParameter(parameter);
if (resourceList == null) {
callBack.onError(null, new Exception("寻址数据为空"));
return;
}
call(resourceList.getResourceAddress(), requestParams, new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
activity.runOnUiThread(() -> callBack.onError(call, e));
// 请求失败
e.printStackTrace();
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) {
if (!response.isSuccessful()) {
activity.runOnUiThread(() -> callBack.onError(call, new IOException("Unexpected code " + response)));
return;
}
try {
// 请求成功处理响应数据
String responseBody = response.body().string();
activity.runOnUiThread(() -> {
ResponseParams responseParams = new Gson().fromJson(responseBody, ResponseParams.class);
if ("200".equals(responseParams.getCode())) {
for (ResponseParams.FieldData item : responseParams.getData().getDataList()) {
for (ResponseParams.FieldValues i : item.getFieldValues()) {
List<KeyPerson> keyPersonList = new Gson().fromJson(i.getValue(), new TypeToken<List<KeyPerson>>() {
}.getType());
callBack.onSuccess(keyPersonList);
}
}
} else {
callBack.onError(call, new Exception(responseParams.getMessage()));
}
});
} catch (Exception e) {
activity.runOnUiThread(() -> callBack.onError(call, e));
e.printStackTrace();
}
}
});
}
/**
* 获取重点人详情数据
*
* @param str 身份证号
*/
public void keyPersonDetail(String str, CustomCallBack<KeyPersonDetail> callBack) {
ResourceList resourceList = Constants.resourceListsMap.get(Constants.KEY_PERSON_DETAIL_ID);
RequestParams.Condition condition = new RequestParams.Condition();
condition.setLogicalOperate("and");
RequestParams.KeyValues keyValues = new RequestParams.KeyValues();
keyValues.setKey("injson");
GetKeyPersonDetailParams params = new GetKeyPersonDetailParams();
params.setSfzh(str);// params.setSfzh("220104197307276911");
params.setSfhm(Constants.SFZH);
keyValues.setValue(new Gson().toJson(params));
List<RequestParams.KeyValues> keyValuesList = new ArrayList<>();
keyValuesList.add(keyValues);
condition.setKeyValueList(keyValuesList);
RequestParams.Parameter parameter = new RequestParams.Parameter();
parameter.setCondition(condition);
parameter.setPage(new RequestParams.Page());
parameter.setFields("outjson");
parameter.setNetworkCode("3");
parameter.setOrderBy(null);
parameter.setRegionalismCode(Constants.ORG_ID);
parameter.setDataObjId(Constants.KEY_PERSON_DETAIL_ID);
RequestParams requestParams = new RequestParams();
requestParams.setMessageId(UiUtils.uuid());
requestParams.setVersion("1.0");
requestParams.setParameter(parameter);
call(resourceList.getResourceAddress(), requestParams, new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
// 请求失败
e.printStackTrace();
activity.runOnUiThread(() -> callBack.onError(call, e));
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) {
if (!response.isSuccessful()) {
activity.runOnUiThread(() -> callBack.onError(call, new IOException("Unexpected code " + response)));
return;
}
try {
// 请求成功处理响应数据
String responseBody = response.body().string();
ResponseParams responseParams = new Gson().fromJson(responseBody, ResponseParams.class);
if (!"200".equals(responseParams.getCode())) {
activity.runOnUiThread(() -> callBack.onError(call, new Exception("服务器异常,请联系开发人员或稍后重试!")));
return;
}
for (ResponseParams.FieldData item : responseParams.getData().getDataList()) {
for (ResponseParams.FieldValues i : item.getFieldValues()) {
KeyPersonDetail keyPersonDetail = new Gson().fromJson(i.getValue(), KeyPersonDetail.class);
activity.runOnUiThread(() -> callBack.onSuccess(keyPersonDetail));
}
}
} catch (Exception e) {
e.printStackTrace();
activity.runOnUiThread(() -> callBack.onError(call, e));
}
}
});
}
/**
* 获取警情列表数据
*
* @param params 参数
* @param callBack 回调函数
*/
public void getPoliceEmergency(GetPoliceEmergencyListParams params, CustomCallBack<List<PoliceEmergency>> callBack) {
ResourceList resourceList = Constants.resourceListsMap.get(Constants.POLICE_EMERGENCY_ID);
RequestParams.Condition condition = new RequestParams.Condition();
condition.setLogicalOperate("and");
RequestParams.KeyValues keyValues = new RequestParams.KeyValues();
keyValues.setKey("injson");
params.setSfhm(Constants.SFZH);
// params.setSfhm("220104198105200331");
params.setPageSize(Constants.PAGE_SIZE + "");
keyValues.setValue(new Gson().toJson(params));
List<RequestParams.KeyValues> keyValuesList = new ArrayList<>();
keyValuesList.add(keyValues);
condition.setKeyValueList(keyValuesList);
RequestParams.Parameter parameter = new RequestParams.Parameter();
parameter.setCondition(condition);
parameter.setPage(new RequestParams.Page());
parameter.setFields("outjson");
parameter.setNetworkCode("3");
parameter.setOrderBy(null);
parameter.setRegionalismCode(Constants.ORG_ID);
parameter.setDataObjId(Constants.POLICE_EMERGENCY_ID);
RequestParams requestParams = new RequestParams();
requestParams.setMessageId(UiUtils.uuid());
requestParams.setVersion("1.0");
requestParams.setParameter(parameter);
if (resourceList == null) {
callBack.onError(null, new Exception("寻址数据为空"));
return;
}
call(resourceList.getResourceAddress(), requestParams, new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
activity.runOnUiThread(() -> callBack.onError(call, e));
// 请求失败
e.printStackTrace();
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) {
if (!response.isSuccessful()) {
activity.runOnUiThread(() -> callBack.onError(call, new IOException("Unexpected code " + response)));
return;
}
try {
// 请求成功处理响应数据
String responseBody = response.body().string();
activity.runOnUiThread(() -> {
ResponseParams responseParams = new Gson().fromJson(responseBody, ResponseParams.class);
if ("200".equals(responseParams.getCode())) {
for (ResponseParams.FieldData item : responseParams.getData().getDataList()) {
for (ResponseParams.FieldValues i : item.getFieldValues()) {
List<PoliceEmergency> keyPersonList = new Gson().fromJson(i.getValue(), new TypeToken<List<PoliceEmergency>>() {
}.getType());
callBack.onSuccess(keyPersonList);
}
}
} else {
callBack.onError(call, new Exception(responseParams.getMessage()));
}
});
} catch (Exception e) {
activity.runOnUiThread(() -> callBack.onError(call, e));
e.printStackTrace();
}
}
});
}
/**
* 获取重点人详情数据
*
* @param str 身份证号
*/
public void getPoliceEmergencyDetail(String str, CustomCallBack<PoliceEmergencyDetail> callBack) {
ResourceList resourceList = Constants.resourceListsMap.get(Constants.POLICE_EMERGENCY_DETAIL_ID);
RequestParams.Condition condition = new RequestParams.Condition();
condition.setLogicalOperate("and");
RequestParams.KeyValues keyValues = new RequestParams.KeyValues();
keyValues.setKey("injson");
GetPoliceEmergencyDetailParams params = new GetPoliceEmergencyDetailParams();
params.setJcjbh(str);// params.setSfzh("220104197307276911");
params.setSfhm(Constants.SFZH);
keyValues.setValue(new Gson().toJson(params));
List<RequestParams.KeyValues> keyValuesList = new ArrayList<>();
keyValuesList.add(keyValues);
condition.setKeyValueList(keyValuesList);
RequestParams.Parameter parameter = new RequestParams.Parameter();
parameter.setCondition(condition);
parameter.setPage(new RequestParams.Page());
parameter.setFields("outjson");
parameter.setNetworkCode("3");
parameter.setOrderBy(null);
parameter.setRegionalismCode(Constants.ORG_ID);
parameter.setDataObjId(Constants.POLICE_EMERGENCY_DETAIL_ID);
RequestParams requestParams = new RequestParams();
requestParams.setMessageId(UiUtils.uuid());
requestParams.setVersion("1.0");
requestParams.setParameter(parameter);
call(resourceList.getResourceAddress(), requestParams, new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
// 请求失败
e.printStackTrace();
activity.runOnUiThread(() -> callBack.onError(call, e));
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) {
if (!response.isSuccessful()) {
activity.runOnUiThread(() -> callBack.onError(call, new IOException("Unexpected code " + response)));
return;
}
try {
// 请求成功处理响应数据
String responseBody = response.body().string();
ResponseParams responseParams = new Gson().fromJson(responseBody, ResponseParams.class);
if (!"200".equals(responseParams.getCode())) {
activity.runOnUiThread(() -> callBack.onError(call, new Exception("服务器异常,请联系开发人员或稍后重试!")));
return;
}
for (ResponseParams.FieldData item : responseParams.getData().getDataList()) {
for (ResponseParams.FieldValues i : item.getFieldValues()) {
PoliceEmergencyDetail keyPersonDetail = new Gson().fromJson(i.getValue(), PoliceEmergencyDetail.class);
activity.runOnUiThread(() -> callBack.onSuccess(keyPersonDetail));
}
}
} catch (Exception e) {
e.printStackTrace();
activity.runOnUiThread(() -> callBack.onError(call, e));
}
}
});
}
/**
* 获取重点人数据统计
*/
public void getKeyPersonMessageCount(CustomCallBack<DataCount> callBack) {
ResourceList resourceList = Constants.resourceListsMap.get(Constants.KEY_PERSON_MESSAGE_COUNT_ID);
RequestParams.Condition condition = new RequestParams.Condition();
condition.setLogicalOperate("and");
RequestParams.KeyValues keyValues = new RequestParams.KeyValues();
keyValues.setKey("injson");
GetKeyPersonMessageCountParams params = new GetKeyPersonMessageCountParams();
params.setSfhm(Constants.SFZH);
params.setJybh(Constants.USER_ID);
params.setDept(Constants.USER_ORG_ID);
// params.setSfhm("220104198105200331");
// params.setDept(Constants.USER_ORG_ID);
// params.setJybh("106222");
keyValues.setValue(new Gson().toJson(params));
List<RequestParams.KeyValues> keyValuesList = new ArrayList<>();
keyValuesList.add(keyValues);
condition.setKeyValueList(keyValuesList);
RequestParams.Parameter parameter = new RequestParams.Parameter();
parameter.setCondition(condition);
parameter.setPage(new RequestParams.Page());
parameter.setFields("outjson");
parameter.setNetworkCode("3");
parameter.setOrderBy(null);
parameter.setRegionalismCode(Constants.ORG_ID);
parameter.setDataObjId(Constants.KEY_PERSON_MESSAGE_COUNT_ID);
RequestParams requestParams = new RequestParams();
requestParams.setMessageId(UiUtils.uuid());
requestParams.setVersion("1.0");
requestParams.setParameter(parameter);
call(resourceList.getResourceAddress(), requestParams, new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
// 请求失败
e.printStackTrace();
activity.runOnUiThread(() -> callBack.onError(call, e));
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) {
if (!response.isSuccessful()) {
activity.runOnUiThread(() -> callBack.onError(call, new IOException("Unexpected code " + response)));
return;
}
try {
// 请求成功处理响应数据
String responseBody = response.body().string();
ResponseParams responseParams = new Gson().fromJson(responseBody, ResponseParams.class);
if (!"200".equals(responseParams.getCode())) {
activity.runOnUiThread(() -> callBack.onError(call, new Exception("服务器异常,请联系开发人员或稍后重试!")));
return;
}
for (ResponseParams.FieldData item : responseParams.getData().getDataList()) {
for (ResponseParams.FieldValues i : item.getFieldValues()) {
DataCount dataCount = new Gson().fromJson(i.getValue(), DataCount.class);
activity.runOnUiThread(() -> callBack.onSuccess(dataCount));
}
}
} catch (Exception e) {
e.printStackTrace();
activity.runOnUiThread(() -> callBack.onError(call, e));
}
}
});
}
}

View File

@ -0,0 +1,45 @@
package com.police.policedatasystem.http.requestparams;
import java.io.Serializable;
/**
* {"dept" : "220521950000","messageId":"12","version":"1.0"
*/
public class GetKeyPersonDetailParams implements Serializable {
private String sfzh="222304195909250034";
private String messageId;
private String version;
private String sfhm;
public String getSfhm() {
return sfhm;
}
public void setSfhm(String sfhm) {
this.sfhm = sfhm;
}
public String getSfzh() {
return sfzh;
}
public void setSfzh(String sfzh) {
this.sfzh = sfzh;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -0,0 +1,89 @@
package com.police.policedatasystem.http.requestparams;
import java.io.Serializable;
/**
* {"jybh" : "840364","messageId":"12","version":"1.0"
*/
public class GetKeyPersonListParams implements Serializable {
private String jybh;//警员编号
private String xm = "";//姓名
private String sfzh = "";//身份证号
private String messageId;
private String version;
private String pageNum;
private String pageSize;
private String sfhm;//当前用户的身份号码
public String getSfhm() {
return sfhm;
}
public void setSfhm(String sfhm) {
this.sfhm = sfhm;
}
public String getPageNum() {
return pageNum;
}
public void setPageNum(String pageNum) {
this.pageNum = pageNum;
}
public String getPageSize() {
return pageSize;
}
public void setPageSize(String pageSize) {
this.pageSize = pageSize;
}
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
public String getSfzh() {
return sfzh;
}
public void setSfzh(String sfzh) {
this.sfzh = sfzh;
}
public GetKeyPersonListParams(String jybh) {
this.jybh = jybh;
}
public GetKeyPersonListParams() {
this.jybh = jybh;
}
public String getJybh() {
return jybh;
}
public void setJybh(String jybh) {
this.jybh = jybh;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -0,0 +1,80 @@
package com.police.policedatasystem.http.requestparams;
import java.io.Serializable;
/**
* {"jybh" : "840364","messageId":"12","version":"1.0"
*/
public class GetKeyPersonMessageCountParams implements Serializable {
private String jybh;//警员编号
private String sfhm = "";//身份证号
private String dept = "";//组织机构
private String messageId;
private String version;
private String pageNum;
private String pageSize;
public String getSfhm() {
return sfhm;
}
public void setSfhm(String sfhm) {
this.sfhm = sfhm;
}
public String getPageNum() {
return pageNum;
}
public void setPageNum(String pageNum) {
this.pageNum = pageNum;
}
public String getPageSize() {
return pageSize;
}
public void setPageSize(String pageSize) {
this.pageSize = pageSize;
}
public GetKeyPersonMessageCountParams(String jybh) {
this.jybh = jybh;
}
public GetKeyPersonMessageCountParams() {
this.jybh = jybh;
}
public String getJybh() {
return jybh;
}
public String getDept() {
return dept;
}
public void setDept(String dept) {
this.dept = dept;
}
public void setJybh(String jybh) {
this.jybh = jybh;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -0,0 +1,81 @@
package com.police.policedatasystem.http.requestparams;
import java.io.Serializable;
/**
* {"dept" : "220521950000","messageId":"12","version":"1.0"
*/
public class GetOrgKeyPersonListParams implements Serializable {
private String dept;
private String xm;
private String sfzh;
private String messageId;
private String version;
private String pageNum;
private String pageSize;
private String sfhm;
public String getSfhm() {
return sfhm;
}
public void setSfhm(String sfhm) {
this.sfhm = sfhm;
}
public String getPageNum() {
return pageNum;
}
public void setPageNum(String pageNum) {
this.pageNum = pageNum;
}
public String getPageSize() {
return pageSize;
}
public void setPageSize(String pageSize) {
this.pageSize = pageSize;
}
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
public String getSfzh() {
return sfzh;
}
public void setSfzh(String sfzh) {
this.sfzh = sfzh;
}
public String getDept() {
return dept;
}
public void setDept(String dept) {
this.dept = dept;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -0,0 +1,45 @@
package com.police.policedatasystem.http.requestparams;
import java.io.Serializable;
/**
* {"dept" : "220521950000","messageId":"12","version":"1.0"
*/
public class GetPoliceEmergencyDetailParams implements Serializable {
private String jcjbh="222304195909250034";
private String messageId;
private String version;
private String sfhm;
public String getSfhm() {
return sfhm;
}
public void setSfhm(String sfhm) {
this.sfhm = sfhm;
}
public String getJcjbh() {
return jcjbh;
}
public void setJcjbh(String jcjbh) {
this.jcjbh = jcjbh;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -0,0 +1,81 @@
package com.police.policedatasystem.http.requestparams;
import java.io.Serializable;
/**
* {"jybh" : "840364","messageId":"12","version":"1.0"
*/
public class GetPoliceEmergencyListParams implements Serializable {
private String sfhm;
private String bjjyqk = "";//报警内容
private String jcjbh = "";//警情编号
private String bjrlxdh = "";//报警电话
private String messageId;
private String version;
private String pageNum;
private String pageSize;
public String getPageNum() {
return pageNum;
}
public void setPageNum(String pageNum) {
this.pageNum = pageNum;
}
public String getPageSize() {
return pageSize;
}
public void setPageSize(String pageSize) {
this.pageSize = pageSize;
}
public String getSfhm() {
return sfhm;
}
public void setSfhm(String sfhm) {
this.sfhm = sfhm;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getBjjyqk() {
return bjjyqk;
}
public void setBjjyqk(String bjjyqk) {
this.bjjyqk = bjjyqk;
}
public String getJcjbh() {
return jcjbh;
}
public void setJcjbh(String jcjbh) {
this.jcjbh = jcjbh;
}
public String getBjrlxdh() {
return bjrlxdh;
}
public void setBjrlxdh(String bjrlxdh) {
this.bjrlxdh = bjrlxdh;
}
}

View File

@ -0,0 +1,156 @@
package com.police.policedatasystem.http.requestparams;
import java.io.Serializable;
import java.util.List;
public class RequestParams implements Serializable {
private String messageId;//自定义唯一值建议 UUID.randomUUID().toString()
private String version;//服务总线版本号,目前填写 1.0 即可
private Parameter parameter;//结构体中参数释义如下
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public Parameter getParameter() {
return parameter;
}
public void setParameter(Parameter parameter) {
this.parameter = parameter;
}
public static class Page {
public int pageSize = 1;
public int pageNo = 1;
}
public static class Parameter implements Serializable {
private Condition condition;//条件结构体释义如下
private String dataObjId; //应用商店注册对应的资源 id
private String fields;//后台约定字段可咨询后台开发人员
private String networkCode;//网络类型应用商店注册对应的网络类型
private String orderBy;//排序字段,可空
private Page page;//页码信息非空
private String regionalismCode; //区域代码 应用商店注册 app 对应的区域代码
public Condition getCondition() {
return condition;
}
public void setCondition(Condition condition) {
this.condition = condition;
}
public String getDataObjId() {
return dataObjId;
}
public void setDataObjId(String dataObjId) {
this.dataObjId = dataObjId;
}
public String getFields() {
return fields;
}
public void setFields(String fields) {
this.fields = fields;
}
public String getNetworkCode() {
return networkCode;
}
public void setNetworkCode(String networkCode) {
this.networkCode = networkCode;
}
public String getOrderBy() {
return orderBy;
}
public void setOrderBy(String orderBy) {
this.orderBy = orderBy;
}
public Page getPage() {
return page;
}
public void setPage(Page page) {
this.page = page;
}
public String getRegionalismCode() {
return regionalismCode;
}
public void setRegionalismCode(String regionalismCode) {
this.regionalismCode = regionalismCode;
}
}
public static class Condition implements Serializable {
private String logicalOperate = "and";//操作符传值 and
private List<KeyValues> keyValueList;//集合里面装的键值对字段解释如下
public String getLogicalOperate() {
return logicalOperate;
}
public void setLogicalOperate(String logicalOperate) {
this.logicalOperate = logicalOperate;
}
public List<KeyValues> getKeyValueList() {
return keyValueList;
}
public void setKeyValueList(List<KeyValues> keyValueList) {
this.keyValueList = keyValueList;
}
}
public static class KeyValues implements Serializable {
private String key;//跟后台约定你想放在服务总线接口里面入参的 key
private String value;//自己后台接口需要的入参实际值,可放自己接口需要的 json
private String relationOperator = "=";//关系符 =
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getRelationOperator() {
return relationOperator;
}
public void setRelationOperator(String relationOperator) {
this.relationOperator = relationOperator;
}
}
}

View File

@ -0,0 +1,96 @@
package com.police.policedatasystem.http.requestparams;
import java.io.Serializable;
import java.util.List;
public class ResponseParams implements Serializable {
String messageId;//自定义唯一值建议 UUID.randomUUID().toString()
String message;//
String version;//服务总线版本号,目前填写 1.0 即可
String code;//结构体中参数释义如下
Data data;
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Data getData() {
return data;
}
public void setData(Data data) {
this.data = data;
}
public static class Data implements Serializable {
private List<FieldData> dataList;//条件结构体释义如下
public List<FieldData> getDataList() {
return dataList;
}
public void setDataList(List<FieldData> dataList) {
this.dataList = dataList;
}
}
public static class FieldData implements Serializable {
private List<FieldValues> fieldValues;
public List<FieldValues> getFieldValues() {
return fieldValues;
}
public void setFieldValues(List<FieldValues> fieldValues) {
this.fieldValues = fieldValues;
}
}
public static class FieldValues implements Serializable {
private String field;
private String value;
public String getField() {
return field;
}
public void setField(String field) {
this.field = field;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
}

View File

@ -0,0 +1,132 @@
package com.police.policedatasystem;
import static com.police.policedatasystem.util.UaCredentialApi.ACTION_SUFFIX_UA_LOGIN;
import static com.police.policedatasystem.util.UaCredentialApi.ACTION_UA_LOGOUT;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.text.TextUtils;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import com.police.policedatasystem.databinding.ActivityIndexBinding;
import com.police.policedatasystem.fragment.ApplyFragment;
import com.police.policedatasystem.fragment.DataFragment;
import com.police.policedatasystem.fragment.MineFragment;
import com.police.policedatasystem.http.RequestClient;
import com.police.policedatasystem.util.Constants;
import com.police.policedatasystem.viewmodel.IndexViewModel;
public class indexActivity extends AppCompatActivity {
public ActivityIndexBinding binding;
private IndexViewModel viewModel;
public RequestClient requestClient;
public boolean findAddress = false;
private DataFragment dataFragment;
private ApplyFragment applyFragment;
private MineFragment mineFragment;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityIndexBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
initView();
viewModel = new IndexViewModel(this);
requestClient = new RequestClient(this);
}
private void initView() {
dataFragment = new DataFragment();
applyFragment = new ApplyFragment();
mineFragment = new MineFragment();
binding.navBarGroup.navBar1.setOnClickListener(view -> {
replaceFragment(dataFragment);
binding.navBarGroup.navBarIcon1.setImageResource(R.mipmap.icon_data_selected);
binding.navBarGroup.navBarText1.setTextColor(getColor(R.color.selected_color));
binding.navBarGroup.navBarIcon2.setImageResource(R.mipmap.icon_apply_normal);
binding.navBarGroup.navBarText2.setTextColor(getColor(R.color.normal_color));
binding.navBarGroup.navBarIcon3.setImageResource(R.mipmap.icon_mine_normal);
binding.navBarGroup.navBarText3.setTextColor(getColor(R.color.normal_color));
});
binding.navBarGroup.navBar2.setOnClickListener(view -> {
replaceFragment(applyFragment);
binding.navBarGroup.navBarIcon1.setImageResource(R.mipmap.icon_data_normal);
binding.navBarGroup.navBarText1.setTextColor(getColor(R.color.normal_color));
binding.navBarGroup.navBarIcon2.setImageResource(R.mipmap.icon_apply_selected);
binding.navBarGroup.navBarText2.setTextColor(getColor(R.color.selected_color));
binding.navBarGroup.navBarIcon3.setImageResource(R.mipmap.icon_mine_normal);
binding.navBarGroup.navBarText3.setTextColor(getColor(R.color.normal_color));
});
binding.navBarGroup.navBar3.setOnClickListener(view -> {
replaceFragment(mineFragment);
binding.navBarGroup.navBarIcon1.setImageResource(R.mipmap.icon_data_normal);
binding.navBarGroup.navBarText1.setTextColor(getColor(R.color.normal_color));
binding.navBarGroup.navBarIcon2.setImageResource(R.mipmap.icon_apply_normal);
binding.navBarGroup.navBarText2.setTextColor(getColor(R.color.normal_color));
binding.navBarGroup.navBarIcon3.setImageResource(R.mipmap.icon_mine_selected);
binding.navBarGroup.navBarText3.setTextColor(getColor(R.color.selected_color));
});
replaceFragment(dataFragment);
registerBroadcastReceiver();
}
public void initData() {
//改变寻址状态走到这里证明寻址成功了
if (findAddress) return;
findAddress = true;
binding.wmWm.setTextSize(50);
binding.wmWm.setText(Constants.SFZH);
dataFragment.initData();
}
private void replaceFragment(Fragment newFragment) {
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.fc_view, newFragment);
transaction.commit();
}
private void registerBroadcastReceiver() {
IntentFilter intentFilter = new IntentFilter();
String pkgName = getPackageName();
/**添加登录成功事件监听
* 当第一次登录调用IF-UA-SDK-01接口可能返回"票据不存在"此时需要注册监听此事件
* 当登录成功后接收到此事件即可重新调用IF-UA-SDK-01获取相关票据
* */
intentFilter.addAction(pkgName + ACTION_SUFFIX_UA_LOGIN);
/**增加登出事件监听
* 当UA主动账户退出时会发送该事件此时已经登录应用可以根据自身业务实施退出
* */
intentFilter.addAction(pkgName + ACTION_UA_LOGOUT);
registerReceiver(uaLoginInReceiver, intentFilter);
}
private final BroadcastReceiver uaLoginInReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (TextUtils.isEmpty(action)) {
return;
}
if (action.contains(ACTION_SUFFIX_UA_LOGIN)) {
//再次获取票据
if (requestClient != null) {
requestClient.init();
}
return;
}
if (action.contains(ACTION_UA_LOGOUT)) {
//程序退出
startActivity(new Intent(indexActivity.this, indexActivity.class));
finish();
}
}
};
}

View File

@ -0,0 +1,49 @@
package com.police.policedatasystem.model;
import java.io.Serializable;
/**
*
*/
public class DataCount implements Serializable {
//重点人
private String zdryCount = "0";
//警情
private String jqCount = "0";
//案情
private String aqCount = "0";
//辖区
private String zdryDeptCount = "0";
public String getZdryCount() {
return zdryCount;
}
public void setZdryCount(String zdryCount) {
this.zdryCount = zdryCount;
}
public String getJqCount() {
return jqCount;
}
public void setJqCount(String jqCount) {
this.jqCount = jqCount;
}
public String getAqCount() {
return aqCount;
}
public void setAqCount(String aqCount) {
this.aqCount = aqCount;
}
public String getZdryDeptCount() {
return zdryDeptCount;
}
public void setZdryDeptCount(String zdryDeptCount) {
this.zdryDeptCount = zdryDeptCount;
}
}

View File

@ -0,0 +1,86 @@
package com.police.policedatasystem.model;
import java.io.Serializable;
public class KeyPerson implements Serializable {
//姓名
private String xm;
//管控类别
private String gklb;
//群体列表
private String qtlb;
//责任民警姓名
private String zrmj;
//身份证号码
private String sfzh;
//照片base64
private String zp;
//有效期
private String yxq;
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
public String getGklb() {
return gklb;
}
public void setGklb(String gklb) {
this.gklb = gklb;
}
public String getQtlb() {
return qtlb;
}
public void setQtlb(String qtlb) {
this.qtlb = qtlb;
}
public String getZrmj() {
return zrmj;
}
public void setZrmj(String zrmj) {
this.zrmj = zrmj;
}
public String getSfzh() {
return sfzh;
}
public void setSfzh(String sfzh) {
this.sfzh = sfzh;
}
public String getZp() {
return zp;
}
public void setZp(String zp) {
this.zp = zp;
}
public String getYxq() {
return yxq;
}
public void setYxq(String yxq) {
this.yxq = yxq;
}
@Override
public String toString() {
return "KeyPerson{" +
"xm='" + xm + '\'' +
", gklb='" + gklb + '\'' +
", qtlb='" + qtlb + '\'' +
", zrmj='" + zrmj + '\'' +
", sfzh='" + sfzh + '\'' +
'}';
}
}

View File

@ -0,0 +1,289 @@
package com.police.policedatasystem.model;
import java.io.Serializable;
import java.util.List;
/**
* 重点人详情
*/
public class KeyPersonDetail implements Serializable {
private String fwcs;//服务场所
private String gmsfhm;//身份证号码
private String hcdp;//火车订票信息
private String hjdz;//户籍地址
private String jg;//籍贯
private String kcdp;//客车订票信息
private String fjdp;//飞机订票信息
private String mz;//民族
private String xb;//性别
private String xm;//姓名
private String zjzs;//最近住宿
private String zp;//照片
private String djchphm;//机动车牌号
private String jzdhhm;//手机号
private String hypo;//婚姻
private String sjgj;//手机轨迹
private String clzhwz;//车辆最后位置
private String bq;//标签
public String getBq() {
return bq;
}
public void setBq(String bq) {
this.bq = bq;
}
public String getClzhwz() {
return clzhwz;
}
public void setClzhwz(String clzhwz) {
this.clzhwz = clzhwz;
}
public String getSjgj() {
return sjgj;
}
public String getFjdp() {
return fjdp;
}
public void setFjdp(String fjdp) {
this.fjdp = fjdp;
}
public void setSjgj(String sjgj) {
this.sjgj = sjgj;
}
public String getHypo() {
return hypo;
}
public void setHypo(String hypo) {
this.hypo = hypo;
}
public String getJzdhhm() {
return jzdhhm;
}
public void setJzdhhm(String jzdhhm) {
this.jzdhhm = jzdhhm;
}
public String getDjchphm() {
return djchphm;
}
public void setDjchphm(String djchphm) {
this.djchphm = djchphm;
}
public String getZp() {
return zp;
}
public void setZp(String zp) {
this.zp = zp;
}
private List<Lkxx> zdryLkxxList;//姓名
public String getFwcs() {
return fwcs;
}
public void setFwcs(String fwcs) {
this.fwcs = fwcs;
}
public String getGmsfhm() {
return gmsfhm;
}
public void setGmsfhm(String gmsfhm) {
this.gmsfhm = gmsfhm;
}
public String getHcdp() {
return hcdp;
}
public void setHcdp(String hcdp) {
this.hcdp = hcdp;
}
public String getHjdz() {
return hjdz;
}
public void setHjdz(String hjdz) {
this.hjdz = hjdz;
}
public String getJg() {
return jg;
}
public void setJg(String jg) {
this.jg = jg;
}
public String getKcdp() {
return kcdp;
}
public void setKcdp(String kcdp) {
this.kcdp = kcdp;
}
public String getMz() {
return mz;
}
public void setMz(String mz) {
this.mz = mz;
}
public String getXb() {
return xb;
}
public void setXb(String xb) {
this.xb = xb;
}
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
public String getZjzs() {
return zjzs;
}
public void setZjzs(String zjzs) {
this.zjzs = zjzs;
}
public List<Lkxx> getZdryLkxxList() {
return zdryLkxxList;
}
public void setZdryLkxxList(List<Lkxx> zdryLkxxList) {
this.zdryLkxxList = zdryLkxxList;
}
/**
* 历史案件次数
*
* @return
*/
public int getLsajcs() {
if (zdryLkxxList!=null){
return zdryLkxxList.size();
}else{
return 0;
}
}
public static class Lkxx implements Serializable {
private String gklb;//管控类别
private String qtlb;//列管级别
private String lkjz;//列控警种
private String lksj;//列控时间
private String lkyy;//列控原因
private String zrdw;//责任单位
private String zrmj;//责任民警
private String yxq;//有效期
private String gkjb;//管控级别
private String zp;//照片
public String getQtlb() {
return qtlb;
}
public void setQtlb(String qtlb) {
this.qtlb = qtlb;
}
public String getZp() {
return zp;
}
public void setZp(String zp) {
this.zp = zp;
}
public String getGklb() {
return gklb;
}
public void setGklb(String gklb) {
this.gklb = gklb;
}
public String getLkjz() {
return lkjz;
}
public void setLkjz(String lkjz) {
this.lkjz = lkjz;
}
public String getLksj() {
return lksj;
}
public void setLksj(String lksj) {
this.lksj = lksj;
}
public String getLkyy() {
return lkyy;
}
public void setLkyy(String lkyy) {
this.lkyy = lkyy;
}
public String getZrdw() {
return zrdw;
}
public void setZrdw(String zrdw) {
this.zrdw = zrdw;
}
public String getZrmj() {
return zrmj;
}
public void setZrmj(String zrmj) {
this.zrmj = zrmj;
}
public String getYxq() {
return yxq;
}
public void setYxq(String yxq) {
this.yxq = yxq;
}
public String getGkjb() {
return gkjb;
}
public void setGkjb(String gkjb) {
this.gkjb = gkjb;
}
}
}

View File

@ -0,0 +1,56 @@
package com.police.policedatasystem.model;
import java.io.Serializable;
public class PoliceEmergency implements Serializable {
//警情编号
private String jcjbh;
//报警内容
private String bjjyqk;
//报警电话
private String bjrlxdh;
//报警时间
private String jjsj;
//报警地址
private String asjfsdddzmc;
public String getJcjbh() {
return jcjbh;
}
public void setJcjbh(String jcjbh) {
this.jcjbh = jcjbh;
}
public String getBjjyqk() {
return bjjyqk;
}
public void setBjjyqk(String bjjyqk) {
this.bjjyqk = bjjyqk;
}
public String getBjrlxdh() {
return bjrlxdh;
}
public void setBjrlxdh(String bjrlxdh) {
this.bjrlxdh = bjrlxdh;
}
public String getJjsj() {
return jjsj;
}
public void setJjsj(String jjsj) {
this.jjsj = jjsj;
}
public String getAsjfsdddzmc() {
return asjfsdddzmc;
}
public void setAsjfsdddzmc(String asjfsdddzmc) {
this.asjfsdddzmc = asjfsdddzmc;
}
}

View File

@ -0,0 +1,268 @@
package com.police.policedatasystem.model;
import java.io.Serializable;
import java.util.List;
/**
* 警情详情
* "asjfsdddzmc":"绿地中央公馆c6-204",
* "bjjyqk":"报警称有人冒充民航工作人员骗取其10000元",
* "bjrlxdh":"13944800721",
* "bjrzjhm":"220104199807011310",
* "cjrxm":"肖映辉,张方贵",
* "jcjbh":"ST220120240200000046174",
* "jjsj":"20240223165000",
* "lsbjcs":"3",
* "mz":"汉族",
* "xb":"",
* "xm":"徐瑞",
* "zp":""
*/
public class PoliceEmergencyDetail implements Serializable {
//警情编号
private String jcjbh;
//报警内容
private String bjjyqk;
/*报警时间*/
private String jjsj;
/*报警电话*/
private String bjrlxdh;
/*报警位置*/
private String asjfsdddzmc;
/*出境单位*/
private String cjdwgajgjgdm;
/*出警民警*/
private String cjrxm;
/*报警人身份证号*/
private String bjrzjhm;
/*照片*/
private String zp;
/*姓名*/
private String xm;
/*性别*/
private String xb;
/*民族*/
private String mz;
/*年龄*/
private String nl;
private String jg;
/*标签*/
private String bq;
/*刑事案件前科*/
private String xsajqk;
/*治安(行政)案件前科*/
private String zaajqk;
/*精神病人*/
private String jsbr;
/*残疾人*/
private String cjr;
/*服务场所*/
private String fwcs;
/*婚姻状况*/
private String hyzk;
/*历史报警次数*/
private String lsbjcs;
private String jqlb;//警情类别
private String cllx;//处理类型
private String cljg;//处理结果
public String getJqlb() {
return jqlb;
}
public void setJqlb(String jqlb) {
this.jqlb = jqlb;
}
public String getCllx() {
return cllx;
}
public void setCllx(String cllx) {
this.cllx = cllx;
}
public String getCljg() {
return cljg;
}
public void setCljg(String cljg) {
this.cljg = cljg;
}
public String getJcjbh() {
return jcjbh;
}
public String getJg() {
return jg;
}
public void setJg(String jg) {
this.jg = jg;
}
public void setJcjbh(String jcjbh) {
this.jcjbh = jcjbh;
}
public String getBjjyqk() {
return bjjyqk;
}
public void setBjjyqk(String bjjyqk) {
this.bjjyqk = bjjyqk;
}
public String getJjsj() {
return jjsj;
}
public void setJjsj(String jjsj) {
this.jjsj = jjsj;
}
public String getBjrlxdh() {
return bjrlxdh;
}
public void setBjrlxdh(String bjrlxdh) {
this.bjrlxdh = bjrlxdh;
}
public String getAsjfsdddzmc() {
return asjfsdddzmc;
}
public void setAsjfsdddzmc(String asjfsdddzmc) {
this.asjfsdddzmc = asjfsdddzmc;
}
public String getCjdwgajgjgdm() {
return cjdwgajgjgdm;
}
public void setCjdwgajgjgdm(String cjdwgajgjgdm) {
this.cjdwgajgjgdm = cjdwgajgjgdm;
}
public String getCjrxm() {
return cjrxm;
}
public void setCjrxm(String cjrxm) {
this.cjrxm = cjrxm;
}
public String getBjrzjhm() {
return bjrzjhm;
}
public void setBjrzjhm(String bjrzjhm) {
this.bjrzjhm = bjrzjhm;
}
public String getZp() {
return zp;
}
public void setZp(String zp) {
this.zp = zp;
}
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
public String getXb() {
return xb;
}
public void setXb(String xb) {
this.xb = xb;
}
public String getMz() {
return mz;
}
public void setMz(String mz) {
this.mz = mz;
}
public String getNl() {
return nl;
}
public void setNl(String nl) {
this.nl = nl;
}
public String getBq() {
return bq;
}
public void setBq(String bq) {
this.bq = bq;
}
public String getXsajqk() {
return xsajqk;
}
public void setXsajqk(String xsajqk) {
this.xsajqk = xsajqk;
}
public String getZaajqk() {
return zaajqk;
}
public void setZaajqk(String zaajqk) {
this.zaajqk = zaajqk;
}
public String getJsbr() {
return jsbr;
}
public void setJsbr(String jsbr) {
this.jsbr = jsbr;
}
public String getCjr() {
return cjr;
}
public void setCjr(String cjr) {
this.cjr = cjr;
}
public String getFwcs() {
return fwcs;
}
public void setFwcs(String fwcs) {
this.fwcs = fwcs;
}
public String getHyzk() {
return hyzk;
}
public void setHyzk(String hyzk) {
this.hyzk = hyzk;
}
public String getLsbjcs() {
return lsbjcs;
}
public void setLsbjcs(String lsbjcs) {
this.lsbjcs = lsbjcs;
}
}

View File

@ -0,0 +1,42 @@
package com.police.policedatasystem.model;
import java.io.Serializable;
public class ResourceList implements Serializable {
private String resourceRegionalismCode;
private String resourceAddress;
private String resourceId;
private String resourceServiceType;
public String getResourceRegionalismCode() {
return resourceRegionalismCode;
}
public void setResourceRegionalismCode(String resourceRegionalismCode) {
this.resourceRegionalismCode = resourceRegionalismCode;
}
public String getResourceAddress() {
return resourceAddress;
}
public void setResourceAddress(String resourceAddress) {
this.resourceAddress = resourceAddress;
}
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
public String getResourceServiceType() {
return resourceServiceType;
}
public void setResourceServiceType(String resourceServiceType) {
this.resourceServiceType = resourceServiceType;
}
}

View File

@ -0,0 +1,174 @@
package com.police.policedatasystem.model;
import java.io.Serializable;
/**
* {
* "credential":{
* "head":{
* "credType":"1",
* "duration":{
* "endTime":"1709387466556",
* "startTime":"1709380266556"
* },
* "token":{
* "orgId":"220000000000",
* "tokenId":"ff8080818bc29187018dff00ea3d33fb"
* },
* "version":"1.0"
* },
* "load":{
* "userInfo":{
* "jh":"106686",
* "orgId":"220100410000",
* "sfzh":"220105198602152031",
* "userId":"162add958ea344f68d07b6ad2c4b17a7",
* "xm":"路瑶"
* }
* },
* "serverSign":{
* "alg":"SM3+SM2",
* "signature":"2WIjCJ/+94XmtIei2+/8eV40dxfvQGqV4ws7WDA5iNPc//zeZTFNewibqa8OSKprWq2P6mnWHMkVPYP+Qdl7Huc0qHJMVFUovF+mqtO5pSxrngem5kXmVK9v1NV7OMurPpa1FiQc1uU0A4Zae4ZrpynM2+qEck/D8KSvLvsKkCQ\u003d",
* "sn":"b11000000000bdc",
* "url":"http://192.168.24.108:8080"
* }
* }
* }
*/
public class UserCredential implements Serializable {
private Credential credential;
public Credential getCredential() {
return credential;
}
public void setCredential(Credential credential) {
this.credential = credential;
}
public static class Credential implements Serializable {
private Head head;
private Load load;
private ServerSign serverSign;
public Head getHead() {
return head;
}
public void setHead(Head head) {
this.head = head;
}
public Load getLoad() {
return load;
}
public void setLoad(Load load) {
this.load = load;
}
public ServerSign getServerSign() {
return serverSign;
}
public void setServerSign(ServerSign serverSign) {
this.serverSign = serverSign;
}
}
public static class Head implements Serializable{
private Head head;
private Load load;
private ServerSign serverSign;
public Head getHead() {
return head;
}
public void setHead(Head head) {
this.head = head;
}
public Load getLoad() {
return load;
}
public void setLoad(Load load) {
this.load = load;
}
public ServerSign getServerSign() {
return serverSign;
}
public void setServerSign(ServerSign serverSign) {
this.serverSign = serverSign;
}
}
public static class Load implements Serializable {
private UserInfo userInfo;
public UserInfo getUserInfo() {
return userInfo;
}
public void setUserInfo(UserInfo userInfo) {
this.userInfo = userInfo;
}
}
public static class ServerSign {
private Head head;
private Load load;
private ServerSign serverSign;
}
public static class UserInfo implements Serializable {
String jh;//"jh":"106686",
String orgId;//"orgId":"220100410000",
String sfzh;//"sfzh":"220105198602152031",
String userId;//"userId":"162add958ea344f68d07b6ad2c4b17a7",
String xm;//"xm":"路瑶"
public String getJh() {
return jh;
}
public void setJh(String jh) {
this.jh = jh;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getSfzh() {
return sfzh;
}
public void setSfzh(String sfzh) {
this.sfzh = sfzh;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
}
}

View File

@ -0,0 +1,63 @@
package com.police.policedatasystem.util;
import com.police.policedatasystem.model.ResourceList;
import java.util.HashMap;
public final class Constants {
/**
* 根据警员编号重点人员信息列表
*/
public static final String KEY_PERSON_ID = "220000000000-3-0100-103cab8edd784a688ac3c41476454a3a";
/**
* 根据组织机构查询辖区重点人
*/
public static final String ORG_KEY_PERSON_ID = "220000000000-3-0100-2faa9acfe614420c8a0c74dbf257d963";
/**
* 重点人员信息详情
*/
public static final String KEY_PERSON_DETAIL_ID = "220000000000-3-0100-e589d230e71942a3b87f2e050fbd2058";
/**
* 警情列表
*/
public static final String POLICE_EMERGENCY_ID = "220000000000-3-0100-013e30a83e854b1badc23dd31e7dcfec";
/**
* 警情详情
*/
public static final String POLICE_EMERGENCY_DETAIL_ID = "220000000000-3-0100-25a416bd99ef4cd19a523715b9612fa1";
/**
* 重点人消息数量统计
*/
public static final String KEY_PERSON_MESSAGE_COUNT_ID = "220000000000-3-0100-d29a1ec21b9e44dab6e69a26598b8b8e";
/**
* 重点人员信息详情
*/
public static final String ORG_ID = "220000000000";
/**
* 重点人员信息id
*/
public static final String APP_ID = "220000000000-3-1-71d6313523574202bb1f9984b6d95254";
public static String APP_CREDENTIAL = "";
public static String USER_CREDENTIAL = "";
/**
* 当前用户警员编号
*/
public static String USER_ID = "100307";
/**
* 当前用户身份证号
*/
public static String SFZH = "100307";
/**
* 当前用户警员组织代码
*/
public static String USER_ORG_ID = "22018421000";//22018421000//220106290000
/**
* 寻址后得到的数据-接口列表
*/
public static final HashMap<String, ResourceList> resourceListsMap = new HashMap<>();
/**
* 请求分页数据数量
*/
public static int PAGE_SIZE = 10;
}

View File

@ -0,0 +1,65 @@
package com.police.policedatasystem.util;
import java.io.Serializable;
public class ThirdAppInfo implements Serializable {
private String messageId;
private String packageName;
private String appId;
private String orgId;
private String networkAreaCode;
private String version;
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getNetworkAreaCode() {
return networkAreaCode;
}
public void setNetworkAreaCode(String networkAreaCode) {
this.networkAreaCode = networkAreaCode;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@ -0,0 +1,305 @@
package com.police.policedatasystem.util;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
public class UaCredentialApi {
/**********************************************以下是统一认证登录时使用的参数字段常量定义*************************************************************/
/**
* 统一认证登录接口(统一认证客户端UAAC提供)
*/
public static final String PROVIDER_URI_GET_CREDENTIAL = "content://com.ydjw.ua.getCredential";
public static final String PARAMS_KEY_UA_VERSION_VALUE = "1";
public static final String PARAMS_KEY_UA_MESSAGE_ID = "messageId";
public static final String PARAMS_KEY_UA_VERSION = "version";
public static final String PARAMS_KEY_UA_APP_ID = "appId";
public static final String PARAMS_KEY_UA_ORG_ID = "orgId";
public static final String PARAMS_KEY_UA_NETWORK_AREA_CODE = "networkAreaCode";
public static final String PARAMS_KEY_UA_PACKAGE_NAME = "packageName";
public static final String PARAMS_KEY_UA_RET_CODE = "resultCode";
public static final String PARAMS_KEY_UA_RET_MESSAGE = "message";
public static final String PARAMS_KEY_THIRD_APP_INFO = "third_app_info";
public static final int PARAMS_KEY_UA_RET_SUCCESS = 0;
public static final int PARAMS_KEY_UA_RET_ERROR_PARAMS = -3;
public static final int PARAMS_KEY_UA_RET_ERROR_NOT_EXISTS = -5;
public static final int CREDENTIAL_CLIENT_NOT_INSTALLED = -7;
public static final int PARAMS_KEY_UA_RET_ERROR_OTHER = -99;
public static final String PARAMS_KEY_UA_APP_CREDENTIAL = "appCredential";
public static final String PARAMS_KEY_UA_USER_CREDENTIAL = "userCredential";
public static final String ACTION_SUFFIX_UA_LOGIN = ".ACTION_LOGIN";
public static final String ACTION_UA_LOGOUT = "com.ydjw.ua.ACTION_LOGOUT";
/**********************************************以下是统一认证登录时使用的参数字段常量定义*************************************************************/
private boolean notExists = false;
public CredentialReqCallBack credentialReqCallBack;
private String mMessageId;
private Context mContext;
private String version = UaCredentialApi.PARAMS_KEY_UA_VERSION_VALUE;
private String appId;
private String orgId;
private String networkAreaCode;
private static Map<String, String> packageActivityMap = new HashMap<>();
/**
* 统一认证应用包名(历史原因统一认证单点登录功能存在多个客户端)
*/
private static String uaacPackageName;
/**
* 统一认证启动Activity类名
*/
private static String uaacLoginActivityName;
static {
//新版统一认证
packageActivityMap.put("com.xdja.uaac", "com.xdja.uaac.ui.InitActivity");
//旧版统一认证
packageActivityMap.put("com.xdja.unifyauthorize", "com.xdja.unifyauthorize.activity.LoginActivity");
//安全接入融合版
packageActivityMap.put("com.xdja.safeclient", "com.xdja.safeclient.frame.SplashActivity");
//警信内部集成的旧版统一认证
packageActivityMap.put("com.xdja.jxclient", "com.xdja.unifyauthorize.activity.LoginActivity");
}
public UaCredentialApi(Builder builder) {
this.mContext = builder.mContext;
this.version = builder.version;
this.appId = builder.appId;
this.orgId = builder.orgId;
this.networkAreaCode = builder.networkAreaCode;
}
public static class Builder {
protected Context mContext;
protected String version;
protected String appId;
protected String orgId;
protected String networkAreaCode;
public Builder(Context context) {
this.mContext = context;
}
public Builder setAppId(String appId) {
this.appId = appId;
return this;
}
public Builder setVersion(String version) {
this.version = version;
return this;
}
public Builder setOrgId(String orgId) {
this.orgId = orgId;
return this;
}
public Builder setNetworkAreaCode(String networkAreaCode) {
this.networkAreaCode = networkAreaCode;
return this;
}
public UaCredentialApi build() {
return new UaCredentialApi(this);
}
}
public void reqCredential(CredentialReqCallBack reqCallBack) {
this.credentialReqCallBack = reqCallBack;
IntentFilter intentFilter = new IntentFilter();
String pkgName = mContext.getPackageName();
/**添加登录成功事件监听
* 当第一次登录调用IF-UA-SDK-01接口可能返回"票据不存在"此时需要注册监听此事件
* 当登录成功后接收到此事件即可重新调用IF-UA-SDK-01获取相关票据
* */
intentFilter.addAction(pkgName + ACTION_SUFFIX_UA_LOGIN);
/**增加登出事件监听
* 当UA主动账户退出时会发送该事件此时已经登录应用可以根据自身业务实施退出
* */
intentFilter.addAction(pkgName + ACTION_UA_LOGOUT);
mContext.registerReceiver(uaLoginInReceiver, intentFilter);
loginUaForCredential(mContext);
}
public void release() {
notExists = false;
if (uaLoginInReceiver == null) {
return;
}
mContext.unregisterReceiver(uaLoginInReceiver);
}
private BroadcastReceiver uaLoginInReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (TextUtils.isEmpty(action)) {
return;
}
if (action.contains(ACTION_SUFFIX_UA_LOGIN) && notExists) {
loginUaForCredential(mContext);
}
}
};
/**
* 步骤1IF-UA-SDK-01获取凭证信息
* <br>调用此接口获取用户凭证和应用凭证</br>
* <br>如用户已登录 UA客户端则直接向应用返回凭证信息</br>
* <br>如未登录待登录完成后将通过广播的形式向应用发送用户登录成功广播此时可以监听广播重新获取凭证信息</br>
*/
private void loginUaForCredential(Context context) {
if (!isCredentialProviderExist(context)) {
credentialReqCallBack.onCredentialCallBack(CREDENTIAL_CLIENT_NOT_INSTALLED, "未找到UA客户端", "", "");
return;
}
notExists = false;
String messageId = UUID.randomUUID().toString().replace("-","");
mMessageId = messageId;
Uri uri = Uri.parse(PROVIDER_URI_GET_CREDENTIAL);
ContentResolver resolver = context.getContentResolver();
Bundle params = new Bundle();
String packageName = context.getPackageName();
params.putString(PARAMS_KEY_UA_MESSAGE_ID, messageId);
params.putString(PARAMS_KEY_UA_VERSION, version);
params.putString(PARAMS_KEY_UA_APP_ID, appId);
params.putString(PARAMS_KEY_UA_ORG_ID, orgId);
params.putString(PARAMS_KEY_UA_NETWORK_AREA_CODE, networkAreaCode);
params.putString(PARAMS_KEY_UA_PACKAGE_NAME, packageName);
try {
Bundle result = resolver.call(uri, "", null, params);
if (result == null) {
credentialReqCallBack.onCredentialCallBack(PARAMS_KEY_UA_RET_ERROR_OTHER, "获取应用凭证失败,bundle为空", "", "");
return;
}
String messageIdRet = result.getString(PARAMS_KEY_UA_MESSAGE_ID);
if (!mMessageId.equals(messageIdRet)) {
credentialReqCallBack.onCredentialCallBack(PARAMS_KEY_UA_RET_ERROR_OTHER, "获取应用凭证失败,messageId不对应", "", "");
return;
}
receiveCredential(result);
} catch (ActivityNotFoundException activityNotFoundException) {
activityNotFoundException.printStackTrace();
receiveCredentialError(null, activityNotFoundException);
} catch (Exception e) {
e.printStackTrace();
receiveCredentialError(null, e);
}
}
private void receiveCredentialError(Bundle result, Exception e) {
credentialReqCallBack.onCredentialCallBack(PARAMS_KEY_UA_RET_ERROR_OTHER, "调用UA客户端获取凭证接口异常" + (e == null ? "" : e.getMessage()), "", "");
}
/**
* 步骤IIF-UA-SDK-01处理获取凭证结果
*
* @param result
*/
private void receiveCredential(Bundle result) {
int resultCode = result.getInt(PARAMS_KEY_UA_RET_CODE);
if (PARAMS_KEY_UA_RET_SUCCESS == resultCode) {
String appCredential = result.getString(PARAMS_KEY_UA_APP_CREDENTIAL);
String userCredential = result.getString(PARAMS_KEY_UA_USER_CREDENTIAL);
credentialReqCallBack.onCredentialCallBack(resultCode, "", userCredential, appCredential);
return;
}
if (PARAMS_KEY_UA_RET_ERROR_NOT_EXISTS == resultCode) {
notExists = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Intent intent = new Intent();
intent.setClassName(uaacPackageName, uaacLoginActivityName);
final ThirdAppInfo thirdAppInfo = new ThirdAppInfo();
thirdAppInfo.setMessageId(result.getString(PARAMS_KEY_UA_MESSAGE_ID));
thirdAppInfo.setPackageName(mContext.getPackageName());
thirdAppInfo.setAppId(appId);
thirdAppInfo.setOrgId(orgId);
thirdAppInfo.setNetworkAreaCode(networkAreaCode);
thirdAppInfo.setVersion(version);
intent.putExtra(PARAMS_KEY_THIRD_APP_INFO, thirdAppInfo);
if (!(mContext instanceof Activity)) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
mContext.startActivity(intent);
}
return;
}
String message = result.getString(PARAMS_KEY_UA_RET_MESSAGE);
credentialReqCallBack.onCredentialCallBack(resultCode, message, "", "");
}
/**
* 判断凭证Provider是否存在如果存在获取Provider所在应用的包名
*/
private static boolean isCredentialProviderExist(Context context) {
PackageManager packageManager = context.getPackageManager();
ProviderInfo providerInfo = packageManager.resolveContentProvider(Uri.parse(PROVIDER_URI_GET_CREDENTIAL).getAuthority(), PackageManager.GET_META_DATA);
if (providerInfo == null) {
return false;
} else {
uaacPackageName = providerInfo.applicationInfo.packageName;
uaacLoginActivityName = packageActivityMap.get(uaacPackageName);
return true;
}
}
public interface CredentialReqCallBack {
void onCredentialCallBack(int resultCode, String message, String userCredential, String appCredential);
}
}

View File

@ -0,0 +1,78 @@
package com.police.policedatasystem.util;
import android.util.Base64;
import android.widget.Toast;
import com.police.policedatasystem.MyApplication;
import java.util.UUID;
public class UiUtils {
/**
* 将dp值转换为px值保证尺寸大小不变
*
* @param dpValue dp值
* @return 转换后的px值
*/
public static int dp2Px(int dpValue) {
final float scale = MyApplication.getInstance().getResources().getDisplayMetrics().density;
return Math.round((float) dpValue * scale);
}
public static String uuid() {
return UUID.randomUUID().toString();
}
public static void toast(String str) {
MyApplication.getInstance().getHandler().post(() -> Toast.makeText(MyApplication.getInstance(), str, Toast.LENGTH_LONG).show());
}
public static boolean isEmpty(String str) {
if (str == null) {
return true;
}
return str.isEmpty();
}
public static boolean isNotEmpty(String str) {
if (str == null) {
return false;
}
return !str.isEmpty();
}
public static void ui(){
MyApplication.getHandler().post(new Runnable() {
@Override
public void run() {
}
});
}
public static byte[] base64ToBytes(String base64Str) {
return Base64.decode(base64Str, Base64.DEFAULT);
}
public static String formatTime(String str) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
if (UiUtils.isEmpty(str)) return "";
if (str.contains("-")) {
return str;
}
if (str.length() == 8) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(str.substring(0, 4)).append("-" + str.substring(4, 6)).append("-" + str.substring(6, 8));
return stringBuilder.toString();
}
if (str.length() > 8) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(str.substring(0, 4))
.append("-" + str.substring(4, 6))
.append("-" + str.substring(6, 8))
.append(" " + str.substring(8, 10))
.append(":" + str.substring(10, 12));
return stringBuilder.toString();
}
}
return "";
}
}

View File

@ -0,0 +1,360 @@
package com.police.policedatasystem.viewmodel;
import androidx.annotation.NonNull;
import com.google.gson.Gson;
import com.police.policedatasystem.activity.KeyPersonDetailActivity;
import com.police.policedatasystem.activity.PoliceEmergencyDetailActivity;
import com.police.policedatasystem.fragment.DataFragment;
import com.police.policedatasystem.http.CustomCallBack;
import com.police.policedatasystem.http.requestparams.GetKeyPersonListParams;
import com.police.policedatasystem.http.requestparams.GetOrgKeyPersonListParams;
import com.police.policedatasystem.http.requestparams.GetPoliceEmergencyListParams;
import com.police.policedatasystem.indexActivity;
import com.police.policedatasystem.model.DataCount;
import com.police.policedatasystem.model.KeyPerson;
import com.police.policedatasystem.model.KeyPersonDetail;
import com.police.policedatasystem.model.PoliceEmergency;
import com.police.policedatasystem.model.PoliceEmergencyDetail;
import com.police.policedatasystem.util.Constants;
import com.police.policedatasystem.util.UiUtils;
import java.util.List;
import okhttp3.Call;
public class DataViewModel {
private final DataFragment fragment;
public int pageNum = 1;
public indexActivity activity;
public DataViewModel(DataFragment fragment, indexActivity activity) {
this.fragment = fragment;
this.activity = activity;
}
public void keyPersonInit() {
fragment.loadingShow();
pageNum = 1;
fragment.personList.clear();
//加载数据
GetKeyPersonListParams params = new GetKeyPersonListParams();
params.setPageNum(pageNum + "");
if (fragment.filterType == 0) {
params.setXm(fragment.binding.etInput.getText().toString());
} else {
params.setSfzh(fragment.binding.etInput.getText().toString());
}
activity.requestClient.getKeyPerson(params, new CustomCallBack<List<KeyPerson>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
UiUtils.toast(e.getMessage());
fragment.loadingNone();
}
@Override
public void onSuccess(List<KeyPerson> value) {
fragment.loadingNone();
if (value != null) {
fragment.personList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
}
});
}
public void orgKeyPersonInit() {
fragment.loadingShow();
pageNum = 1;
fragment.personList.clear();
//加载数据
GetOrgKeyPersonListParams params = new GetOrgKeyPersonListParams();
params.setPageNum(pageNum + "");
if (fragment.filterType == 0) {
params.setXm(fragment.binding.etInput.getText().toString());
} else {
params.setSfzh(fragment.binding.etInput.getText().toString());
}
activity.requestClient.getOrgKeyPerson(params, new CustomCallBack<List<KeyPerson>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(List<KeyPerson> value) {
fragment.loadingNone();
if (value != null) {
fragment.personList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
}
});
}
public void keyPersonLoadMore() {
fragment.loadingShow();
//加载数据
GetKeyPersonListParams params = new GetKeyPersonListParams();
pageNum++;
params.setPageNum(pageNum + "");
activity.requestClient.getKeyPerson(params, new CustomCallBack<List<KeyPerson>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
fragment.binding.refreshLayout.finishLoadMore();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(List<KeyPerson> value) {
fragment.loadingNone();
if (value == null || value.size() < Constants.PAGE_SIZE) {
fragment.binding.refreshLayout.setNoMoreData(true);
}
if (value != null) {
fragment.personList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
fragment.binding.refreshLayout.finishLoadMore();
}
});
}
public void keyPersonRefresh() {
fragment.loadingShow();
fragment.personList.clear();
pageNum = 1;
//加载数据
GetKeyPersonListParams params = new GetKeyPersonListParams();
params.setPageNum(pageNum + "");
activity.requestClient.getKeyPerson(params, new CustomCallBack<List<KeyPerson>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
fragment.binding.refreshLayout.finishRefresh();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(List<KeyPerson> value) {
fragment.loadingNone();
if (value != null) {
fragment.personList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
fragment.binding.refreshLayout.finishRefresh();
}
});
}
public void orgKeyPersonLoadMore() {
fragment.loadingShow();
//加载数据
GetOrgKeyPersonListParams params = new GetOrgKeyPersonListParams();
pageNum++;
params.setPageNum(pageNum + "");
activity.requestClient.getOrgKeyPerson(params, new CustomCallBack<List<KeyPerson>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
fragment.binding.refreshLayout.finishLoadMore();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(List<KeyPerson> value) {
fragment.loadingNone();
if (value == null || value.size() < Constants.PAGE_SIZE) {
fragment.binding.refreshLayout.setNoMoreData(true);
}
if (value != null) {
fragment.personList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
fragment.binding.refreshLayout.finishLoadMore();
}
});
}
public void orgKeyPersonRefresh() {
fragment.loadingShow();
fragment.personList.clear();
pageNum = 1;
//加载数据
GetOrgKeyPersonListParams params = new GetOrgKeyPersonListParams();
params.setPageNum(pageNum + "");
activity.requestClient.getOrgKeyPerson(params, new CustomCallBack<List<KeyPerson>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
fragment.binding.refreshLayout.finishRefresh();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(List<KeyPerson> value) {
fragment.loadingNone();
if (value != null) {
fragment.personList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
fragment.binding.refreshLayout.finishRefresh();
}
});
}
public void keyPersonDetail(String sfzh) {
fragment.loadingShow();
activity.requestClient.keyPersonDetail(sfzh, new CustomCallBack<KeyPersonDetail>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(KeyPersonDetail value) {
fragment.loadingNone();
KeyPersonDetailActivity.startAction(activity, new Gson().toJson(value));
}
});
}
/**
* 警情数据初始化
*/
public void policeEmergencyInit() {
fragment.loadingShow();
pageNum = 1;
fragment.policeList.clear();
//加载数据
GetPoliceEmergencyListParams params = new GetPoliceEmergencyListParams();
params.setPageNum(pageNum + "");
if (fragment.filterType == 0) {
params.setJcjbh(fragment.binding.etInput.getText().toString());
} else if (fragment.filterType == 1) {
params.setBjjyqk(fragment.binding.etInput.getText().toString());
} else {
params.setBjrlxdh(fragment.binding.etInput.getText().toString());
}
activity.requestClient.getPoliceEmergency(params, new CustomCallBack<List<PoliceEmergency>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
UiUtils.toast(e.getMessage());
fragment.loadingNone();
}
@Override
public void onSuccess(List<PoliceEmergency> value) {
fragment.loadingNone();
if (value != null) {
fragment.policeList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
}
});
}
public void policeEmergencyRefresh() {
fragment.loadingShow();
pageNum = 1;
fragment.policeList.clear();
//加载数据
GetPoliceEmergencyListParams params = new GetPoliceEmergencyListParams();
params.setPageNum(pageNum + "");
if (fragment.filterType == 0) {
params.setJcjbh(fragment.binding.etInput.getText().toString());
} else if (fragment.filterType == 1) {
params.setBjjyqk(fragment.binding.etInput.getText().toString());
} else {
params.setBjrlxdh(fragment.binding.etInput.getText().toString());
}
activity.requestClient.getPoliceEmergency(params, new CustomCallBack<List<PoliceEmergency>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.binding.refreshLayout.finishRefresh();
UiUtils.toast(e.getMessage());
fragment.loadingNone();
}
@Override
public void onSuccess(List<PoliceEmergency> value) {
fragment.binding.refreshLayout.finishRefresh();
fragment.loadingNone();
if (value != null) {
fragment.policeList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
}
});
}
public void policeEmergencyLoadMore() {
fragment.loadingShow();
//加载数据
GetPoliceEmergencyListParams params = new GetPoliceEmergencyListParams();
pageNum++;
params.setPageNum(pageNum + "");
activity.requestClient.getPoliceEmergency(params, new CustomCallBack<List<PoliceEmergency>>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
fragment.binding.refreshLayout.finishLoadMore();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(List<PoliceEmergency> value) {
fragment.loadingNone();
if (value == null || value.size() < Constants.PAGE_SIZE) {
fragment.binding.refreshLayout.setNoMoreData(true);
}
if (value != null) {
fragment.policeList.addAll(value);
}
fragment.adapter.notifyDataSetChanged();
fragment.binding.refreshLayout.finishLoadMore();
}
});
}
public void policeEmergencyDetail(String jcjbh) {
fragment.loadingShow();
activity.requestClient.getPoliceEmergencyDetail(jcjbh, new CustomCallBack<PoliceEmergencyDetail>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(PoliceEmergencyDetail value) {
fragment.loadingNone();
PoliceEmergencyDetailActivity.startAction(activity, new Gson().toJson(value));
}
});
}
public void getKeyPersonMessageCount() {
fragment.loadingShow();
activity.requestClient.getKeyPersonMessageCount( new CustomCallBack<DataCount>() {
@Override
public void onError(@NonNull Call call, @NonNull Exception e) {
fragment.loadingNone();
UiUtils.toast(e.getMessage());
}
@Override
public void onSuccess(DataCount value) {
fragment.loadingNone();
fragment.binding.tvKeyPersonCount.setText(value.getZdryCount());
fragment.binding.tvPoliceEmergencyCount.setText(value.getJqCount());
fragment.binding.tvCaseDetailsCount.setText(value.getAqCount());
fragment.binding.tvKeyPersonTabCount.setText(value.getZdryCount());
fragment.binding.tvAreaKeyTabCount.setText(value.getZdryDeptCount());
}
});
}
}

View File

@ -0,0 +1,13 @@
package com.police.policedatasystem.viewmodel;
import com.police.policedatasystem.indexActivity;
public class IndexViewModel {
private final indexActivity activity;
public int pageNum = 1;
public IndexViewModel(indexActivity activity) {
this.activity = activity;
}
}

View File

@ -0,0 +1,88 @@
package com.police.policedatasystem.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.drawable.Drawable;
import androidx.annotation.IntRange;
import androidx.annotation.Nullable;
import java.util.List;
public class WaterMarkBg extends Drawable {
private Paint paint = new Paint();
private List<String> labels;
private Context context;
private int degress;//角度
private int fontSize;//字体大小 单位sp
/**
* 初始化构造
*
* @param context 上下文
* @param labels 水印文字列表 多行显示支持
* @param degress 水印角度
* @param fontSize 水印文字大小
*/
public WaterMarkBg(Context context, List<String> labels, int degress, int fontSize) {
this.labels = labels;
this.context = context;
this.degress = degress;
this.fontSize = fontSize;
}
@Override
public void draw(@Nullable Canvas canvas) {
int width = getBounds().right;
int height = getBounds().bottom;
canvas.drawColor(Color.parseColor("#40F3F5F9"));
paint.setColor(Color.parseColor("#50AEAEAE"));
paint.setAntiAlias(true);
paint.setTextSize(sp2px(context, fontSize));
canvas.save();
canvas.rotate(degress);
float textWidth = paint.measureText(labels.get(0));
int index = 0;
for (int positionY = height / 10; positionY <= height; positionY += height / 10 + 80) {
float fromX = -width + (index++ % 2) * textWidth;
for (float positionX = fromX; positionX < width; positionX += textWidth * 2) {
int spacing = 0;//间距
for (String label : labels) {
canvas.drawText(label, positionX, positionY + spacing, paint);
spacing = spacing + 50;
}
}
}
canvas.restore();
}
@Override
public void setAlpha(@IntRange(from = 0, to = 255) int alpha) {
}
@Override
public void setColorFilter(@Nullable ColorFilter colorFilter) {
}
@Override
public int getOpacity() {
return PixelFormat.UNKNOWN;
}
public static int sp2px(Context context, float spValue) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (spValue * fontScale + 0.5f);
}
}

View File

@ -0,0 +1,208 @@
package com.police.policedatasystem.widget;
import android.graphics.Color;
import android.graphics.Paint;
/**
* @author Leon (wshk729@163.com)
* @date 2018/8/24
* <p>
*/
public class WaterMarkInfo {
private int mDegrees;
private int mTextColor;
private int mTextSize;
private boolean mTextBold;
private int mDx;
private int mDy;
private Paint.Align mAlign;
private WaterMarkInfo(int degrees, int textColor, int textSize, boolean textBold, int dx, int dy, Paint.Align align) {
mDegrees = degrees;
mTextColor = textColor;
mTextSize = textSize;
mTextBold = textBold;
mDx = dx;
mDy = dy;
mAlign = align;
}
public int getDegrees() {
return mDegrees;
}
public int getTextColor() {
return mTextColor;
}
public int getTextSize() {
return mTextSize;
}
public int getDx() {
return mDx;
}
public int getDy() {
return mDy;
}
public Paint.Align getAlign() {
return mAlign;
}
public int getAlignInt() {
switch (mAlign) {
case LEFT:
return 0;
case RIGHT:
return 2;
default:
return 1;
}
}
public boolean isTextBold() {
return mTextBold;
}
void setDegrees(int degrees) {
mDegrees = degrees;
}
void setTextColor(int textColor) {
mTextColor = textColor;
}
void setTextSize(int textSize) {
mTextSize = textSize;
}
void setTextBold(boolean textBold) {
mTextBold = textBold;
}
void setDx(int dx) {
mDx = dx;
}
void setDy(int dy) {
mDy = dy;
}
void setAlign(Paint.Align align) {
this.mAlign = align;
}
public static Builder create() {
return new Builder();
}
public static class Builder {
private int mDegrees;
private int mTextColor;
private int mTextSize;
private boolean mTextBold;
private int mDx;
private int mDy;
private Paint.Align mAlign;
private Builder() {
mDegrees = -30;
mTextColor = Color.parseColor("#33000000");
mTextSize = 35;
mTextBold = false;
mDx = 100;
mDy = 240;
mAlign = Paint.Align.CENTER;
}
/**
* 设置水印文字倾斜度
*
* @param degrees 文字倾斜度(默认:-30)
* @return Builder
*/
public Builder setDegrees(int degrees) {
mDegrees = degrees;
return this;
}
/**
* 设置水印文字颜色
*
* @param textColor 文字颜色(默认:#33000000)
* @return Builder
*/
public Builder setTextColor(int textColor) {
mTextColor = textColor;
return this;
}
/**
* 设置水印文字大小单位px
*
* @param textSize 文字大小(默认:42px)
* @return Builder
*/
public Builder setTextSize(int textSize) {
mTextSize = textSize;
return this;
}
/**
* 设置水印文字是否加粗
*
* @param textBold 文字加粗(默认:false)
* @return Builder
*/
public Builder setTextBold(boolean textBold) {
mTextBold = textBold;
return this;
}
/**
* 设置水印文字X轴间距单位px
*
* @param dx 文字X轴间距(默认:100px)
* @return Builder
*/
public Builder setDx(int dx) {
mDx = dx;
return this;
}
/**
* 设置水印文字Y轴间距单位px
*
* @param dy 文字Y轴间距(默认:240px)
* @return Builder
*/
public Builder setDy(int dy) {
mDy = dy;
return this;
}
/**
* 设置水印文字对齐方式
*
* @param align 对齐方式(默认:Center)
* @return Builder
*/
public Builder setAlign(Paint.Align align) {
mAlign = align;
return this;
}
/**
* 生成水印全局配置信息
*
* @return 配置信息
*/
public WaterMarkInfo generate() {
return new WaterMarkInfo(mDegrees, mTextColor, mTextSize, mTextBold, mDx, mDy, mAlign);
}
}
}

View File

@ -0,0 +1,188 @@
package com.police.policedatasystem.widget;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Paint;
import android.view.LayoutInflater;
import com.police.policedatasystem.R;
import java.util.ArrayList;
import java.util.List;
/**
* @author Leon (wshk729@163.com)
* @date 2018/8/24
* <p>
*/
public class WaterMarkManager {
static WaterMarkInfo INFO = null;
static String[] CONTENT = null;
static List<WaterMarkView> LIST = new ArrayList<>();
/**
* 设置水印全局配置信息
*
* @param info 配置信息
*/
public static void setInfo(WaterMarkInfo info) {
INFO = info;
}
/**
* 获取一个满屏水印View
*
* @param activity activity
*/
@SuppressLint("InflateParams")
public static WaterMarkView getView(Activity activity) {
return (WaterMarkView) LayoutInflater.from(activity).inflate(R.layout.view_water_mark, null);
}
/**
* WaterMarkInfo初始化判断
*/
private static void assertInitialized() {
if (INFO == null) {
INFO = WaterMarkInfo.create().generate();
}
}
/**
* 同步设置全部水印文字信息
*
* @param content 文字信息
*/
public static void setText(String... content) {
assertInitialized();
CONTENT = content;
if (LIST.size() > 0) {
for (WaterMarkView view : LIST) {
if (view != null) {
view.setSyncText(content);
}
}
}
}
/**
* 同步设置全部水印倾斜角度
*
* @param degrees 倾斜角度(默认:-30)
*/
public static void setDegrees(int degrees) {
assertInitialized();
INFO.setDegrees(degrees);
if (LIST.size() > 0) {
for (WaterMarkView view : LIST) {
if (view != null) {
view.setSyncDegrees(degrees);
}
}
}
}
/**
* 同步设置全部水印字体颜色
*
* @param textColor 字体颜色(默认:#33000000)
*/
public static void setTextColor(int textColor) {
assertInitialized();
INFO.setTextColor(textColor);
if (LIST.size() > 0) {
for (WaterMarkView view : LIST) {
if (view != null) {
view.setSyncTextColor(textColor);
}
}
}
}
/**
* 同步设置全部水印字体大小单位px
*
* @param textSize 字体大小(默认:42px)
*/
public static void setTextSize(int textSize) {
assertInitialized();
INFO.setTextSize(textSize);
if (LIST.size() > 0) {
for (WaterMarkView view : LIST) {
if (view != null) {
view.setSyncTextSize(textSize);
}
}
}
}
/**
* 同步设置全部水印字体是否粗体
*
* @param textBold 是否粗体(默认:false)
*/
public static void setTextBold(boolean textBold) {
assertInitialized();
INFO.setTextBold(textBold);
if (LIST.size() > 0) {
for (WaterMarkView view : LIST) {
if (view != null) {
view.setSyncTextBold(textBold);
}
}
}
}
/**
* 同步设置全部水印X轴偏移量单位px
*
* @param dx X轴偏移量(默认:100px)
*/
public static void setDx(int dx) {
assertInitialized();
INFO.setDx(dx);
if (LIST.size() > 0) {
for (WaterMarkView view : LIST) {
if (view != null) {
view.setSyncDx(dx);
}
}
}
}
/**
* 同步设置全部水印Y轴偏移量单位px
*
* @param dy Y轴偏移量(默认:240px)
*/
public static void setDy(int dy) {
assertInitialized();
INFO.setDy(dy);
if (LIST.size() > 0) {
for (WaterMarkView view : LIST) {
if (view != null) {
view.setSignDy(dy);
}
}
}
}
/**
* 同步设置全部水印对齐方式
*
* @param align 对齐方式(默认:Center)
*/
public static void setAlign(Paint.Align align) {
assertInitialized();
INFO.setAlign(align);
if (LIST.size() > 0) {
for (WaterMarkView view : LIST) {
if (view != null) {
view.setSignAlign(align);
}
}
}
}
}

View File

@ -0,0 +1,334 @@
package com.police.policedatasystem.widget;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import com.police.policedatasystem.R;
public class WaterMarkView extends View {
private static final String DEFAULT_SEPARATOR = "///";
private TextPaint mTextPaint = new TextPaint();
private String[] mText;
private int mDegrees;
private int mTextColor;
private int mTextSize=35;
private boolean mTextBold;
private int mDx;
private int mDy;
private Paint.Align mAlign;
private boolean mSync;
private int textWidth, textHeight;
public WaterMarkView(Context context) {
this(context, null);
}
public WaterMarkView(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.WaterMarkView);
mDegrees = typedArray.getInt(R.styleable.WaterMarkView_water_mark_degree, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getDegrees() : -30);
String text = typedArray.getString(R.styleable.WaterMarkView_water_mark_text);
if (text != null) {
mText = text.split(DEFAULT_SEPARATOR);
}
mTextColor = typedArray.getColor(R.styleable.WaterMarkView_water_mark_textColor, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getTextColor() : Color.parseColor("#33000000"));
mTextSize = typedArray.getDimensionPixelSize(R.styleable.WaterMarkView_water_mark_textSize, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getTextSize() : 42);
mTextBold = typedArray.getBoolean(R.styleable.WaterMarkView_water_mark_textBold, WaterMarkManager.INFO != null && WaterMarkManager.INFO.isTextBold());
mDx = typedArray.getDimensionPixelSize(R.styleable.WaterMarkView_water_mark_dx, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getDx() : 100);
mDy = typedArray.getDimensionPixelSize(R.styleable.WaterMarkView_water_mark_dy, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getDy() : 240);
int align = typedArray.getInt(R.styleable.WaterMarkView_water_mark_align, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getAlignInt() : 1);
mAlign = align == 0 ? Paint.Align.LEFT : align == 2 ? Paint.Align.RIGHT : Paint.Align.CENTER;
mSync = typedArray.getBoolean(R.styleable.WaterMarkView_water_mark_sync, true);
typedArray.recycle();
setBackgroundColor(Color.TRANSPARENT);
mTextPaint.setAntiAlias(true);
mTextPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
mTextPaint.setColor(mTextColor);
mTextPaint.setTextSize(mTextSize);
mTextPaint.setTypeface(mTextBold ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
mTextPaint.setTextAlign(mAlign);
mText = mText == null && mSync ? WaterMarkManager.CONTENT : mText;
textWidth = 0;
textHeight = 0;
if (mText != null && mText.length > 0) {
for (String s : mText) {
Rect tvRect = new Rect();
mTextPaint.getTextBounds(s, 0, s.length(), tvRect);
textWidth = textWidth > tvRect.width() ? textWidth : tvRect.width();
textHeight += (tvRect.height() + 10);
}
}
if (mSync) {
WaterMarkManager.LIST.add(this);
}
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (mText != null && mText.length > 0) {
int measuredWidth = getMeasuredWidth();
int measuredHeight = getMeasuredHeight();
if (measuredWidth == 0 || measuredHeight == 0) {
return;
}
int canvasLength = measuredWidth > measuredHeight ? measuredWidth : measuredHeight;
canvas.save();
canvas.rotate(mDegrees, measuredWidth / 2, measuredHeight / 2);
canvas.save();
int y = 0;
boolean odd = true;
while (y < canvasLength + textHeight) {
int x = odd ? 0 : -(textWidth + mDx) / 2;
while (x < canvasLength + textWidth) {
drawTexts(mText, mTextPaint, canvas, x, y);
x = x + textWidth + mDx;
}
y = y + textHeight + mDy;
odd = !odd;
}
canvas.restore();
}
}
private void drawTexts(String[] ss, Paint paint, Canvas canvas, int x, int y) {
Paint.FontMetrics fontMetrics = paint.getFontMetrics();
float top = fontMetrics.top;
float bottom = fontMetrics.bottom;
int length = ss.length;
float total = (length - 1) * (bottom - top) + (fontMetrics.descent - fontMetrics.ascent);
float offset = total / 2 - bottom;
for (int i = 0; i < length; i++) {
float yAxis = -(length - i - 1) * (bottom - top) + offset;
canvas.drawText(ss[i], x, y + yAxis + 10, paint);
}
}
/**
* 设置水印文字内容
*
* @param text 文字内容
*/
public void setText(String... text) {
mText = text;
textWidth = 0;
textHeight = 0;
if (mText != null && mText.length > 0) {
for (String s : mText) {
Rect tvRect = new Rect();
mTextPaint.getTextBounds(s, 0, s.length(), tvRect);
textWidth = textWidth > tvRect.width() ? textWidth : tvRect.width();
textHeight += (tvRect.height() + 10);
}
}
postInvalidate();
}
/**
* 同步设置水印文字内容
*
* @param text 文字内容
*/
void setSyncText(String... text) {
if (mSync) {
setText(text);
}
}
/**
* 设置水印倾斜角度
*
* @param degrees 倾斜角度(默认:-30)
*/
public void setDegrees(int degrees) {
mDegrees = degrees;
postInvalidate();
}
/**
* 同步设置水印倾斜角度
*
* @param degrees 倾斜角度(默认:-30)
*/
void setSyncDegrees(int degrees) {
if (mSync) {
setDegrees(degrees);
}
}
/**
* 设置水印字体颜色
*
* @param textColor 字体颜色(默认:#33000000)
*/
public void setTextColor(int textColor) {
mTextColor = textColor;
mTextPaint.setColor(mTextColor);
postInvalidate();
}
/**
* 同步设置水印字体颜色
*
* @param textColor 字体颜色(默认:#33000000)
*/
void setSyncTextColor(int textColor) {
if (mSync) {
setTextColor(textColor);
}
}
/**
* 设置水印字体大小单位px
*
* @param textSize 字体大小(默认:42px)
*/
public void setTextSize(int textSize) {
mTextSize = textSize;
mTextPaint.setTextSize(mTextSize);
postInvalidate();
}
/**
* 同步设置水印字体大小单位px
*
* @param textSize 字体大小(默认:42px)
*/
void setSyncTextSize(int textSize) {
if (mSync) {
setTextSize(textSize);
}
}
/**
* 设置水印字体是否粗体
*
* @param textBold 是否粗体(默认:false)
*/
public void setTextBold(boolean textBold) {
mTextBold = textBold;
mTextPaint.setTypeface(mTextBold ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
postInvalidate();
}
/**
* 同步设置水印字体是否粗体
*
* @param textBold 是否粗体(默认:false)
*/
void setSyncTextBold(boolean textBold) {
if (mSync) {
setTextBold(textBold);
}
}
/**
* 设置水印X轴偏移量单位px
*
* @param dx X轴偏移量(默认:100px)
*/
public void setDx(int dx) {
this.mDx = dx;
postInvalidate();
}
/**
* 同步设置水印X轴偏移量单位px
*
* @param dx X轴偏移量(默认:100px)
*/
void setSyncDx(int dx) {
if (mSync) {
setDx(dx);
}
}
/**
* 设置水印Y轴偏移量单位px
*
* @param dy Y轴偏移量(默认:240px)
*/
public void setDy(int dy) {
this.mDy = dy;
postInvalidate();
}
/**
* 同步设置水印Y轴偏移量单位px
*
* @param dy Y轴偏移量(默认:240px)
*/
void setSignDy(int dy) {
if (mSync) {
setDy(dy);
}
}
/**
* 设置水印对齐方式
*
* @param align 对齐方式(默认:Center)
*/
public void setAlign(Paint.Align align) {
this.mAlign = align;
postInvalidate();
}
/**
* 同步设置水印对齐方式
*
* @param align 对齐方式(默认:Center)
*/
void setSignAlign(Paint.Align align) {
if (mSync) {
setAlign(align);
}
}
/**
* 销毁相关页面时调用切记
*/
public void onDestroy() {
if (mSync) {
WaterMarkManager.LIST.remove(this);
}
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
return false;
}
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouchEvent(MotionEvent event) {
return false;
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/selected_color" android:state_checked="true" />
<item android:color="@color/normal_color" />
</selector>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp" android:color="#ccc"/> <!-- 边框颜色和宽度 -->
<corners android:radius="10dp"/>
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#4b8e01"/>
<corners android:radius="2dp"/>
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#de7900"/>
<corners android:radius="2dp"/>
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/selected_color"/>
<corners android:radius="2dp"/>
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp" android:color="#ccc"/> <!-- 边框颜色和宽度 -->
<corners android:radius="3dp"/>
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#fff"/>
<corners android:radius="7dp"/>
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp" android:color="#ccc"/> <!-- 边框颜色和宽度 -->
<corners android:radius="7dp"/>
</shape>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#052eba" />
<corners android:radius="7dp" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#052eba"/>
<corners android:bottomRightRadius="7dp"
android:topRightRadius="7dp"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#f7f7f7"/>
<corners android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".indexActivity">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fc_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include
android:id="@+id/nav_bar_group"
android:visibility="invisible"
layout="@layout/bottom_navigation_view" />
<com.police.policedatasystem.widget.WaterMarkView
android:id="@+id/wm_wm"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:singleLine="false"
app:water_mark_align="CENTER"
app:water_mark_degree="-30"
app:water_mark_dx="100px"
app:water_mark_dy="240px"
app:water_mark_sync="true"
app:water_mark_text="实战赋能"
app:water_mark_textBold="false"
app:water_mark_textColor="@color/water_color"
app:water_mark_textSize="30px" />
</RelativeLayout>

View File

@ -0,0 +1,896 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f7f7f7"
tools:context=".activity.KeyPersonDetailActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/white"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="15dp"
android:src="@drawable/back" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="重点人详情"
android:textColor="@color/black"
android:textSize="15sp" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:scrollbars="none">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_person_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="13dp"
android:layout_marginTop="14dp"
android:background="@drawable/all_2_selected_bg"
android:padding="2dp"
android:src="@drawable/mine"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:text="基础信息"
android:textColor="#FF052EBA"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/iv_person_icon"
app:layout_constraintLeft_toRightOf="@id/iv_person_icon"
app:layout_constraintTop_toTopOf="@id/iv_person_icon" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_base_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="8dp"
android:background="@drawable/all_7_fff_bg"
android:padding="13dp"
app:layout_constraintTop_toBottomOf="@id/iv_person_icon">
<ImageView
android:id="@+id/iv_photo"
android:layout_width="47dp"
android:layout_height="57dp"
android:background="#FFE5E5E5"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:text="张三"
android:textColor="#FF333333"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintLeft_toRightOf="@id/iv_photo"
app:layout_constraintTop_toTopOf="@id/iv_photo" />
<TextView
android:id="@+id/tv_gang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="/"
android:textColor="#FF333333"
android:textSize="14sp"
app:layout_constraintLeft_toRightOf="@id/tv_name"
app:layout_constraintTop_toTopOf="@id/tv_name" />
<TextView
android:id="@+id/tv_sex"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="男"
android:textColor="#FF333333"
android:textSize="14sp"
app:layout_constraintLeft_toRightOf="@id/tv_gang"
app:layout_constraintTop_toTopOf="@id/tv_gang" />
<TextView
android:id="@+id/tv_nation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginBottom="5dp"
android:background="@drawable/all_3_ccc_bg"
android:paddingHorizontal="5dp"
android:paddingVertical="1dp"
android:text="汉族"
android:textColor="#333333"
android:textSize="13sp"
app:layout_constraintBottom_toBottomOf="@id/iv_photo"
app:layout_constraintLeft_toRightOf="@id/iv_photo" />
<TextView
android:id="@+id/tv_marital"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginBottom="5dp"
android:background="@drawable/all_3_ccc_bg"
android:paddingHorizontal="5dp"
android:paddingVertical="1dp"
android:textColor="#333333"
android:textSize="13sp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@id/iv_photo"
app:layout_constraintLeft_toRightOf="@id/tv_nation"
tools:text="已婚" />
<TextView
android:id="@+id/tv_bq"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginBottom="5dp"
android:visibility="invisible"
android:background="@drawable/all_3_ccc_bg"
android:paddingHorizontal="5dp"
android:paddingVertical="1dp"
android:textColor="#333333"
android:textSize="13sp"
app:layout_constraintBottom_toBottomOf="@id/iv_photo"
app:layout_constraintLeft_toRightOf="@id/tv_marital"
tools:text="xx重点人员" />
<TextView
android:id="@+id/tv_id_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="身份证号:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_photo" />
<TextView
android:id="@+id/detail_sfzh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="15dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_id_card"
app:layout_constraintTop_toBottomOf="@id/iv_photo" />
<TextView
android:id="@+id/tv_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="手机号:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_id_card" />
<TextView
android:id="@+id/detail_sjh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_phone"
app:layout_constraintTop_toBottomOf="@id/tv_id_card" />
<TextView
android:id="@+id/tv_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="户籍地:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_phone" />
<TextView
android:id="@+id/detail_hj"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_address"
app:layout_constraintTop_toBottomOf="@id/tv_phone" />
<TextView
android:id="@+id/tv_link_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="关联地址:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_address" />
<TextView
android:id="@+id/detail_gldz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_link_address"
app:layout_constraintTop_toBottomOf="@id/tv_address" />
<TextView
android:id="@+id/tv_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="服务场所:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_link_address" />
<TextView
android:id="@+id/detail_fwcs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_area"
app:layout_constraintTop_toBottomOf="@id/tv_link_address" />
<TextView
android:id="@+id/tv_car"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="车辆信息:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_area" />
<TextView
android:id="@+id/detail_clxx"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_car"
app:layout_constraintTop_toBottomOf="@id/tv_area" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/iv_location_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="13dp"
android:layout_marginTop="23dp"
android:background="@drawable/all_2_de7900_bg"
android:padding="2dp"
android:src="@drawable/icon_14"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_base_info" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:text="位置信息"
android:textColor="#de7900"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/iv_location_icon"
app:layout_constraintLeft_toRightOf="@id/iv_location_icon"
app:layout_constraintTop_toTopOf="@id/iv_location_icon" />
<LinearLayout
android:id="@+id/ll_location_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="8dp"
android:background="@drawable/all_7_fff_bg"
android:orientation="vertical"
android:padding="13dp"
app:layout_constraintTop_toBottomOf="@id/iv_location_icon">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_last_location_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="手机实时基站位置:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_last_location_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_last_location_phone_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="手机最后定位时间:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_last_location_phone_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_last_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="车辆抓拍最后位置:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_last_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_last_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="车辆抓拍最后时间:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_last_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_face_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="人脸抓拍最后位置:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_face_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_face_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="人脸抓拍最后时间:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_face_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_fly_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最近飞机订票信息:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_fly_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_fly_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最近飞机起飞时间:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_fly_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_train_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最近火车订票信息:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_train_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_train_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最近火车发车时间:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_train_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_bus_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最近客车订票信息:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_bus_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_bus_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最近客车发车时间:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_bus_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_rest_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最近省内住宿信息:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_rest_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginVertical="5dp"-->
<!-- android:orientation="horizontal">-->
<!-- <TextView-->
<!-- android:id="@+id/tv_title_case_count"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="历史案件次数:"-->
<!-- android:textColor="#999"-->
<!-- android:textSize="14sp" />-->
<!-- <TextView-->
<!-- android:id="@+id/tv_body_case_count"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="5dp"-->
<!-- android:textColor="#f00"-->
<!-- android:textSize="14sp"-->
<!-- tools:text="1" />-->
<!-- </LinearLayout>-->
</LinearLayout>
<ImageView
android:id="@+id/iv_ctrl_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="13dp"
android:layout_marginTop="23dp"
android:background="@drawable/all_2_4b8e01_bg"
android:padding="2dp"
android:src="@drawable/icon_14"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_location_group" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:text="列控信息"
android:textColor="#4B8E01"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/iv_ctrl_icon"
app:layout_constraintLeft_toRightOf="@id/iv_ctrl_icon"
app:layout_constraintTop_toTopOf="@id/iv_ctrl_icon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="8dp"
android:background="@drawable/all_7_fff_bg"
android:orientation="vertical"
android:padding="13dp"
app:layout_constraintTop_toBottomOf="@id/iv_ctrl_icon">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_ctrl_level"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="管理级别:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_ctrl_level"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_ctrl_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="列管类别:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_ctrl_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_ctrl_tag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="列控警种:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_ctrl_tag"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_ctrl_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="列控时间:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_ctrl_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_ctrl_cause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="列控原因:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_ctrl_cause"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_ctrl_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="责任单位:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_ctrl_person"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title_ctrl_police"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="责任民警:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_body_ctrl_police"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
<com.police.policedatasystem.widget.WaterMarkView
android:id="@+id/wm"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:singleLine="false"
app:water_mark_align="CENTER"
app:water_mark_degree="-30"
app:water_mark_dx="100px"
app:water_mark_dy="240px"
app:water_mark_sync="true"
app:water_mark_text="实战赋能"
app:water_mark_textBold="false"
app:water_mark_textColor="@color/water_color"
app:water_mark_textSize="30px" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,581 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f7f7f7"
android:fitsSystemWindows="true"
tools:context=".activity.PoliceEmergencyDetailActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/white"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="15dp"
android:src="@drawable/back" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="警情详情"
android:textColor="@color/black"
android:textSize="15sp" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:scrollbars="none">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_person_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="13dp"
android:layout_marginTop="14dp"
android:background="@drawable/all_2_selected_bg"
android:padding="2dp"
android:src="@drawable/baojing"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:text="警情信息"
android:textColor="#FF052EBA"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/iv_person_icon"
app:layout_constraintLeft_toRightOf="@id/iv_person_icon"
app:layout_constraintTop_toTopOf="@id/iv_person_icon" />
<LinearLayout
android:id="@+id/ll_location_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="8dp"
android:background="@drawable/all_7_fff_bg"
android:orientation="vertical"
android:padding="13dp"
app:layout_constraintTop_toBottomOf="@id/iv_person_icon">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="警情编号:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_jcjbh"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报警内容:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_bjjyqk"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="处理类型:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_cllb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
tools:text="报警或求助"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="处理结果:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_cljg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
tools:text="其它"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="警情类别:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_jqlb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
tools:text="求助"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报警电话:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_bjrlxdh"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报警时间:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_jjsj"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报警位置:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_asjfsdddzmc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="出警单位:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_cjdwgajgjgdm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="出警民警:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_cjrxm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/iv_location_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="13dp"
android:layout_marginTop="23dp"
android:background="@drawable/all_2_de7900_bg"
android:padding="2dp"
android:src="@drawable/mine"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_location_group" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:text="报警电话登记人信息"
android:textColor="#de7900"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/iv_location_icon"
app:layout_constraintLeft_toRightOf="@id/iv_location_icon"
app:layout_constraintTop_toTopOf="@id/iv_location_icon" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_base_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="8dp"
android:background="@drawable/all_7_fff_bg"
android:padding="13dp"
app:layout_constraintTop_toBottomOf="@id/iv_location_icon">
<ImageView
android:id="@+id/iv_zp"
android:layout_width="47dp"
android:layout_height="57dp"
android:background="#FFE5E5E5"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_xm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:text="张三"
android:textColor="#FF333333"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintLeft_toRightOf="@id/iv_zp"
app:layout_constraintTop_toTopOf="@id/iv_zp" />
<TextView
android:id="@+id/tv_gang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="/"
android:textColor="#FF333333"
android:textSize="14sp"
app:layout_constraintLeft_toRightOf="@id/tv_xm"
app:layout_constraintTop_toTopOf="@id/tv_xm" />
<TextView
android:id="@+id/tv_xb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="男"
android:textColor="#FF333333"
android:textSize="14sp"
app:layout_constraintLeft_toRightOf="@id/tv_gang"
app:layout_constraintTop_toTopOf="@id/tv_gang" />
<TextView
android:id="@+id/tv_mz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginBottom="5dp"
android:background="@drawable/all_3_ccc_bg"
android:paddingHorizontal="5dp"
android:paddingVertical="1dp"
android:text="汉族"
android:textColor="#333333"
android:textSize="13sp"
app:layout_constraintBottom_toBottomOf="@id/iv_zp"
app:layout_constraintLeft_toRightOf="@id/iv_zp" />
<TextView
android:id="@+id/tv_hyzk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginBottom="5dp"
android:background="@drawable/all_3_ccc_bg"
android:paddingHorizontal="5dp"
android:paddingVertical="1dp"
android:textColor="#333333"
android:textSize="13sp"
app:layout_constraintBottom_toBottomOf="@id/iv_zp"
app:layout_constraintLeft_toRightOf="@id/tv_mz"
tools:text="已婚" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="10dp"
app:layout_constraintTop_toBottomOf="@id/iv_zp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/tv_link_address">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="身份证号:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_sfzh"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/tv_link_address">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="年龄:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_nl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/tv_link_address">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="标签:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_bq"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/tv_link_address">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="籍贯:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_jg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/tv_link_address">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="服务场所:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_fwcs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="无"
android:textColor="#333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="5dp"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/tv_link_address">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="历史报警次数:"
android:textColor="#999"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_lsbjcs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="0"
android:textColor="#F00"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
<com.police.policedatasystem.widget.WaterMarkView
android:id="@+id/wm"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:singleLine="false"
app:water_mark_align="CENTER"
app:water_mark_degree="-30"
app:water_mark_dx="100px"
app:water_mark_dy="240px"
app:water_mark_sync="true"
app:water_mark_text="实战赋能"
app:water_mark_textBold="false"
app:water_mark_textColor="@color/water_color"
app:water_mark_textSize="30px" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/nav_bar_1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/nav_bar_icon_1"
android:layout_width="30dp"
android:layout_height="30dp"
android:padding="5dp"
android:src="@mipmap/icon_data_selected" />
<TextView
android:id="@+id/nav_bar_text_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="数据套餐"
android:textColor="@color/selected_color" />
</LinearLayout>
<LinearLayout
android:id="@+id/nav_bar_2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/nav_bar_icon_2"
android:layout_width="30dp"
android:layout_height="30dp"
android:padding="5dp"
android:src="@mipmap/icon_apply_normal" />
<TextView
android:id="@+id/nav_bar_text_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="申请支援"
android:textColor="@color/normal_color" />
</LinearLayout>
<LinearLayout
android:id="@+id/nav_bar_3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/nav_bar_icon_3"
android:layout_width="30dp"
android:layout_height="30dp"
android:padding="5dp"
android:src="@mipmap/icon_mine_normal" />
<TextView
android:id="@+id/nav_bar_text_3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="我的赋能"
android:textColor="@color/normal_color" />
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,31 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="100dp"
android:layout_height="80dp"
android:orientation="vertical"
android:background="@drawable/all_3_ccc_bg">
<TextView
android:id="@+id/textView1"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="姓名"
android:gravity="center"
android:background="@color/white"
android:textSize="16sp"
android:clickable="true"
android:focusable="true"/>
<TextView
android:id="@+id/textView2"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="身份证号"
android:background="@color/white"
android:gravity="center"
android:textSize="16sp"
android:clickable="true"
android:focusable="true"/>
<!-- 可以添加更多菜单项 -->
</LinearLayout>

View File

@ -0,0 +1,41 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="100dp"
android:layout_height="80dp"
android:background="@drawable/all_3_ccc_bg"
android:orientation="vertical">
<TextView
android:id="@+id/textView3"
android:layout_width="100dp"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="警情编号"
android:textSize="16sp" />
<TextView
android:id="@+id/textView4"
android:layout_width="100dp"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="报警内容"
android:textSize="16sp" />
<TextView
android:id="@+id/textView5"
android:layout_width="100dp"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="报警电话"
android:textSize="16sp" />
<!-- 可以添加更多菜单项 -->
</LinearLayout>

View File

@ -0,0 +1,52 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="100dp"
android:layout_height="80dp"
android:background="@drawable/all_3_ccc_bg"
android:orientation="vertical">
<TextView
android:id="@+id/textView6"
android:layout_width="100dp"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="案件编号"
android:textSize="16sp" />
<TextView
android:id="@+id/textView7"
android:layout_width="100dp"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="案件名称"
android:textSize="16sp" />
<TextView
android:id="@+id/textView8"
android:layout_width="100dp"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="嫌疑人姓名"
android:textSize="16sp" />
<TextView
android:id="@+id/textView9"
android:layout_width="100dp"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="受害人姓名"
android:textSize="16sp" />
<!-- 可以添加更多菜单项 -->
</LinearLayout>

View File

@ -0,0 +1,76 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/all_7_line_ccc_bg"
android:paddingHorizontal="15dp"
android:paddingVertical="2dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="处置警情"
android:textSize="16sp" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:gravity="center_vertical"
android:focusable="true"
android:text="处置案情"
android:textSize="16sp" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="管控重点人"
android:textSize="16sp" />
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="追踪逃犯"
android:textSize="16sp" />
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="核查线索"
android:textSize="16sp" />
<TextView
android:id="@+id/textView6"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="核验信息"
android:textSize="16sp" />
<!-- 可以添加更多菜单项 -->
</LinearLayout>

View File

@ -0,0 +1,66 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/all_7_line_ccc_bg"
android:orientation="vertical"
android:paddingHorizontal="15dp"
android:paddingVertical="2dp">
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="赋能编码"
android:textSize="16sp" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="申请事由"
android:textSize="16sp" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="申请时间"
android:textSize="16sp" />
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="信息来源"
android:textSize="16sp" />
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="办理状态"
android:textSize="16sp" />
<!-- 可以添加更多菜单项 -->
</LinearLayout>

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".indexActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="58dp"
android:gravity="center"
android:paddingTop="8dp">
<View
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/jinghui" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="吉林公安大数据实战赋能系统"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="100dp"
android:background="@drawable/top_10_f7_bg" />
<RelativeLayout
android:id="@+id/table_group"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="60dp"
android:background="@drawable/all_7_fff_bg"
android:gravity="center_vertical"
android:paddingHorizontal="10dp">
<TextView
android:id="@+id/tv_my_key_person"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:gravity="center"
android:text="申请事由:"
android:textColor="@color/normal_color"
android:textSize="16sp" />
<RelativeLayout
android:id="@+id/type_group"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="5dp"
android:layout_toRightOf="@id/tv_my_key_person"
android:background="@drawable/all_10_ccc_bg"
android:paddingHorizontal="15dp">
<TextView
android:id="@+id/tv_apply_search_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="处置警情"
android:textColor="@color/black"
android:textSize="16sp" />
<View
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="5dp"
android:background="@drawable/jaintou" />
</RelativeLayout>
</RelativeLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/table_group"
android:layout_marginTop="15dp">
<include layout="@layout/item_apply_fragment_1" />
</FrameLayout>
<RelativeLayout
android:id="@+id/rl_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<ProgressBar
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerInParent="true" />
</RelativeLayout>
</RelativeLayout>

View File

@ -0,0 +1,359 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".indexActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="58dp"
android:gravity="center"
android:paddingTop="8dp">
<View
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/jinghui" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="吉林公安大数据实战赋能系统"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="100dp"
android:background="@drawable/top_10_f7_bg" />
<RelativeLayout
android:id="@+id/table_group"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="60dp"
android:background="@drawable/all_7_fff_bg"
android:paddingTop="5dp">
<LinearLayout
android:id="@+id/ll_key_person"
android:layout_width="73dp"
android:layout_height="match_parent"
android:layout_marginStart="40dp"
android:gravity="center"
android:orientation="vertical">
<View
android:id="@+id/icon_key_person"
android:layout_width="28dp"
android:layout_height="33dp"
android:background="@drawable/mine_normal" />
<TextView
android:id="@+id/tv_key_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="重点人"
android:textColor="@color/selected_color"
android:textSize="14sp" />
<View
android:id="@+id/select_key_person"
android:layout_width="28dp"
android:layout_height="3dp"
android:layout_marginTop="3dp"
android:background="@color/selected_color" />
</LinearLayout>
<TextView
android:id="@+id/tv_key_person_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/ll_key_person"
android:layout_marginLeft="45dp"
android:background="@drawable/all_7_main_bg"
android:paddingHorizontal="5dp"
android:textColor="@color/white"
android:textSize="10sp"
tools:text="99+" />
<LinearLayout
android:id="@+id/ll_police_emergency"
android:layout_width="73dp"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">
<View
android:id="@+id/icon_police_emergency"
android:layout_width="28dp"
android:layout_height="33dp"
android:background="@drawable/huizhang_icon" />
<TextView
android:id="@+id/tv_police_emergency"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="警情"
android:textColor="@color/black"
android:textSize="14sp" />
<View
android:id="@+id/select_police_emergency"
android:layout_width="28dp"
android:layout_height="3dp"
android:layout_marginTop="3dp"
android:background="@color/white" />
</LinearLayout>
<TextView
android:id="@+id/tv_police_emergency_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/ll_police_emergency"
android:layout_marginLeft="45dp"
android:background="@drawable/all_7_main_bg"
android:paddingHorizontal="5dp"
android:textColor="@color/white"
android:textSize="10sp"
tools:text="99+" />
<LinearLayout
android:id="@+id/ll_case_details"
android:layout_width="73dp"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_marginEnd="40dp"
android:gravity="center"
android:orientation="vertical">
<View
android:id="@+id/icon_case_details"
android:layout_width="28dp"
android:layout_height="33dp"
android:background="@drawable/wenjianjia_icon" />
<TextView
android:id="@+id/tv_case_details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="案情"
android:textColor="@color/black"
android:textSize="14sp" />
<View
android:id="@+id/select_case_details"
android:layout_width="28dp"
android:layout_height="3dp"
android:layout_marginTop="3dp"
android:background="@color/white" />
</LinearLayout>
<TextView
android:id="@+id/tv_case_details_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/ll_case_details"
android:layout_marginLeft="45dp"
android:background="@drawable/all_7_main_bg"
android:paddingHorizontal="5dp"
android:textColor="@color/white"
android:textSize="10sp"
tools:text="99+" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/type_group"
android:layout_width="100dp"
android:layout_height="34dp"
android:layout_below="@id/table_group"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp"
android:background="@drawable/all_7_fff_bg">
<TextView
android:id="@+id/tv_search_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="姓名"
android:textColor="@color/black"
android:textSize="13sp" />
<View
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="5dp"
android:background="@drawable/jaintou" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="34dp"
android:layout_below="@id/table_group"
android:layout_marginStart="7dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_toRightOf="@id/type_group"
android:background="@drawable/all_7_fff_bg">
<View
android:layout_width="17dp"
android:layout_height="17dp"
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:background="@drawable/search" />
<EditText
android:id="@+id/et_input"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="27dp"
android:layout_marginEnd="51dp"
android:background="#fff"
android:textColor="#333"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_search_btn"
android:layout_width="51dp"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:background="@drawable/right_7_052eba_bg"
android:gravity="center"
android:text="搜索"
android:textColor="@color/white"
android:textSize="13sp"
android:textStyle="bold" />
</RelativeLayout>
<LinearLayout
android:id="@+id/tab_group"
android:layout_width="match_parent"
android:layout_height="38dp"
android:layout_below="@id/type_group"
android:orientation="horizontal">
<RelativeLayout
android:id="@+id/ll_my_key_person"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tv_my_key_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="我的重点人"
android:textColor="@color/selected_color"
android:textSize="13sp"
android:textStyle="bold" />
<View
android:id="@+id/select_my_key_person"
android:layout_width="17dp"
android:layout_height="3dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="3dp"
android:background="#0000ff" />
<TextView
android:id="@+id/tv_key_person_tab_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_toRightOf="@id/tv_my_key_person"
android:background="@drawable/all_7_main_bg"
android:paddingHorizontal="5dp"
android:textColor="@color/white"
android:textSize="10sp"
tools:text="99+" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/ll_area_key_person"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tv_area_key_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="辖区(警种)重点人"
android:textColor="#666"
android:textSize="13sp"
android:textStyle="bold" />
<View
android:id="@+id/select_area_key_person"
android:layout_width="17dp"
android:layout_height="3dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="3dp"
android:background="@color/transparent_color" />
<TextView
android:id="@+id/tv_area_key_tab_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_toRightOf="@id/tv_area_key_person"
android:background="@drawable/all_7_main_bg"
android:paddingHorizontal="5dp"
android:textColor="@color/white"
android:textSize="10sp"
tools:text="99+" />
</RelativeLayout>
</LinearLayout>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/tab_group">
<!-- 这里放置你的RecyclerView或其他需要刷新的布局 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_group"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<RelativeLayout
android:id="@+id/rl_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<ProgressBar
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerInParent="true" />
</RelativeLayout>
</RelativeLayout>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FirstFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<Button
android:id="@+id/button_first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next"
app:layout_constraintBottom_toTopOf="@id/textview_first"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textview_first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/lorem_ipsum"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/button_first" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="58dp"
android:gravity="center"
android:paddingTop="8dp">
<View
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/jinghui" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="吉林公安大数据实战赋能系统"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="100dp"
android:background="@drawable/top_10_f7_bg" />
<RelativeLayout
android:id="@+id/mine_table_group"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="60dp"
android:background="@drawable/all_7_fff_bg"
android:gravity="center_vertical">
<RelativeLayout
android:id="@+id/mine_type_group"
android:layout_width="110dp"
android:layout_height="40dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="5dp"
android:background="@drawable/all_7_line_ccc_bg"
android:padding="1dp">
<TextView
android:id="@+id/tv_mine_search_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="赋能编号"
android:textColor="@color/black"
android:textSize="16sp" />
<View
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="5dp"
android:background="@drawable/jaintou" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginStart="7dp"
android:layout_marginEnd="10dp"
android:layout_toRightOf="@id/mine_type_group"
android:background="@drawable/all_7_line_ccc_bg">
<View
android:layout_width="17dp"
android:layout_height="17dp"
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:background="@drawable/search" />
<EditText
android:id="@+id/mine_et_input"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="27dp"
android:layout_marginEnd="51dp"
android:background="#0000"
android:textColor="#333"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_mine_search_btn"
android:layout_width="51dp"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:background="@drawable/right_7_052eba_bg"
android:gravity="center"
android:text="搜索"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/mine_refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/mine_table_group">
<!-- 这里放置你的RecyclerView或其他需要刷新的布局 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/mine_rv_group"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<RelativeLayout
android:id="@+id/mine_rl_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<ProgressBar
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerInParent="true" />
</RelativeLayout>
</RelativeLayout>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SecondFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<Button
android:id="@+id/button_second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/previous"
app:layout_constraintBottom_toTopOf="@id/textview_second"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textview_second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/lorem_ipsum"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/button_second" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:background="@drawable/all_7_fff_bg"
android:padding="10dp">
<TextView
android:id="@+id/tv_my_key_person"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:gravity="center"
android:text="警员编号:"
android:textColor="@color/normal_color"
android:textSize="16sp" />
<EditText
android:id="@+id/tv_search_title"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginStart="10dp"
android:layout_toRightOf="@id/tv_my_key_person"
android:background="@drawable/all_7_line_ccc_bg"
android:maxLines="1"
android:paddingHorizontal="10dp"
android:textColor="@color/color_666"
android:textSize="16sp"
tools:text="987645561321312313" />
<TextView
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="@id/tv_my_key_person"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="查询内容:"
android:textColor="@color/normal_color"
android:textSize="16sp" />
<EditText
android:id="@+id/et_query_body"
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_below="@id/tv_my_key_person"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@id/tv_my_key_person"
android:background="@drawable/all_7_line_ccc_bg"
android:gravity="top"
android:maxLines="50"
android:paddingHorizontal="10dp"
android:paddingVertical="10dp"
android:textColor="@color/color_666"
android:textSize="16sp"
tools:text="987645561321312313" />
<TextView
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="@id/et_query_body"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="归属部门:"
android:textColor="@color/normal_color"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_query_org"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="@id/et_query_body"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@id/tv_my_key_person"
android:background="@drawable/all_7_line_ccc_bg"
android:gravity="center_vertical"
android:maxLines="1"
android:paddingHorizontal="10dp"
android:textColor="@color/color_666"
android:textSize="16sp"
tools:text="二道区公安分局" />
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignTop="@id/tv_query_org"
android:layout_alignRight="@id/tv_query_org"
android:background="@drawable/right_7_052eba_bg"
android:padding="7dp"
android:src="@mipmap/icon_query" />
<TextView
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="@id/tv_query_org"
android:layout_marginTop="10dp"
android:layout_toLeftOf="@id/tv_query_name"
android:gravity="center"
android:text="审批人:"
android:textColor="@color/normal_color"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_query_name"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="@id/tv_query_org"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@id/tv_my_key_person"
android:background="@drawable/all_7_line_ccc_bg"
android:gravity="center_vertical"
android:maxLines="1"
android:paddingHorizontal="10dp"
android:textColor="@color/color_666"
android:textSize="16sp"
tools:text="李大国" />
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignTop="@id/tv_query_name"
android:layout_alignRight="@id/tv_query_name"
android:background="@drawable/right_7_052eba_bg"
android:padding="7dp"
android:src="@mipmap/icon_query" />
<TextView
android:id="@+id/tv_commit_btn"
android:layout_width="80dp"
android:layout_height="40dp"
android:layout_below="@id/tv_query_name"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:background="@drawable/all_7_main_bg"
android:gravity="center"
android:text="提交"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</RelativeLayout>

View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginVertical="5dp"
android:background="@drawable/all_7_fff_bg"
android:paddingEnd="10dp"
android:paddingBottom="10dp">
<ImageView
android:id="@+id/iv_photo"
android:layout_width="50dp"
android:layout_height="57dp"
android:layout_marginStart="13dp"
android:layout_marginTop="15dp"
android:src="@drawable/photo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginTop="15dp"
android:textColor="#333"
android:textSize="15sp"
app:layout_constraintLeft_toRightOf="@id/iv_photo"
app:layout_constraintTop_toTopOf="parent"
tools:text="张三" />
<TextView
android:id="@+id/item_sfzh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginTop="15dp"
android:textColor="#666"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="@id/iv_photo"
app:layout_constraintLeft_toRightOf="@id/iv_photo"
tools:text="220181187609124532" />
<TextView
android:id="@+id/tv_level"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="15dp"
android:text="管理级别:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_photo" />
<TextView
android:id="@+id/item_gklb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="15dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_level"
app:layout_constraintTop_toBottomOf="@id/iv_photo"
tools:text="A级" />
<TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="7dp"
android:text="列管类别:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_level" />
<TextView
android:id="@+id/item_qtlb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_type"
app:layout_constraintTop_toBottomOf="@id/tv_level"
tools:text="区域协查人员" />
<TextView
android:id="@+id/tv_police"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="7dp"
android:text="负责民警:"
android:textColor="#999"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_type" />
<TextView
android:id="@+id/item_zrmj"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/tv_police"
app:layout_constraintTop_toBottomOf="@id/tv_type"
tools:text="李大国" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginVertical="5dp"
android:background="@drawable/all_7_fff_bg"
android:padding="10dp">
<TextView
android:id="@+id/tv_police_num_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="80dp"
android:text="警情编号20240125412451236458"
android:textColor="#FF052EBA"
android:textSize="13sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:gravity="end"
android:text="查看详情"
android:textColor="#FF052EBA"
android:textSize="13sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_police_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="报警内容:"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_police_num_title" />
<TextView
android:id="@+id/item_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintLeft_toRightOf="@id/tv_police_content"
app:layout_constraintTop_toBottomOf="@id/tv_police_num_title"
tools:text="在公交车上手机被抢了" />
<TextView
android:id="@+id/tv_police_time_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="报警时间:"
android:textColor="#999"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_police_content" />
<TextView
android:id="@+id/tv_police_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintLeft_toRightOf="@id/tv_police_time_title"
app:layout_constraintTop_toBottomOf="@id/tv_police_content"
tools:text="2024-03-12 19:20:10" />
<TextView
android:id="@+id/tv_police_tel_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="报警电话:"
android:textColor="#999"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_police_time" />
<TextView
android:id="@+id/tv_police_tel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintLeft_toRightOf="@id/tv_police_tel_title"
app:layout_constraintTop_toBottomOf="@id/tv_police_time"
tools:text="18912349876" />
<TextView
android:id="@+id/tv_police_loc_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:text="报警位置:"
android:textColor="#999"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_police_tel" />
<TextView
android:id="@+id/tv_police_loc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="7dp"
android:ellipsize="end"
android:lines="1"
android:textColor="#333"
android:textSize="14sp"
app:layout_constraintLeft_toRightOf="@id/tv_police_loc_title"
app:layout_constraintTop_toBottomOf="@id/tv_police_tel"
tools:text="红旗街,吉林大药房" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<com.police.policedatasystem.widget.WaterMarkView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Some files were not shown because too many files have changed in this diff Show More