Compare commits
3 Commits
c77196ce0d
...
e97344dfa2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e97344dfa2 | ||
|
|
70e619440e | ||
|
|
9307a554ae |
@@ -168,6 +168,32 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
<activity
|
||||
android:name=".product.DeviceDetailActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".pickup.PickupVerifyActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
<activity
|
||||
android:name=".pickup.PickupOrderStatsActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".statistics.StatisticsActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".user.UserManageActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
<activity
|
||||
android:name=".user.UserDeviceDetailActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".login.LoginActivity"
|
||||
android:theme="@style/AppTheme.FullScreen"
|
||||
|
||||
@@ -17,6 +17,8 @@ import com.ckkj.griddlebiz.base.BaseActivityNoP;
|
||||
import com.ckkj.griddlebiz.databinding.ActivitySerivceWebLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* @author fengxiaoyang
|
||||
* @date 2025/5/13
|
||||
@@ -73,19 +75,22 @@ public class WebviewUserAgreement extends BaseActivityNoP<ActivitySerivceWebLayo
|
||||
viewBinding.mWvJieyou.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
viewBinding.mWvJieyou.setLayerType(WebView.LAYER_TYPE_HARDWARE, null);
|
||||
}
|
||||
|
||||
viewBinding.includeTitle.imgBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//调用H5中的closeWs函数,结束当前会话
|
||||
}
|
||||
});
|
||||
viewBinding.includeTitle.imgBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
/**
|
||||
* 标题栏返回按钮点击事件。
|
||||
*/
|
||||
@OnClick(R.id.img_back)
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.img_back:
|
||||
// 关闭当前页面
|
||||
finish();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public class JsInterface {
|
||||
|
||||
@@ -26,6 +26,8 @@ import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* @author fengxiaoyang
|
||||
* @date 2025/7/11
|
||||
@@ -60,7 +62,6 @@ public class ChatHistoryActivity extends BaseActivity<IndexHistoryLayoutBinding,
|
||||
.navigationBarDarkIcon(true)
|
||||
.init();
|
||||
viewBinding.includedTitle.tvTitle.setText("历史记录");
|
||||
viewBinding.includedTitle.imgBack.setOnClickListener(c ->finish());
|
||||
mAdapter = new ChatHistoryAdapter(mContext, R.layout.history_item_layout, mChatList);
|
||||
viewBinding.rvData.setAdapter(mAdapter);
|
||||
setAdapterClick();
|
||||
@@ -210,6 +211,22 @@ public class ChatHistoryActivity extends BaseActivity<IndexHistoryLayoutBinding,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 标题栏返回按钮点击事件。
|
||||
*/
|
||||
@OnClick(R.id.img_back)
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.img_back:
|
||||
// 关闭历史记录页
|
||||
finish();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
viewBinding.refresh.finishRefresh(500);
|
||||
|
||||
@@ -8,6 +8,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.ckkj.griddlebiz.R;
|
||||
import com.ckkj.griddlebiz.base.BaseFragment;
|
||||
import com.ckkj.griddlebiz.databinding.DeviceIndexFragmentBinding;
|
||||
import com.ckkj.griddlebiz.device.mvp.DeviceContract;
|
||||
@@ -18,6 +19,8 @@ import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 设备首页。
|
||||
*/
|
||||
@@ -52,11 +55,27 @@ public class DeviceFragment extends BaseFragment<DeviceIndexFragmentBinding, Dev
|
||||
@Override
|
||||
public void initData(Bundle state) {
|
||||
bindDeviceAdapter();
|
||||
View.OnClickListener openDeviceList = v -> openBluetoothDeviceList();
|
||||
viewBinding.tvHomeTitle.setOnClickListener(openDeviceList);
|
||||
viewBinding.cvAddDevice.setOnClickListener(openDeviceList);
|
||||
viewBinding.ivAddDevice.setOnClickListener(openDeviceList);
|
||||
viewBinding.btnEmptyAddDevice.setOnClickListener(openDeviceList);
|
||||
// 点击事件统一由下方 onClick 处理。
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备首页点击事件。
|
||||
*/
|
||||
@OnClick({R.id.tv_home_title, R.id.cv_add_device, R.id.iv_add_device,
|
||||
R.id.btn_empty_add_device})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.tv_home_title:
|
||||
case R.id.cv_add_device:
|
||||
case R.id.iv_add_device:
|
||||
case R.id.btn_empty_add_device:
|
||||
// 打开蓝牙设备列表
|
||||
openBluetoothDeviceList();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void openBluetoothDeviceList() {
|
||||
|
||||
@@ -37,6 +37,8 @@ import com.ckkj.griddlebiz.utils.dataUtil.SharePreUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
public class GuideActivity extends BaseActivity<GuideActivityLayoutBinding, LoginPresenter>
|
||||
implements LoginContract.LoginView {
|
||||
private List<Drawable> mImgUrls = new ArrayList<>();
|
||||
@@ -81,15 +83,26 @@ public class GuideActivity extends BaseActivity<GuideActivityLayoutBinding, Logi
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
}
|
||||
});
|
||||
viewBinding.tvStart.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
}
|
||||
|
||||
/**
|
||||
* 引导页开始按钮点击事件。
|
||||
*/
|
||||
@OnClick(R.id.tv_start)
|
||||
public void onClick(View v) {
|
||||
SharePreUtil.putBoolean(ConstantUtil.SHARE_PRE_NAME,mContext,ConstantUtil.FIRST_ENTER_APP_FLAG,true);
|
||||
switch (v.getId()) {
|
||||
case R.id.tv_start:
|
||||
// 记录已进入过引导页,并进入首页
|
||||
SharePreUtil.putBoolean(ConstantUtil.SHARE_PRE_NAME, mContext,
|
||||
ConstantUtil.FIRST_ENTER_APP_FLAG, true);
|
||||
Intent intent = new Intent(mContext, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setPointSelect(int position) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ckkj.griddlebiz.home;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
@@ -10,14 +11,17 @@ import com.ckkj.griddlebiz.base.BaseFragment;
|
||||
import com.ckkj.griddlebiz.base.IPresenter;
|
||||
import com.ckkj.griddlebiz.databinding.HomeFragmentBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.pickup.PickupVerifyActivity;
|
||||
import com.ckkj.griddlebiz.product.DeviceManageActivity;
|
||||
import com.ckkj.griddlebiz.product.ProductInboundActivity;
|
||||
import com.ckkj.griddlebiz.statistics.StatisticsActivity;
|
||||
import com.ckkj.griddlebiz.user.UserManageActivity;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 运营首页:单位摘要、设备与减排统计、业务快捷入口。
|
||||
* 统计值目前采用设计稿示例数据,后续接入首页接口时统一刷新。
|
||||
@@ -31,19 +35,48 @@ public class HomeFragment extends BaseFragment<HomeFragmentBinding, IPresenter>
|
||||
|
||||
@Override
|
||||
public void initData(Bundle state) {
|
||||
View.OnClickListener openUnavailable = v ->
|
||||
// 点击事件统一由下方 onClick 处理,便于集中维护。
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页各入口点击事件。
|
||||
*/
|
||||
@OnClick({R.id.fl_notifications, R.id.iv_company_profile, R.id.action_product_inbound,
|
||||
R.id.action_product_management, R.id.action_statistics, R.id.action_after_sales,
|
||||
R.id.action_pickup_verification, R.id.feature_user_management,
|
||||
R.id.feature_user_guide})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.action_product_inbound:
|
||||
// 进入商品入库扫码页
|
||||
startActivity(new Intent(mContext, ProductInboundActivity.class));
|
||||
break;
|
||||
|
||||
case R.id.action_product_management:
|
||||
// 进入设备管理页
|
||||
startActivity(new Intent(mContext, DeviceManageActivity.class));
|
||||
break;
|
||||
|
||||
case R.id.action_pickup_verification:
|
||||
// 进入提货核销页
|
||||
startActivity(new Intent(mContext, PickupVerifyActivity.class));
|
||||
break;
|
||||
|
||||
case R.id.action_statistics:
|
||||
// 进入数据统计(含故障分析)页
|
||||
startActivity(new Intent(mContext, StatisticsActivity.class));
|
||||
break;
|
||||
|
||||
case R.id.feature_user_management:
|
||||
// 进入用户管理页
|
||||
startActivity(new Intent(mContext, UserManageActivity.class));
|
||||
break;
|
||||
|
||||
default:
|
||||
// 其余入口暂未接入
|
||||
ToastUtil.showShort(mContext, R.string.home_feature_unavailable);
|
||||
viewBinding.flNotifications.setOnClickListener(openUnavailable);
|
||||
viewBinding.ivCompanyProfile.setOnClickListener(openUnavailable);
|
||||
viewBinding.actionProductInbound.setOnClickListener(v ->
|
||||
startActivity(new Intent(mContext, ProductInboundActivity.class)));
|
||||
viewBinding.actionProductManagement.setOnClickListener(v ->
|
||||
startActivity(new Intent(mContext, DeviceManageActivity.class)));
|
||||
viewBinding.actionStatistics.setOnClickListener(openUnavailable);
|
||||
viewBinding.actionAfterSales.setOnClickListener(openUnavailable);
|
||||
viewBinding.actionPickupVerification.setOnClickListener(openUnavailable);
|
||||
viewBinding.featureUserManagement.setOnClickListener(openUnavailable);
|
||||
viewBinding.featureUserGuide.setOnClickListener(openUnavailable);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,7 +61,6 @@ public class RegisterActivity extends BaseActivity<RegisterLayoutBinding, LoginP
|
||||
.statusBarDarkFont(true)
|
||||
.init();
|
||||
viewBinding.includeTitle.tvTitle.setText(R.string.register_design_title);
|
||||
viewBinding.includeTitle.imgBack.setOnClickListener(v -> finish());
|
||||
viewBinding.includeTitle.imgBack.setImageResource(R.mipmap.ic_launcher);
|
||||
ClickUtil.addClickPart(viewBinding.checkboxRead, 100);
|
||||
initAgreement();
|
||||
@@ -131,9 +130,15 @@ public class RegisterActivity extends BaseActivity<RegisterLayoutBinding, LoginP
|
||||
goToWihoutNoPresent(mContext, WebviewUserAgreement.class, bundle);
|
||||
}
|
||||
|
||||
@OnClick({R.id.tv_get_code, R.id.tv_register_confirm, R.id.checkbox_read, R.id.tv_go_login})
|
||||
@OnClick({R.id.tv_get_code, R.id.tv_register_confirm, R.id.checkbox_read,
|
||||
R.id.tv_go_login, R.id.img_back})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.img_back:
|
||||
// 返回登录页
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.tv_go_login:
|
||||
finish();
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ckkj.griddlebiz.pickup;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.ckkj.griddlebiz.R;
|
||||
import com.ckkj.griddlebiz.base.BaseActivityNoP;
|
||||
import com.ckkj.griddlebiz.databinding.PickupOrderStatsLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 提货订单统计:展示累计提货数据、时间维度筛选与核销记录列表。
|
||||
* 页面数据目前使用设计稿示例,后续接入统计接口时替换。
|
||||
*/
|
||||
public class PickupOrderStatsActivity extends BaseActivityNoP<PickupOrderStatsLayoutBinding> {
|
||||
|
||||
@Override
|
||||
public int getLayoutResId(Bundle savedInstanceState) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.init();
|
||||
|
||||
// 累计兑换积分与核销记录数
|
||||
viewBinding.tvTotalPoints.setText(
|
||||
getString(R.string.pickup_stats_total_points, "128,000"));
|
||||
viewBinding.tvRecordsCount.setText(
|
||||
getString(R.string.pickup_stats_records_count, "1,280"));
|
||||
|
||||
// 默认选中"全部"时间维度
|
||||
updateChipGroup(R.id.chip_all, viewBinding.chipAll, viewBinding.chipToday,
|
||||
viewBinding.chipWeek, viewBinding.chipMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提货订单统计页点击事件。
|
||||
*/
|
||||
@OnClick({R.id.iv_back, R.id.btn_download, R.id.chip_all, R.id.chip_today,
|
||||
R.id.chip_week, R.id.chip_month})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
// 返回上一页
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.btn_download:
|
||||
// 导出核销记录,接口待接入
|
||||
ToastUtil.showShort(mContext, R.string.pickup_stats_export_unavailable);
|
||||
break;
|
||||
|
||||
case R.id.chip_all:
|
||||
case R.id.chip_today:
|
||||
case R.id.chip_week:
|
||||
case R.id.chip_month:
|
||||
// 切换时间维度,同一时间只能选中一个
|
||||
updateChipGroup(v.getId(), viewBinding.chipAll, viewBinding.chipToday,
|
||||
viewBinding.chipWeek, viewBinding.chipMonth);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新筛选项选中状态,选中项使用白色文字与主色背景。
|
||||
*/
|
||||
private void updateChipGroup(int selectedId, View... chips) {
|
||||
for (View chip : chips) {
|
||||
boolean selected = chip.getId() == selectedId;
|
||||
chip.setSelected(selected);
|
||||
applyChipTypeface((TextView) chip, selected);
|
||||
}
|
||||
}
|
||||
|
||||
private void applyChipTypeface(TextView chip, boolean selected) {
|
||||
chip.setTypeface(Typeface.create(
|
||||
selected ? "sans-serif-medium" : "sans-serif", Typeface.NORMAL));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
hideLoading();
|
||||
if (message != null && !message.isEmpty()) {
|
||||
ToastUtil.showShort(mContext, message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
package com.ckkj.griddlebiz.pickup;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
|
||||
import com.ckkj.griddlebiz.R;
|
||||
import com.ckkj.griddlebiz.base.BaseActivityNoP;
|
||||
import com.ckkj.griddlebiz.databinding.PickupVerifyLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.product.ProductScanActivity;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.king.camera.scan.CameraScan;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 提货核销:输入 6 位提货码查询订单,查询成功后展示商品与用户信息并确认发货。
|
||||
* 页面数据目前使用设计稿示例,后续接入核销接口时替换。
|
||||
*/
|
||||
public class PickupVerifyActivity extends BaseActivityNoP<PickupVerifyLayoutBinding> {
|
||||
|
||||
private static final int CODE_LENGTH = 6;
|
||||
|
||||
private EditText[] mCodeInputs;
|
||||
|
||||
/** 扫码入口:复用商品入库的扫码页,从扫码结果中提取 6 位数字。 */
|
||||
private final ActivityResultLauncher<Intent> mScanLauncher = registerForActivityResult(
|
||||
new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
if (result.getResultCode() != RESULT_OK || result.getData() == null) {
|
||||
return;
|
||||
}
|
||||
String raw = result.getData().getStringExtra(CameraScan.SCAN_RESULT);
|
||||
String digits = raw == null ? "" : raw.replaceAll("[^0-9]", "");
|
||||
if (digits.length() < CODE_LENGTH) {
|
||||
ToastUtil.showShort(mContext, R.string.pickup_scan_invalid);
|
||||
return;
|
||||
}
|
||||
fillCode(digits.substring(0, CODE_LENGTH));
|
||||
queryOrder();
|
||||
});
|
||||
|
||||
@Override
|
||||
public int getLayoutResId(Bundle savedInstanceState) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.keyboardEnable(true)
|
||||
.init();
|
||||
|
||||
mCodeInputs = new EditText[]{
|
||||
viewBinding.etCode1, viewBinding.etCode2, viewBinding.etCode3,
|
||||
viewBinding.etCode4, viewBinding.etCode5, viewBinding.etCode6
|
||||
};
|
||||
setupCodeInputs();
|
||||
|
||||
viewBinding.tvSpec.setText(getString(R.string.pickup_spec,
|
||||
getString(R.string.pickup_spec_value), 1));
|
||||
viewBinding.tvPoints.setText(getString(R.string.pickup_points_used, 500));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提货核销页点击事件。
|
||||
*/
|
||||
@OnClick({R.id.iv_back, R.id.iv_scan, R.id.btn_query, R.id.btn_confirm})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
// 返回上一页
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.iv_scan:
|
||||
// 打开扫码页,扫描用户提货码
|
||||
mScanLauncher.launch(new Intent(this, ProductScanActivity.class));
|
||||
break;
|
||||
|
||||
case R.id.btn_query:
|
||||
// 查询提货订单
|
||||
queryOrder();
|
||||
break;
|
||||
|
||||
case R.id.btn_confirm:
|
||||
// 确认核销并发货
|
||||
ToastUtil.showShort(mContext, R.string.pickup_verify_success);
|
||||
finish();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化 6 个提货码输入框:输入后自动跳转下一个,删除时回到上一个。
|
||||
*/
|
||||
private void setupCodeInputs() {
|
||||
for (int i = 0; i < mCodeInputs.length; i++) {
|
||||
final int index = i;
|
||||
mCodeInputs[i].addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
// 输入一位后自动聚焦下一个输入框
|
||||
if (s.length() == 1 && index < mCodeInputs.length - 1) {
|
||||
mCodeInputs[index + 1].requestFocus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mCodeInputs[i].setOnKeyListener((v, keyCode, event) -> {
|
||||
// 当前输入框为空时按删除键,回到上一个输入框
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN
|
||||
&& keyCode == KeyEvent.KEYCODE_DEL
|
||||
&& TextUtils.isEmpty(((EditText) v).getText())
|
||||
&& index > 0) {
|
||||
mCodeInputs[index - 1].requestFocus();
|
||||
mCodeInputs[index - 1].setText("");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
mCodeInputs[mCodeInputs.length - 1].setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
queryOrder();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单:校验 6 位提货码后切换到订单信息状态。
|
||||
*/
|
||||
private void queryOrder() {
|
||||
String code = getCode();
|
||||
if (code.length() < CODE_LENGTH) {
|
||||
ToastUtil.showShort(mContext, R.string.pickup_code_incomplete);
|
||||
return;
|
||||
}
|
||||
hideKeyboard();
|
||||
viewBinding.tvPickupCode.setText(formatCode(code));
|
||||
viewBinding.inputContainer.setVisibility(View.GONE);
|
||||
viewBinding.resultContainer.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取当前输入的提货码。
|
||||
*/
|
||||
private String getCode() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (EditText input : mCodeInputs) {
|
||||
builder.append(input.getText().toString().trim());
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将扫码结果填入 6 个输入框。
|
||||
*/
|
||||
private void fillCode(String code) {
|
||||
for (int i = 0; i < mCodeInputs.length && i < code.length(); i++) {
|
||||
mCodeInputs[i].setText(String.valueOf(code.charAt(i)));
|
||||
}
|
||||
mCodeInputs[mCodeInputs.length - 1].requestFocus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提货码按 3+3 分组展示。
|
||||
*/
|
||||
private String formatCode(String code) {
|
||||
if (code.length() != CODE_LENGTH) {
|
||||
return code;
|
||||
}
|
||||
return code.substring(0, 3) + " " + code.substring(3);
|
||||
}
|
||||
|
||||
private void hideKeyboard() {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (imm != null && mCodeInputs.length > 0) {
|
||||
imm.hideSoftInputFromWindow(mCodeInputs[0].getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
hideLoading();
|
||||
if (message != null && !message.isEmpty()) {
|
||||
ToastUtil.showShort(mContext, message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ckkj.griddlebiz.product;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.ckkj.griddlebiz.R;
|
||||
import com.ckkj.griddlebiz.base.BaseActivityNoP;
|
||||
import com.ckkj.griddlebiz.databinding.DeviceDetailLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 设备详情:在线、故障、离线三种状态共用一套信息列表,只切换状态卡。
|
||||
*/
|
||||
public class DeviceDetailActivity extends BaseActivityNoP<DeviceDetailLayoutBinding> {
|
||||
|
||||
public static final String EXTRA_STATE = "extra_state";
|
||||
public static final int STATE_ONLINE = 0;
|
||||
public static final int STATE_FAULT = 1;
|
||||
public static final int STATE_OFFLINE = 2;
|
||||
|
||||
public static Intent createIntent(Context context, int state) {
|
||||
return new Intent(context, DeviceDetailActivity.class)
|
||||
.putExtra(EXTRA_STATE, state);
|
||||
}
|
||||
|
||||
private int mState = STATE_ONLINE;
|
||||
|
||||
@Override
|
||||
public int getLayoutResId(Bundle savedInstanceState) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.init();
|
||||
|
||||
mState = getIntent().getIntExtra(EXTRA_STATE, STATE_ONLINE);
|
||||
applyState(mState);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备详情页点击事件。
|
||||
*/
|
||||
@OnClick(R.id.iv_back)
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
// 返回设备管理页
|
||||
finish();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void applyState(int state) {
|
||||
boolean online = state == STATE_ONLINE;
|
||||
boolean fault = state == STATE_FAULT;
|
||||
boolean offline = state == STATE_OFFLINE;
|
||||
|
||||
viewBinding.bannerOnline.setVisibility(online ? View.VISIBLE : View.GONE);
|
||||
viewBinding.bannerFault.setVisibility(fault ? View.VISIBLE : View.GONE);
|
||||
viewBinding.bannerOffline.setVisibility(offline ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (online) {
|
||||
viewBinding.tvStatus.setText(R.string.device_manage_status_online);
|
||||
viewBinding.tvStatus.setBackgroundResource(R.drawable.device_manage_status_online_bg);
|
||||
viewBinding.tvStatus.setTextColor(getColor(R.color.device_manage_status_online));
|
||||
viewBinding.ivDeviceIcon.setImageResource(R.mipmap.icon_device_manage_box);
|
||||
} else if (fault) {
|
||||
viewBinding.tvStatus.setText(R.string.device_manage_status_fault);
|
||||
viewBinding.tvStatus.setBackgroundResource(R.drawable.device_manage_status_fault_bg);
|
||||
viewBinding.tvStatus.setTextColor(getColor(R.color.device_manage_status_fault));
|
||||
viewBinding.ivDeviceIcon.setImageResource(R.mipmap.icon_device_manage_box);
|
||||
} else {
|
||||
viewBinding.tvStatus.setText(R.string.device_manage_status_offline);
|
||||
viewBinding.tvStatus.setBackgroundResource(R.drawable.device_manage_status_offline_bg);
|
||||
viewBinding.tvStatus.setTextColor(getColor(R.color.device_manage_text_secondary));
|
||||
viewBinding.ivDeviceIcon.setImageResource(R.mipmap.icon_device_manage_box_offline);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
hideLoading();
|
||||
if (message != null && !message.isEmpty()) {
|
||||
ToastUtil.showShort(mContext, message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,8 @@ import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 设备管理:全部设备与待激活两个 Tab。
|
||||
* 页面数据目前使用设计稿示例,后续接入设备列表接口时替换。
|
||||
@@ -34,13 +36,10 @@ public class DeviceManageActivity extends BaseActivityNoP<DeviceManageLayoutBind
|
||||
.keyboardEnable(true)
|
||||
.init();
|
||||
|
||||
viewBinding.ivBack.setOnClickListener(v -> finish());
|
||||
viewBinding.tabAll.setOnClickListener(v -> selectTab(true));
|
||||
viewBinding.tabPending.setOnClickListener(v -> selectTab(false));
|
||||
viewBinding.chipAll.setSelected(true);
|
||||
setupChipGroup(viewBinding.chipAll, viewBinding.chipOnline,
|
||||
// 状态筛选默认选中“全部”,时间筛选默认不选中。
|
||||
updateChipGroup(R.id.chip_all, viewBinding.chipAll, viewBinding.chipOnline,
|
||||
viewBinding.chipOffline, viewBinding.chipFault);
|
||||
setupChipGroup(viewBinding.chipLast7Days, viewBinding.chipLast30Days,
|
||||
updateChipGroup(View.NO_ID, viewBinding.chipLast7Days, viewBinding.chipLast30Days,
|
||||
viewBinding.chipCustom);
|
||||
|
||||
viewBinding.tvTotalDevices.setText(
|
||||
@@ -48,7 +47,6 @@ public class DeviceManageActivity extends BaseActivityNoP<DeviceManageLayoutBind
|
||||
viewBinding.tvInStock.setText(getString(R.string.device_manage_in_stock, 3));
|
||||
viewBinding.tvSold.setText(getString(R.string.device_manage_sold, 5));
|
||||
|
||||
viewBinding.ivSearch.setOnClickListener(v -> onSearch());
|
||||
viewBinding.etSearch.setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
|
||||
onSearch();
|
||||
@@ -60,6 +58,75 @@ public class DeviceManageActivity extends BaseActivityNoP<DeviceManageLayoutBind
|
||||
selectTab(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备管理页点击事件。
|
||||
*/
|
||||
@OnClick({R.id.iv_back, R.id.tab_all, R.id.tab_pending, R.id.card_online,
|
||||
R.id.card_fault, R.id.card_offline, R.id.iv_search, R.id.chip_all,
|
||||
R.id.chip_online, R.id.chip_offline, R.id.chip_fault,
|
||||
R.id.chip_last_7_days, R.id.chip_last_30_days, R.id.chip_custom})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
// 返回上一页
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.tab_all:
|
||||
// 切换到全部设备
|
||||
selectTab(true);
|
||||
break;
|
||||
|
||||
case R.id.tab_pending:
|
||||
// 切换到待激活设备
|
||||
selectTab(false);
|
||||
break;
|
||||
|
||||
case R.id.card_online:
|
||||
// 查看在线设备详情
|
||||
startActivity(DeviceDetailActivity.createIntent(mContext,
|
||||
DeviceDetailActivity.STATE_ONLINE));
|
||||
break;
|
||||
|
||||
case R.id.card_fault:
|
||||
// 查看故障设备详情
|
||||
startActivity(DeviceDetailActivity.createIntent(mContext,
|
||||
DeviceDetailActivity.STATE_FAULT));
|
||||
break;
|
||||
|
||||
case R.id.card_offline:
|
||||
// 查看离线设备详情
|
||||
startActivity(DeviceDetailActivity.createIntent(mContext,
|
||||
DeviceDetailActivity.STATE_OFFLINE));
|
||||
break;
|
||||
|
||||
case R.id.iv_search:
|
||||
// 搜索设备
|
||||
onSearch();
|
||||
break;
|
||||
|
||||
case R.id.chip_all:
|
||||
case R.id.chip_online:
|
||||
case R.id.chip_offline:
|
||||
case R.id.chip_fault:
|
||||
// 状态筛选,同一时间只能选中一个
|
||||
updateChipGroup(v.getId(), viewBinding.chipAll, viewBinding.chipOnline,
|
||||
viewBinding.chipOffline, viewBinding.chipFault);
|
||||
break;
|
||||
|
||||
case R.id.chip_last_7_days:
|
||||
case R.id.chip_last_30_days:
|
||||
case R.id.chip_custom:
|
||||
// 激活时间筛选,同一时间只能选中一个
|
||||
updateChipGroup(v.getId(), viewBinding.chipLast7Days,
|
||||
viewBinding.chipLast30Days, viewBinding.chipCustom);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void selectTab(boolean allDevices) {
|
||||
viewBinding.scrollAll.setVisibility(allDevices ? View.VISIBLE : View.GONE);
|
||||
viewBinding.scrollPending.setVisibility(allDevices ? View.GONE : View.VISIBLE);
|
||||
@@ -81,15 +148,17 @@ public class DeviceManageActivity extends BaseActivityNoP<DeviceManageLayoutBind
|
||||
}
|
||||
}
|
||||
|
||||
private void setupChipGroup(View... chips) {
|
||||
/**
|
||||
* 更新一组筛选标签的选中状态。
|
||||
*
|
||||
* @param selectedId 当前选中的 View ID,传 {@link View#NO_ID} 表示全部取消选中
|
||||
* @param chips 同一组的筛选标签
|
||||
*/
|
||||
private void updateChipGroup(int selectedId, View... chips) {
|
||||
for (View chip : chips) {
|
||||
applyChipTypeface((TextView) chip, chip.isSelected());
|
||||
chip.setOnClickListener(clicked -> {
|
||||
for (View item : chips) {
|
||||
item.setSelected(item == clicked);
|
||||
applyChipTypeface((TextView) item, item == clicked);
|
||||
}
|
||||
});
|
||||
boolean selected = chip.getId() == selectedId;
|
||||
chip.setSelected(selected);
|
||||
applyChipTypeface((TextView) chip, selected);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.ckkj.griddlebiz.base.BaseActivity;
|
||||
import com.ckkj.griddlebiz.databinding.DialogProductInboundManualLayoutBinding;
|
||||
import com.ckkj.griddlebiz.databinding.ProductInboundLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.pickup.PickupVerifyActivity;
|
||||
import com.ckkj.griddlebiz.product.mvp.ProductInboundContract;
|
||||
import com.ckkj.griddlebiz.product.mvp.ProductInboundImpl;
|
||||
import com.ckkj.griddlebiz.product.mvp.ProductInboundPresenter;
|
||||
@@ -31,6 +32,7 @@ import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.OnClick;
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
|
||||
/**
|
||||
@@ -77,9 +79,33 @@ public class ProductInboundActivity extends BaseActivity<ProductInboundLayoutBin
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
viewBinding.ivBack.setOnClickListener(v -> finish());
|
||||
viewBinding.ivScan.setOnClickListener(v -> requestScanPermission());
|
||||
viewBinding.tvManualEntry.setOnClickListener(v -> showManualCodeDialog());
|
||||
// 点击事件统一由下方 onClick 处理。
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品入库页点击事件。
|
||||
*/
|
||||
@OnClick({R.id.iv_back, R.id.iv_scan, R.id.tv_manual_entry})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
// 返回上一页
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.iv_scan:
|
||||
// 申请相机权限后进入扫码
|
||||
requestScanPermission();
|
||||
break;
|
||||
|
||||
case R.id.tv_manual_entry:
|
||||
// 跳转到提货核销页
|
||||
startActivity(new Intent(this, PickupVerifyActivity.class));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void requestScanPermission() {
|
||||
@@ -141,10 +167,11 @@ public class ProductInboundActivity extends BaseActivity<ProductInboundLayoutBin
|
||||
WindowManager.LayoutParams.MATCH_PARENT);
|
||||
window.setGravity(Gravity.CENTER);
|
||||
}
|
||||
mManualBinding.dialogRoot.setOnClickListener(v -> dismissManualCodeDialog());
|
||||
mManualBinding.ivClose.setOnClickListener(v -> dismissManualCodeDialog());
|
||||
mManualBinding.tvReset.setOnClickListener(v -> mManualBinding.edManualCode.setText(""));
|
||||
mManualBinding.tvOk.setOnClickListener(v -> submitManualCode());
|
||||
View.OnClickListener dialogClick = this::onManualDialogClick;
|
||||
mManualBinding.dialogRoot.setOnClickListener(dialogClick);
|
||||
mManualBinding.ivClose.setOnClickListener(dialogClick);
|
||||
mManualBinding.tvReset.setOnClickListener(dialogClick);
|
||||
mManualBinding.tvOk.setOnClickListener(dialogClick);
|
||||
mManualBinding.edManualCode.setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
submitManualCode();
|
||||
@@ -160,6 +187,35 @@ public class ProductInboundActivity extends BaseActivity<ProductInboundLayoutBin
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动输入弹窗点击事件。
|
||||
* <p>
|
||||
* 弹窗不在 Activity 的 contentView 中,无法使用 ButterKnife 的 @OnClick,
|
||||
* 这里统一收敛到一个 switch 中便于阅读。
|
||||
*/
|
||||
private void onManualDialogClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.dialog_root:
|
||||
case R.id.iv_close:
|
||||
// 点击空白处或关闭按钮,收起弹窗
|
||||
dismissManualCodeDialog();
|
||||
break;
|
||||
|
||||
case R.id.tv_reset:
|
||||
// 清空输入内容
|
||||
mManualBinding.edManualCode.setText("");
|
||||
break;
|
||||
|
||||
case R.id.tv_ok:
|
||||
// 提交手动输入的编码
|
||||
submitManualCode();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void submitManualCode() {
|
||||
if (mManualBinding == null) {
|
||||
return;
|
||||
|
||||
@@ -40,6 +40,9 @@ import java.io.InputStream;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 商品入库扫码页:相机实时扫码,也可从相册选择图片识别。
|
||||
* <p>
|
||||
@@ -61,10 +64,31 @@ public class ProductScanActivity extends BarcodeCameraScanActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
// 扫码页未继承项目 BaseActivity,需要手动绑定 ButterKnife。
|
||||
ButterKnife.bind(this);
|
||||
applyEdgeToEdge();
|
||||
findViewById(R.id.ivScanBack).setOnClickListener(v -> finish());
|
||||
mTvGallery = findViewById(R.id.tvGallery);
|
||||
mTvGallery.setOnClickListener(v -> openPhotoPicker());
|
||||
mTvGallery = findViewById(R.id.tv_gallery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码页点击事件。
|
||||
*/
|
||||
@OnClick({R.id.iv_scan_back, R.id.tv_gallery})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_scan_back:
|
||||
// 关闭扫码页
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.tv_gallery:
|
||||
// 打开系统相册选择图片
|
||||
openPhotoPicker();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void applyEdgeToEdge() {
|
||||
@@ -75,9 +99,9 @@ public class ProductScanActivity extends BarcodeCameraScanActivity {
|
||||
WindowCompat.getInsetsController(window, window.getDecorView())
|
||||
.setAppearanceLightStatusBars(false);
|
||||
|
||||
View root = findViewById(R.id.scanRoot);
|
||||
View topBar = findViewById(R.id.scanTopBar);
|
||||
View bottomBar = findViewById(R.id.scanBottomBar);
|
||||
View root = findViewById(R.id.scan_root);
|
||||
View topBar = findViewById(R.id.scan_top_bar);
|
||||
View bottomBar = findViewById(R.id.scan_bottom_bar);
|
||||
final int topPadding = topBar.getPaddingTop();
|
||||
final int bottomPadding = bottomBar.getPaddingBottom();
|
||||
ViewCompat.setOnApplyWindowInsetsListener(root, (v, insets) -> {
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.ckkj.griddlebiz.statistics;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.view.View;
|
||||
|
||||
import com.ckkj.griddlebiz.R;
|
||||
import com.ckkj.griddlebiz.base.BaseActivityNoP;
|
||||
import com.ckkj.griddlebiz.databinding.StatisticsLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.statistics.widget.BarChartView;
|
||||
import com.ckkj.griddlebiz.statistics.widget.DonutChartView;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 数据统计:顶部 Tab 切换"数据统计"和"故障分析"。
|
||||
* 统计数据与图表数值目前使用设计稿示例,后续接入统计接口时替换。
|
||||
*/
|
||||
public class StatisticsActivity extends BaseActivityNoP<StatisticsLayoutBinding> {
|
||||
|
||||
/** 故障类型占比:按设计稿环形图的扇形顺序(橙、紫、红、蓝)。 */
|
||||
private static final float[] FAULT_PERCENTS = {29f, 25f, 19f, 27f};
|
||||
private static final int[] FAULT_COLORS = {0xFFF8A83D, 0xFF9923F3, 0xFFF93B41, 0xFF00AEFF};
|
||||
|
||||
/** 库存结构占比:已售橙色、当前库存蓝色。 */
|
||||
private static final float[] STOCK_PERCENTS = {18f, 82f};
|
||||
private static final int[] STOCK_COLORS = {0xFFFF6900, 0xFF00AEFF};
|
||||
|
||||
/** 使用时长分布:柱体数值与横轴标签。 */
|
||||
private static final float[] DURATION_VALUES = {59f, 38f, 42f, 18f, 52f};
|
||||
private static final String[] DURATION_LABELS = {"500", "1000", "1500", "2000", "3000"};
|
||||
|
||||
@Override
|
||||
public int getLayoutResId(Bundle savedInstanceState) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.init();
|
||||
|
||||
initCharts();
|
||||
initLegends();
|
||||
selectTab(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据统计页点击事件。
|
||||
*/
|
||||
@OnClick({R.id.iv_back, R.id.tab_stats, R.id.tab_fault})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
// 返回上一页
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.tab_stats:
|
||||
// 切换到数据统计
|
||||
selectTab(true);
|
||||
break;
|
||||
|
||||
case R.id.tab_fault:
|
||||
// 切换到故障分析
|
||||
selectTab(false);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化环形图与柱状图数据。
|
||||
*/
|
||||
private void initCharts() {
|
||||
viewBinding.donutStats.setData(STOCK_PERCENTS, STOCK_COLORS);
|
||||
viewBinding.donutFault.setData(FAULT_PERCENTS, FAULT_COLORS);
|
||||
viewBinding.barChart.setData(DURATION_VALUES, DURATION_LABELS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化图例文案,百分比部分加粗。
|
||||
*/
|
||||
private void initLegends() {
|
||||
viewBinding.tvLegendSold.setText(boldPercent(
|
||||
getString(R.string.statistics_legend_sold, "28", "18%")));
|
||||
viewBinding.tvLegendStock.setText(boldPercent(
|
||||
getString(R.string.statistics_legend_stock, "128", "82%")));
|
||||
|
||||
viewBinding.tvFaultLegend1.setText(boldPercent(getString(
|
||||
R.string.statistics_fault_legend, getString(R.string.statistics_no_heating), "42%")));
|
||||
viewBinding.tvFaultLegend2.setText(boldPercent(getString(
|
||||
R.string.statistics_fault_legend, getString(R.string.statistics_temp_control), "28%")));
|
||||
viewBinding.tvFaultLegend3.setText(boldPercent(getString(
|
||||
R.string.statistics_fault_legend, getString(R.string.statistics_network), "18%")));
|
||||
viewBinding.tvFaultLegend4.setText(boldPercent(getString(
|
||||
R.string.statistics_fault_legend, getString(R.string.statistics_cracked), "12%")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 将文案末尾括号内的百分比加粗,与设计稿图例保持一致。
|
||||
*/
|
||||
private CharSequence boldPercent(String text) {
|
||||
SpannableString span = new SpannableString(text);
|
||||
int start = Math.max(text.lastIndexOf('('), text.lastIndexOf('('));
|
||||
if (start >= 0) {
|
||||
span.setSpan(new StyleSpan(Typeface.BOLD), start, text.length(),
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
return span;
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换顶部 Tab:选中项橙色加粗并显示下划线。
|
||||
*/
|
||||
private void selectTab(boolean statsSelected) {
|
||||
viewBinding.scrollStats.setVisibility(statsSelected ? View.VISIBLE : View.GONE);
|
||||
viewBinding.scrollFault.setVisibility(statsSelected ? View.GONE : View.VISIBLE);
|
||||
viewBinding.indicatorStats.setVisibility(statsSelected ? View.VISIBLE : View.INVISIBLE);
|
||||
viewBinding.indicatorFault.setVisibility(statsSelected ? View.INVISIBLE : View.VISIBLE);
|
||||
|
||||
viewBinding.tvTabStats.setTextColor(getColor(
|
||||
statsSelected ? R.color.statistics_orange : R.color.statistics_text_primary));
|
||||
viewBinding.tvTabStats.setTypeface(Typeface.create(
|
||||
statsSelected ? "sans-serif" : "sans-serif-medium",
|
||||
statsSelected ? Typeface.BOLD : Typeface.NORMAL));
|
||||
|
||||
viewBinding.tvTabFault.setTextColor(getColor(
|
||||
statsSelected ? R.color.statistics_text_primary : R.color.statistics_orange));
|
||||
viewBinding.tvTabFault.setTypeface(Typeface.create(
|
||||
statsSelected ? "sans-serif-medium" : "sans-serif",
|
||||
statsSelected ? Typeface.NORMAL : Typeface.BOLD));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
hideLoading();
|
||||
if (message != null && !message.isEmpty()) {
|
||||
ToastUtil.showShort(mContext, message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.ckkj.griddlebiz.statistics.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.RectF;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* 使用时长柱状图:固定 0-70 的纵轴刻度,横向网格线 + 圆角柱体。
|
||||
* 绘制区域与设计稿一致:左侧 26dp 刻度区、底部 19dp 标签区。
|
||||
*/
|
||||
public class BarChartView extends View {
|
||||
|
||||
private static final float AXIS_MAX = 70f;
|
||||
private static final int TICK_COUNT = 7;
|
||||
private static final float BAR_WIDTH_DP = 32f;
|
||||
private static final float BAR_RADIUS_DP = 4f;
|
||||
|
||||
private final Paint mGridPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final Paint mBarPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final Path mBarPath = new Path();
|
||||
private final RectF mBarRect = new RectF();
|
||||
|
||||
private float[] mValues = new float[0];
|
||||
private String[] mLabels = new String[0];
|
||||
|
||||
private float mDensity;
|
||||
|
||||
public BarChartView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public BarChartView(Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public BarChartView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mDensity = getResources().getDisplayMetrics().density;
|
||||
|
||||
mGridPaint.setColor(Color.parseColor("#DDDDDD"));
|
||||
mGridPaint.setStrokeWidth(dp(0.5f));
|
||||
mGridPaint.setStyle(Paint.Style.STROKE);
|
||||
|
||||
mTextPaint.setColor(Color.parseColor("#222222"));
|
||||
mTextPaint.setTextSize(dp(12f));
|
||||
|
||||
mBarPaint.setColor(Color.parseColor("#48B3FF"));
|
||||
mBarPaint.setStyle(Paint.Style.FILL);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置柱体数值与横轴标签,values 与 labels 一一对应。
|
||||
*/
|
||||
public void setData(float[] values, String[] labels) {
|
||||
mValues = values == null ? new float[0] : values;
|
||||
mLabels = labels == null ? new String[0] : labels;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
if (getWidth() <= 0 || getHeight() <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
float left = dp(26f);
|
||||
float top = dp(14f);
|
||||
float right = getWidth();
|
||||
float bottom = getHeight() - dp(19f);
|
||||
float plotHeight = bottom - top;
|
||||
|
||||
// 横向网格线与纵轴刻度
|
||||
for (int i = 0; i <= TICK_COUNT; i++) {
|
||||
float y = top + plotHeight * i / TICK_COUNT;
|
||||
canvas.drawLine(left, y, right, y, mGridPaint);
|
||||
int tickValue = (int) (AXIS_MAX - AXIS_MAX * i / TICK_COUNT);
|
||||
mTextPaint.setTextAlign(Paint.Align.RIGHT);
|
||||
float baseline = y - (mTextPaint.ascent() + mTextPaint.descent()) / 2f;
|
||||
canvas.drawText(String.valueOf(tickValue), left - dp(10f), baseline, mTextPaint);
|
||||
}
|
||||
|
||||
if (mValues.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 柱体等距分布,首尾各留半个间距
|
||||
float slot = (right - left) / mValues.length;
|
||||
float barWidth = dp(BAR_WIDTH_DP);
|
||||
float radius = dp(BAR_RADIUS_DP);
|
||||
mTextPaint.setTextAlign(Paint.Align.CENTER);
|
||||
|
||||
for (int i = 0; i < mValues.length; i++) {
|
||||
float centerX = left + slot * i + slot / 2f;
|
||||
float barHeight = plotHeight * Math.min(mValues[i], AXIS_MAX) / AXIS_MAX;
|
||||
mBarRect.set(centerX - barWidth / 2f, bottom - barHeight,
|
||||
centerX + barWidth / 2f, bottom);
|
||||
mBarPath.reset();
|
||||
mBarPath.addRoundRect(mBarRect,
|
||||
new float[]{radius, radius, radius, radius, 0f, 0f, 0f, 0f},
|
||||
Path.Direction.CW);
|
||||
canvas.drawPath(mBarPath, mBarPaint);
|
||||
|
||||
// 横轴标签
|
||||
if (i < mLabels.length) {
|
||||
float labelTop = bottom + dp(4f);
|
||||
float baseline = labelTop - mTextPaint.ascent();
|
||||
canvas.drawText(mLabels[i], centerX, baseline, mTextPaint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private float dp(float value) {
|
||||
return value * mDensity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.ckkj.griddlebiz.statistics.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* 环形占比图:按百分比顺序绘制圆环,从 12 点方向顺时针开始。
|
||||
* 环宽固定为图形短边的 17.6%,与设计稿圆环厚度一致。
|
||||
*/
|
||||
public class DonutChartView extends View {
|
||||
|
||||
/** 环宽占短边的比例 */
|
||||
private static final float RING_WIDTH_RATIO = 0.176f;
|
||||
private static final float START_ANGLE = -90f;
|
||||
|
||||
private final Paint mRingPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final RectF mRingRect = new RectF();
|
||||
|
||||
private float[] mValues = new float[0];
|
||||
private int[] mColors = new int[0];
|
||||
|
||||
public DonutChartView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public DonutChartView(Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public DonutChartView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mRingPaint.setStyle(Paint.Style.STROKE);
|
||||
mRingPaint.setStrokeCap(Paint.Cap.BUTT);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置占比数据,values 与 colors 一一对应,values 之和应为 100。
|
||||
*/
|
||||
public void setData(float[] values, int[] colors) {
|
||||
mValues = values == null ? new float[0] : values;
|
||||
mColors = colors == null ? new int[0] : colors;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
int size = Math.min(getWidth(), getHeight());
|
||||
if (size <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
float strokeWidth = size * RING_WIDTH_RATIO;
|
||||
float inset = strokeWidth / 2f;
|
||||
mRingRect.set(inset, inset, getWidth() - inset, getHeight() - inset);
|
||||
mRingPaint.setStrokeWidth(strokeWidth);
|
||||
|
||||
float angle = START_ANGLE;
|
||||
for (int i = 0; i < mValues.length && i < mColors.length; i++) {
|
||||
float sweep = 360f * mValues[i] / 100f;
|
||||
mRingPaint.setColor(mColors[i]);
|
||||
canvas.drawArc(mRingRect, angle, sweep, false, mRingPaint);
|
||||
angle += sweep;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ckkj.griddlebiz.user;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.ckkj.griddlebiz.R;
|
||||
import com.ckkj.griddlebiz.base.BaseActivityNoP;
|
||||
import com.ckkj.griddlebiz.databinding.UserDeviceLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 用户设备列表:展示用户基本信息与其名下设备(在线 / 故障 / 离线三种状态)。
|
||||
* 设备数据目前使用设计稿示例,后续接入用户设备接口时替换。
|
||||
*/
|
||||
public class UserDeviceDetailActivity extends BaseActivityNoP<UserDeviceLayoutBinding> {
|
||||
|
||||
@Override
|
||||
public int getLayoutResId(Bundle savedInstanceState) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.init();
|
||||
|
||||
viewBinding.tvUserNamePhone.setText(getString(R.string.user_device_name_phone,
|
||||
getString(R.string.user_sample_name), getString(R.string.user_sample_phone)));
|
||||
viewBinding.tvDeviceTotal.setText(getString(R.string.user_device_total, "128"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户设备列表点击事件。
|
||||
*/
|
||||
@OnClick(R.id.iv_back)
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
// 返回上一页
|
||||
finish();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
hideLoading();
|
||||
if (message != null && !message.isEmpty()) {
|
||||
ToastUtil.showShort(mContext, message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.ckkj.griddlebiz.user;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import com.ckkj.griddlebiz.R;
|
||||
import com.ckkj.griddlebiz.base.BaseActivityNoP;
|
||||
import com.ckkj.griddlebiz.databinding.UserManageLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
import butterknife.OnClick;
|
||||
|
||||
/**
|
||||
* 用户管理:按 SN / 机主 / 用户搜索,展示用户列表,点击用户进入其设备列表。
|
||||
* 列表数据目前使用设计稿示例,后续接入用户接口时替换。
|
||||
*/
|
||||
public class UserManageActivity extends BaseActivityNoP<UserManageLayoutBinding> {
|
||||
|
||||
@Override
|
||||
public int getLayoutResId(Bundle savedInstanceState) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.keyboardEnable(true)
|
||||
.init();
|
||||
|
||||
viewBinding.tvUserTotal.setText(getString(R.string.user_manage_total, "128"));
|
||||
|
||||
// 键盘搜索键触发查询
|
||||
viewBinding.etSearch.setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
|
||||
onSearch();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户管理页点击事件。
|
||||
*/
|
||||
@OnClick({R.id.iv_back, R.id.iv_search, R.id.card_user_1, R.id.card_user_2, R.id.card_user_3})
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
// 返回上一页
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.iv_search:
|
||||
// 按关键字搜索用户
|
||||
onSearch();
|
||||
break;
|
||||
|
||||
case R.id.card_user_1:
|
||||
case R.id.card_user_2:
|
||||
case R.id.card_user_3:
|
||||
// 进入该用户的设备列表
|
||||
startActivity(new Intent(mContext, UserDeviceDetailActivity.class));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索用户,接口待接入。
|
||||
*/
|
||||
private void onSearch() {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(viewBinding.etSearch.getWindowToken(), 0);
|
||||
}
|
||||
ToastUtil.showShort(mContext, R.string.user_manage_search_unavailable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
hideLoading();
|
||||
if (message != null && !message.isEmpty()) {
|
||||
ToastUtil.showShort(mContext, message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
}
|
||||
}
|
||||
5
app/src/main/res/color/pickup_stats_chip_text.xml
Normal 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="@android:color/white" android:state_selected="true" />
|
||||
<item android:color="#666666" />
|
||||
</selector>
|
||||
@@ -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="#FDECEC" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
@@ -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="#DDDDDD" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
@@ -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="#E9F7EF" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/ic_statistics_bell.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="13dp"
|
||||
android:height="13dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#999999"
|
||||
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.9,2 2,2zM18,16v-5c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.64,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
|
||||
</vector>
|
||||
6
app/src/main/res/drawable/pickup_code_bar_bg.xml
Normal 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="#FFF0E5" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
21
app/src/main/res/drawable/pickup_code_box_selector.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_focused="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFF0E5" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FF6900" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#DDDDDD" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
6
app/src/main/res/drawable/pickup_points_bg.xml
Normal 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="#FFF0E5" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/pickup_primary_button_bg.xml
Normal 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="#FF6900" />
|
||||
<corners android:radius="26dp" />
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/pickup_stats_badge_bg.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#33FFFFFF" />
|
||||
<corners
|
||||
android:bottomLeftRadius="12dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="16dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/pickup_stats_card_bg.xml
Normal 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="@android:color/white" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FF6900" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
@@ -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="#FF6900" />
|
||||
<corners android:radius="24dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/pickup_stats_chip_bg.xml
Normal 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="@android:color/white" />
|
||||
<corners android:radius="24dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/pickup_stats_chip_selector.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/pickup_stats_chip_active_bg" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/pickup_stats_chip_bg" />
|
||||
</selector>
|
||||
6
app/src/main/res/drawable/pickup_stats_hero_bg.xml
Normal 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="#FF6900" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/pickup_stats_pill_bg.xml
Normal 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="#40FFFFFF" />
|
||||
<corners android:radius="14dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/statistics_desc_bg.xml
Normal 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="#F5F5F5" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/statistics_desc_pill_bg.xml
Normal 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="#F5F5F5" />
|
||||
<corners android:radius="14dp" />
|
||||
</shape>
|
||||
@@ -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="#FFFFFF" />
|
||||
<corners android:radius="1dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/statistics_progress_fill.xml
Normal 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="#FF6900" />
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
||||
@@ -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="#FF6900" />
|
||||
<corners android:radius="3dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/statistics_track_bg.xml
Normal 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="#F5F5F5" />
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
||||
9
app/src/main/res/drawable/user_search_bg.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#FFFFFF" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#DDDDDD" />
|
||||
<corners android:radius="24dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/user_status_fault_bg.xml
Normal 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="#FDECEC" />
|
||||
<corners android:radius="24dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/user_status_offline_bg.xml
Normal 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="#F5F5F5" />
|
||||
<corners android:radius="24dp" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/user_status_online_bg.xml
Normal 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="#E9F7EF" />
|
||||
<corners android:radius="24dp" />
|
||||
</shape>
|
||||
@@ -26,10 +26,8 @@
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:padding="20dp"
|
||||
android:onClick="blck"
|
||||
android:id="@+id/mIvtitle_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="OnClick" />
|
||||
android:layout_height="wrap_content" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
532
app/src/main/res/layout/device_detail_layout.xml
Normal file
@@ -0,0 +1,532 @@
|
||||
<?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="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/device_manage_back"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_product_inbound_back" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/device_detail_title"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#F5F5F5"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<!-- 状态卡:底部提示条在上,白色设备头卡覆盖其上 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/banner_online"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="114dp"
|
||||
android:background="@drawable/device_detail_banner_online_bg"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="74dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_banner_online" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:lineSpacingExtra="1dp"
|
||||
android:text="@string/device_detail_banner_online"
|
||||
android:textColor="#22A45D"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/banner_fault"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="135dp"
|
||||
android:background="@drawable/device_detail_banner_fault_bg"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="74dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_banner_fault" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="1dp"
|
||||
android:text="@string/device_detail_banner_fault"
|
||||
android:textColor="#E5484D"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/device_detail_banner_fault_time"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/banner_offline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="114dp"
|
||||
android:background="@drawable/device_detail_banner_offline_bg"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="74dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_banner_offline" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:lineSpacingExtra="1dp"
|
||||
android:text="@string/device_detail_banner_offline"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingEnd="14dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_device_icon"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_manage_box" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="SN-AIR2024031201"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="KF-800 → Air Purifier KF-800"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="27dp"
|
||||
android:layout_gravity="top"
|
||||
android:background="@drawable/device_manage_status_online_bg"
|
||||
android:gravity="center"
|
||||
android:minWidth="68dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:textColor="#22A45D"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/device_detail_section_info"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_sn" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_sn"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="SN-AIR2026031201"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_model" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_model"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="AIR2026031201"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_owner" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_owner"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:lineSpacingExtra="0.6dp"
|
||||
android:maxWidth="171dp"
|
||||
android:text="上海物业管理 有限公司"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_user" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_user"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="张三·13998098767"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_time" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_activation_time"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="2026-10-13 21:54:36"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_location" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_location"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:lineSpacingExtra="0.6dp"
|
||||
android:maxWidth="171dp"
|
||||
android:text="上海市浦东新区 世纪大道 100 号"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_runtime" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_runtime"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="1268 小时"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -309,6 +309,7 @@
|
||||
|
||||
<!-- 在线设备 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_online"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
@@ -463,6 +464,7 @@
|
||||
|
||||
<!-- 故障设备 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_fault"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
@@ -619,6 +621,7 @@
|
||||
|
||||
<!-- 离线设备:整张卡片弱化 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_offline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
|
||||
699
app/src/main/res/layout/pickup_order_stats_layout.xml
Normal file
@@ -0,0 +1,699 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/device_manage_back"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_product_inbound_back" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/pickup_stats_title"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#F5F5F5"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<!-- 累计统计主卡 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="121dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/pickup_stats_hero_bg">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingEnd="14dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="@string/pickup_stats_all"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="29dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="29dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="1,280"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:text="@string/pickup_stats_orders"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="27dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/pickup_stats_pill_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_pickup_stats_points" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_points"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="181dp"
|
||||
android:layout_height="29dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:background="@drawable/pickup_stats_badge_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pickup_stats_cumulative"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 四项概览数据 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="85dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="85dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_stats_card_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="14dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/pickup_stats_week"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="36"
|
||||
android:textColor="#222222"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:text="@string/pickup_stats_orders"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="85dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_stats_card_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="14dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/pickup_stats_month"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="123"
|
||||
android:textColor="#222222"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:text="@string/pickup_stats_orders"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="85dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="85dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_stats_card_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="14dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/pickup_stats_total_amount"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="¥128"
|
||||
android:textColor="#222222"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="85dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_stats_card_pending_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="14dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/pickup_stats_pending"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="4"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:text="@string/pickup_stats_orders"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 时间筛选 -->
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="33dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chip_all"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="33dp"
|
||||
android:background="@drawable/pickup_stats_chip_selector"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:text="@string/pickup_stats_all"
|
||||
android:textColor="@color/pickup_stats_chip_text"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chip_today"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/pickup_stats_chip_selector"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:text="@string/pickup_stats_today"
|
||||
android:textColor="@color/pickup_stats_chip_text"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chip_week"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/pickup_stats_chip_selector"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:text="@string/pickup_stats_this_week"
|
||||
android:textColor="@color/pickup_stats_chip_text"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chip_month"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/pickup_stats_chip_selector"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:text="@string/pickup_stats_this_month"
|
||||
android:textColor="@color/pickup_stats_chip_text"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<!-- 核销记录标题与导出 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:text="@string/pickup_stats_records"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_records_count"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_download"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/pickup_stats_export"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_pickup_stats_download" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 核销记录卡片 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="109dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
app:cardBackgroundColor="#F5F5F5"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="@string/pickup_stats_sample_name"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/pickup_stats_sample_product"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginTop="1dp"
|
||||
android:text="2026-10-23 10:09:13"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pickup_stats_points"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_pickup_stats_code" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="157 403"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="109dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
app:cardBackgroundColor="#F5F5F5"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="@string/pickup_stats_sample_name"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/pickup_stats_sample_product"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginTop="1dp"
|
||||
android:text="2026-10-23 10:09:13"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pickup_stats_points"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_pickup_stats_code" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="157 403"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/pickup_stats_load_more"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
492
app/src/main/res/layout/pickup_verify_layout.xml
Normal file
@@ -0,0 +1,492 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏:返回、标题、右上角扫码入口 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/device_manage_back"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_product_inbound_back" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/pickup_title"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_scan"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/pickup_scan"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_pickup_scan" />
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#F5F5F5"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<!-- 状态一:输入提货码 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/input_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingEnd="22dp"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:text="@string/pickup_enter_code_title"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/pickup_enter_code_hint"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code_1"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_code_box_selector"
|
||||
android:cursorVisible="false"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:padding="0dp"
|
||||
android:selectAllOnFocus="true"
|
||||
android:textColor="#222222"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code_2"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_code_box_selector"
|
||||
android:cursorVisible="false"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:padding="0dp"
|
||||
android:selectAllOnFocus="true"
|
||||
android:textColor="#222222"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code_3"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_code_box_selector"
|
||||
android:cursorVisible="false"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:padding="0dp"
|
||||
android:selectAllOnFocus="true"
|
||||
android:textColor="#222222"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code_4"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_code_box_selector"
|
||||
android:cursorVisible="false"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:padding="0dp"
|
||||
android:selectAllOnFocus="true"
|
||||
android:textColor="#222222"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code_5"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_code_box_selector"
|
||||
android:cursorVisible="false"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:padding="0dp"
|
||||
android:selectAllOnFocus="true"
|
||||
android:textColor="#222222"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_code_6"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/pickup_code_box_selector"
|
||||
android:cursorVisible="false"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLength="1"
|
||||
android:padding="0dp"
|
||||
android:selectAllOnFocus="true"
|
||||
android:textColor="#222222"
|
||||
android:textSize="24sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_query"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="51dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="21dp"
|
||||
android:background="@drawable/pickup_primary_button_bg"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="@string/pickup_query_order"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 状态二:查询成功后的订单与发货信息 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/result_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="77dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="77dp"
|
||||
android:layout_height="77dp"
|
||||
app:cardBackgroundColor="#F5F5F5"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_product"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/pickup_product_name"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:text="@string/pickup_product_name"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_spec"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="29dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/pickup_points_bg"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_pickup_user" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/pickup_user_nickname"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:text="张 * *"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_pickup_phone" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/pickup_user_phone"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:text="138****9982"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_pickup_time" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/pickup_order_time"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:text="2026-10-21 17:08:24"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/pickup_code_bar_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="20dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/pickup_code_label"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pickup_code"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="51dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="21dp"
|
||||
android:background="@drawable/pickup_primary_button_bg"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="@string/pickup_confirm_ship"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/scanRoot"
|
||||
android:id="@+id/scan_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black">
|
||||
@@ -28,7 +28,7 @@
|
||||
android:background="@drawable/product_scan_bottom_scrim" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/scanTopBar"
|
||||
android:id="@+id/scan_top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
@@ -39,7 +39,7 @@
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivScanBack"
|
||||
android:id="@+id/iv_scan_back"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
@@ -68,7 +68,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/scanBottomBar"
|
||||
android:id="@+id/scan_bottom_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
@@ -80,7 +80,7 @@
|
||||
android:paddingBottom="32dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvGallery"
|
||||
android:id="@+id/tv_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="44dp"
|
||||
android:background="@drawable/product_scan_gallery_bg"
|
||||
@@ -95,7 +95,7 @@
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvScanTip"
|
||||
android:id="@+id/tv_scan_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
|
||||
880
app/src/main/res/layout/statistics_layout.xml
Normal file
@@ -0,0 +1,880 @@
|
||||
<?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="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏:48dp,与商品入库保持一致 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/statistics_back"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_product_inbound_back" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/statistics_title"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 顶部双 Tab:数据统计 / 故障分析 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="69dp"
|
||||
android:background="@android:color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_stats"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="69dp"
|
||||
android:layout_weight="1"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_stats"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:text="@string/statistics_tab_stats"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/indicator_stats"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/statistics_tab_indicator_bg" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_fault"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="69dp"
|
||||
android:layout_weight="1"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_fault"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/statistics_tab_fault"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/indicator_fault"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/statistics_tab_indicator_bg"
|
||||
android:visibility="invisible" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#F5F5F5">
|
||||
|
||||
<!-- 数据统计 -->
|
||||
<ScrollView
|
||||
android:id="@+id/scroll_stats"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="118dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_statistics_sold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/statistics_sold"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="28"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="@string/statistics_units"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="@drawable/statistics_desc_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_statistics_bell" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_weight="1"
|
||||
android:lineSpacingExtra="2dp"
|
||||
android:maxLines="2"
|
||||
android:text="@string/statistics_sold_desc"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="101dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_statistics_stock" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/statistics_stock"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="128"
|
||||
android:textColor="#00AEFF"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="@string/statistics_units"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="27dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="@drawable/statistics_desc_pill_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_statistics_bell" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@string/statistics_stock_desc"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/statistics_stock_structure"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="275dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg">
|
||||
|
||||
<com.ckkj.griddlebiz.statistics.widget.DonutChartView
|
||||
android:id="@+id/donut_stats"
|
||||
android:layout_width="170dp"
|
||||
android:layout_height="170dp"
|
||||
android:layout_marginStart="88dp"
|
||||
android:layout_marginTop="40dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="170dp"
|
||||
android:layout_height="170dp"
|
||||
android:layout_marginStart="88dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="29dp"
|
||||
android:text="156"
|
||||
android:textColor="#222222"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/statistics_total_inbound"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="230dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="6dp"
|
||||
android:background="@drawable/statistics_legend_marker_bg"
|
||||
android:backgroundTint="#FF6900" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_legend_sold"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="157dp"
|
||||
android:layout_marginTop="230dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="6dp"
|
||||
android:background="@drawable/statistics_legend_marker_bg"
|
||||
android:backgroundTint="#00AEFF" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_legend_stock"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<!-- 故障分析 -->
|
||||
<ScrollView
|
||||
android:id="@+id/scroll_fault"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/statistics_fault_type"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="232dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg">
|
||||
|
||||
<com.ckkj.griddlebiz.statistics.widget.DonutChartView
|
||||
android:id="@+id/donut_fault"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="51dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="190dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="6dp"
|
||||
android:background="@drawable/statistics_legend_marker_bg"
|
||||
android:backgroundTint="#9923F3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fault_legend_1"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="6dp"
|
||||
android:background="@drawable/statistics_legend_marker_bg"
|
||||
android:backgroundTint="#F8A83D" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fault_legend_2"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="6dp"
|
||||
android:background="@drawable/statistics_legend_marker_bg"
|
||||
android:backgroundTint="#23A1F3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fault_legend_3"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="6dp"
|
||||
android:background="@drawable/statistics_legend_marker_bg"
|
||||
android:backgroundTint="#F93B41" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fault_legend_4"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/statistics_usage_duration"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="258dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg">
|
||||
|
||||
<com.ckkj.griddlebiz.statistics.widget.BarChartView
|
||||
android:id="@+id/bar_chart"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="236dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="14dp" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="24dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:text="@string/statistics_usage_time"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/statistics_daily_share"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="314dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingEnd="14dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="31dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="06:00-09:00"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:text="12%"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/statistics_track_bg">
|
||||
|
||||
<View
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/statistics_progress_fill" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="09:00-12:00"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:text="12%"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/statistics_track_bg">
|
||||
|
||||
<View
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/statistics_progress_fill" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="12:00-15:00"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:text="12%"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/statistics_track_bg">
|
||||
|
||||
<View
|
||||
android:layout_width="92dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/statistics_progress_fill" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="15:00-18:00"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:text="12%"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/statistics_track_bg">
|
||||
|
||||
<View
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/statistics_progress_fill" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="18:00-21:00"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:text="12%"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/statistics_track_bg">
|
||||
|
||||
<View
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/statistics_progress_fill" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="21:00-24:00"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:text="12%"
|
||||
android:textColor="#FF6900"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/statistics_track_bg">
|
||||
|
||||
<View
|
||||
android:layout_width="129dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/statistics_progress_fill" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
581
app/src/main/res/layout/user_device_layout.xml
Normal file
@@ -0,0 +1,581 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏:48dp,与商品入库保持一致 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/user_manage_back"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_product_inbound_back" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/user_device_title"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#F5F5F5"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<!-- 用户信息 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
app:cardBackgroundColor="#F5F5F5"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name_phone"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_device_location" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="77dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:text="@string/user_sample_location"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_device_total"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 设备卡片 1:在线 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_device_box" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/user_sample_sn"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_sample_model"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="@drawable/user_status_online_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/user_device_online"
|
||||
android:textColor="#22A45D"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="87dp"
|
||||
android:layout_height="38dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_activation"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_sample_activation"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="78dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_runtime"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_sample_runtime"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_fault_status"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_device_normal"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 设备卡片 2:故障 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_device_box" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/user_sample_sn"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_sample_model"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="@drawable/user_status_fault_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/user_device_fault"
|
||||
android:textColor="#E5484D"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="87dp"
|
||||
android:layout_height="38dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_activation"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_sample_activation"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="78dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_runtime"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_sample_runtime"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_fault_status"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_device_normal"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 设备卡片 3:离线 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_device_box_offline" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/user_sample_sn"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_sample_model"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="@drawable/user_status_offline_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/user_device_offline"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="87dp"
|
||||
android:layout_height="38dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_activation"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_sample_activation"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="78dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_runtime"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_sample_runtime"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/user_device_fault_status"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/user_device_normal"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
488
app/src/main/res/layout/user_manage_layout.xml
Normal file
@@ -0,0 +1,488 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏:48dp,与商品入库保持一致 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/user_manage_back"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_product_inbound_back" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/user_manage_title"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 搜索区:48dp 圆角输入框 + 36dp 橙色搜索按钮 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_search"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="26dp"
|
||||
android:background="@drawable/user_search_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/user_manage_search_hint"
|
||||
android:imeOptions="actionSearch"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="50dp"
|
||||
android:textColor="#222222"
|
||||
android:textColorHint="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_search"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/user_manage_search"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_user_search" />
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#F5F5F5"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_total"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 用户卡片 1 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_user_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="107dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
app:cardBackgroundColor="#F5F5F5"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/user_sample_name"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_phone" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="77dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:text="@string/user_sample_phone_masked"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_marginTop="21dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_arrow" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_location" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@string/user_sample_location"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_clock" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/user_sample_time"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 用户卡片 2 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_user_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="107dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
app:cardBackgroundColor="#F5F5F5"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/user_sample_name"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_phone" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="77dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:text="@string/user_sample_phone_masked"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_marginTop="21dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_arrow" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_location" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@string/user_sample_location"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_clock" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/user_sample_time"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 用户卡片 3 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_user_3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="107dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
app:cardBackgroundColor="#F5F5F5"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/user_sample_name"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_phone" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="77dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:text="@string/user_sample_phone_masked"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_marginTop="21dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_arrow" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:background="#DDDDDD" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_location" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:text="@string/user_sample_location"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_user_clock" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/user_sample_time"
|
||||
android:textColor="#222222"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
BIN
app/src/main/res/mipmap-hdpi/icon_statistics_sold.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/mipmap-hdpi/icon_statistics_stock.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/icon_user_arrow.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
app/src/main/res/mipmap-hdpi/icon_user_clock.png
Normal file
|
After Width: | Height: | Size: 990 B |
BIN
app/src/main/res/mipmap-hdpi/icon_user_device_box.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-hdpi/icon_user_device_box_offline.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/mipmap-hdpi/icon_user_device_location.png
Normal file
|
After Width: | Height: | Size: 1019 B |
BIN
app/src/main/res/mipmap-hdpi/icon_user_location.png
Normal file
|
After Width: | Height: | Size: 1019 B |
BIN
app/src/main/res/mipmap-hdpi/icon_user_phone.png
Normal file
|
After Width: | Height: | Size: 608 B |
BIN
app/src/main/res/mipmap-hdpi/icon_user_search.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/mipmap-mdpi/icon_statistics_sold.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-mdpi/icon_statistics_stock.png
Normal file
|
After Width: | Height: | Size: 1016 B |
BIN
app/src/main/res/mipmap-mdpi/icon_user_arrow.png
Normal file
|
After Width: | Height: | Size: 389 B |
BIN
app/src/main/res/mipmap-mdpi/icon_user_clock.png
Normal file
|
After Width: | Height: | Size: 518 B |
BIN
app/src/main/res/mipmap-mdpi/icon_user_device_box.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-mdpi/icon_user_device_box_offline.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-mdpi/icon_user_device_location.png
Normal file
|
After Width: | Height: | Size: 447 B |
BIN
app/src/main/res/mipmap-mdpi/icon_user_location.png
Normal file
|
After Width: | Height: | Size: 447 B |
BIN
app/src/main/res/mipmap-mdpi/icon_user_phone.png
Normal file
|
After Width: | Height: | Size: 381 B |
BIN
app/src/main/res/mipmap-mdpi/icon_user_search.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_location.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_model.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_owner.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_runtime.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_sn.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_time.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_user.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_pickup_phone.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_pickup_scan.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_pickup_stats_code.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_pickup_stats_download.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_pickup_stats_points.png
Normal file
|
After Width: | Height: | Size: 870 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_pickup_time.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_pickup_user.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_statistics_sold.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_statistics_stock.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_user_arrow.png
Normal file
|
After Width: | Height: | Size: 816 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_user_clock.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_user_device_box.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_user_device_box_offline.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_user_device_location.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_user_location.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_user_phone.png
Normal file
|
After Width: | Height: | Size: 867 B |