From 57e29e227a14c31c92a30a9933e9bf152b64bfbb Mon Sep 17 00:00:00 2001 From: fyf Date: Tue, 22 Aug 2023 17:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=8F=E6=98=BE=E7=A4=BA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 38 +- .../business/ExecuteTheRecipe.java | 31 +- .../bnframework/common/base/BaseActivity.java | 9 +- .../bnframework/common/helper/ActiveMax.java | 97 +- .../modules/home/fragment/Home1Fragment.java | 3 +- .../home/fragment/from/CpActivity.java | 3 +- .../home/fragment/from/CpxzActivity.java | 3 +- .../home/fragment/from/DiyActivity.java | 3 +- .../home/fragment/from/DiyUpdateActivity.java | 3 +- .../home/fragment/from/FileActivity.java | 20 +- .../fragment/from/ImageChooseActivity.java | 3 +- .../home/fragment/from/SzActivity.java | 3 +- .../home/fragment/from/WhActivity.java | 3 +- .../mine/fragment/from/NoticeActivity.java | 3 +- .../welcome/activity/WelcomeActivity.java | 3 +- app/src/main/res/layout/activity_cp.xml | 31 +- app/src/main/res/layout/activity_cpxz.xml | 24 +- app/src/main/res/layout/activity_diy.xml | 24 +- .../main/res/layout/activity_diy_update.xml | 24 +- app/src/main/res/layout/activity_file.xml | 128 +- .../main/res/layout/activity_image_choose.xml | 24 +- app/src/main/res/layout/activity_login.xml | 342 ++-- app/src/main/res/layout/activity_notice.xml | 58 +- app/src/main/res/layout/activity_sz.xml | 54 +- app/src/main/res/layout/activity_welcome.xml | 5 +- app/src/main/res/layout/activity_wh.xml | 56 +- app/src/main/res/layout/fragment_home1.xml | 1604 ++++++++--------- app/src/main/res/layout/fragment_home2.xml | 306 ++-- 28 files changed, 1437 insertions(+), 1468 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9cd70aaf..0ed59279 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,8 @@ + + @@ -14,14 +16,9 @@ - - - - + android:exported="false" + tools:ignore="Instantiatable" /> @@ -55,26 +53,31 @@ + tools:ignore="Instantiatable" /> + android:exported="false" + tools:ignore="Instantiatable" /> + android:exported="false" + tools:ignore="Instantiatable" /> + android:exported="false" + tools:ignore="Instantiatable" /> + android:exported="false" + tools:ignore="Instantiatable" /> + android:exported="false" + tools:ignore="Instantiatable" /> @@ -106,8 +109,8 @@ + android:exported="true" + android:theme="@style/AppTheme.Launcher"> @@ -134,10 +137,7 @@ --> - - - - + @@ -147,8 +147,6 @@ - - \ No newline at end of file diff --git a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java index c37669e1..a8f196b9 100644 --- a/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java +++ b/app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java @@ -285,7 +285,7 @@ public class ExecuteTheRecipe { String key = entry.getKey(); String value = entry.getValue(); ToastUtils.info("工序:" + key + "," + value); - if (key.contains("延迟")) { + if (key.contains("(秒)")) { int val = Integer.parseInt(value); Thread.sleep(val * 1000); } else { @@ -322,7 +322,7 @@ public class ExecuteTheRecipe { String key = entry.getKey(); String value = entry.getValue(); ToastUtils.info("工序:" + key + "," + value); - if (key.contains("延迟")) { + if (key.contains("(秒)")) { int val = Integer.parseInt(value); Thread.sleep(val * 1000); } else if (key.contains("速度")) { @@ -493,7 +493,7 @@ public class ExecuteTheRecipe { for (HashMap.Entry entry : data.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); - if (key.contains("秒")) { + if (key.contains("(秒)")) { val = Integer.parseInt(value); } } @@ -549,7 +549,7 @@ public class ExecuteTheRecipe { String key = entry.getKey(); String value = entry.getValue(); ToastUtils.info("工序:" + key + "," + value); - if (key.contains("延迟")) { + if (key.contains("(秒)")) { int val = Integer.parseInt(value); Thread.sleep(val * 1000); } else { @@ -586,7 +586,7 @@ public class ExecuteTheRecipe { String key = entry.getKey(); String value = entry.getValue(); ToastUtils.info("工序:" + key + "," + value); - if (key.contains("延迟")) { + if (key.contains("(秒)")) { int val = Integer.parseInt(value); Thread.sleep(val * 1000); } @@ -603,15 +603,7 @@ public class ExecuteTheRecipe { */ private static void Write_PLC_Outdishes(HashMap data) { try { - for (HashMap.Entry entry : data.entrySet()) { - String key = entry.getKey(); - String value = entry.getValue(); - ToastUtils.info("工序:" + key + "," + value); - if (key.contains("延迟")) { - int val = Integer.parseInt(value); - Thread.sleep(val * 1000); - } - } + BottomClick("出菜"); //一直等待机器移动到该位置,否则就一直等待 6s超时 @@ -629,6 +621,17 @@ public class ExecuteTheRecipe { } Thread.sleep(100);//10 *6 } + + + for (HashMap.Entry entry : data.entrySet()) { + String key = entry.getKey(); + String value = entry.getValue(); + ToastUtils.info("工序:" + key + "," + value); + if (key.contains("(秒)")) { + int val = Integer.parseInt(value); + Thread.sleep(val * 1000); + } + } ToastUtils.info("出菜完成,结束制作!"); } catch (Exception ex) { ToastUtils.error("异常信息:" + ex.getMessage()); diff --git a/app/src/main/java/com/bonait/bnframework/common/base/BaseActivity.java b/app/src/main/java/com/bonait/bnframework/common/base/BaseActivity.java index 579845b0..8caacb83 100644 --- a/app/src/main/java/com/bonait/bnframework/common/base/BaseActivity.java +++ b/app/src/main/java/com/bonait/bnframework/common/base/BaseActivity.java @@ -26,18 +26,15 @@ import pub.devrel.easypermissions.EasyPermissions; /** - * Created by LY on 2019/3/21. + * Created by FYF on 2019/3/21. */ @SuppressLint("Registered") public class BaseActivity extends QMUIActivity implements EasyPermissions.PermissionCallbacks { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { - -// QMUIStatusBarHelper.translucent(this); -// QMUIStatusBarHelper.setStatusBarLightMode(this); - //ActiveMax.MaxFrom(this); - // + //全屏插件 + ActiveMax.MaxFrom(this); super.onCreate(savedInstanceState); } diff --git a/app/src/main/java/com/bonait/bnframework/common/helper/ActiveMax.java b/app/src/main/java/com/bonait/bnframework/common/helper/ActiveMax.java index 499c0456..0ef76f41 100644 --- a/app/src/main/java/com/bonait/bnframework/common/helper/ActiveMax.java +++ b/app/src/main/java/com/bonait/bnframework/common/helper/ActiveMax.java @@ -1,9 +1,14 @@ package com.bonait.bnframework.common.helper; +import android.annotation.SuppressLint; +import android.app.ActionBar; import android.app.Activity; import android.os.Build; +import android.os.Handler; +import android.os.Looper; import android.view.View; import android.view.ViewTreeObserver; +import android.view.WindowInsets; import android.view.WindowManager; import com.qmuiteam.qmui.util.QMUINotchHelper; @@ -35,46 +40,29 @@ public class ActiveMax { activities.add(activity); } - //QMUINotchHelper.getSafeInsetBottom(activity) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - // 全屏显示,隐藏状态栏和导航栏,拉出状态栏和导航栏显示一会儿后消失。 -// activity.getWindow().getDecorView().setSystemUiVisibility( -// View.SYSTEM_UI_FLAG_LAYOUT_STABLE -// | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN -// | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION -// | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION -// | View.SYSTEM_UI_FLAG_FULLSCREEN -// | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); - // activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_FULLSCREEN); - // activity.getWindow().getDecorView().setSystemUiVisibility(View.INVISIBLE); - - activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); - - - } else { - // 全屏显示,隐藏状态栏 - activity.getWindow().getDecorView().setSystemUiVisibility(View.INVISIBLE); - } - } + //显示全屏 + ShowMaxFrom(activity); // 注册监听器 activity.getWindow().getDecorView().getViewTreeObserver().addOnGlobalLayoutListener(keyboardVisibilityListener); // 禁用触摸事件触发导航栏显示 -// activity.getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() { -// @Override -// public void onSystemUiVisibilityChange(int visibility) { -// if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { -// // 如果导航栏显示,则重新设置全屏 -// activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); -// } -// } -// }); - + // activity.getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(setOnSystemUiVisibilityChangeListener); } /** - * 家农安 + * 状态栏变化后事件 + */ + private static View.OnSystemUiVisibilityChangeListener setOnSystemUiVisibilityChangeListener=new View.OnSystemUiVisibilityChangeListener() { + @Override + public void onSystemUiVisibilityChange(int visibility) { + if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { + //如果非全屏 + + } + } + }; + /** + * 键盘打开后改变状态栏显示方式->这里启动监听并且设置全屏 */ private static ViewTreeObserver.OnGlobalLayoutListener keyboardVisibilityListener = new ViewTreeObserver.OnGlobalLayoutListener() { @Override @@ -83,47 +71,44 @@ public class ActiveMax { // 检查键盘的可见性和高度等信息来判断键盘是否关闭 for (Activity activity:activities) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - // 全屏显示,隐藏状态栏和导航栏,拉出状态栏和导航栏显示一会儿后消失。 -// activity.getWindow().getDecorView().setSystemUiVisibility( -// View.SYSTEM_UI_FLAG_LAYOUT_STABLE -// | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN -// | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION -// | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION -// | View.SYSTEM_UI_FLAG_FULLSCREEN -// | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); - //activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_FULLSCREEN); - activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); - - } else { - // 全屏显示,隐藏状态栏 - activity.getWindow().getDecorView().setSystemUiVisibility(View.INVISIBLE); - } - } + ShowMaxFrom(activity); } } }; - public static void closeMaxFrom(Activity activity) { - // 全屏展示 + /** + * 显示全屏 + * @param activity + */ + public static void ShowMaxFrom(Activity activity) + { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { // 全屏显示,隐藏状态栏和导航栏,拉出状态栏和导航栏显示一会儿后消失。 + // 启动游戏模式,设置状态栏和导航栏中的图标变小,变模糊或者弱化其效果 activity.getWindow().getDecorView().setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LAYOUT_STABLE + View.SYSTEM_UI_FLAG_LOW_PROFILE + | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); + //activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_FULLSCREEN); + //activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); } else { // 全屏显示,隐藏状态栏 - activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN); + activity.getWindow().getDecorView().setSystemUiVisibility(View.INVISIBLE); } } + } - // 非全屏显示,显示状态栏和导航栏 + /** + * 关闭全屏显示 + * @param activity + */ + public static void CloseMaxFrom(Activity activity) { + // 非全屏显示,显示状态栏和导航栏 activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); } } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java index 66e345d6..37bee00e 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java @@ -62,6 +62,7 @@ import com.litao.slider.Utils; import com.lzy.okgo.OkGo; import com.orhanobut.logger.Logger; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import com.qmuiteam.qmui.widget.dialog.QMUIDialog; import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; import com.qmuiteam.qmui.widget.textview.QMUILinkTextView; @@ -81,7 +82,7 @@ import butterknife.OnClick; */ public class Home1Fragment extends BaseFragment { @BindView(R.id.topbar) - QMUITopBar mTopBar;//顶部标题 + QMUITopBarLayout mTopBar;//顶部标题 @BindView(R.id.xzcp) RelativeLayout xzcp;//选择菜谱 @BindView(R.id.recycler_view) diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java index 350a0a9a..e02ed70c 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java @@ -33,6 +33,7 @@ import com.bonait.bnframework.modules.home.fragment.mode.SectionHeader; import com.bonait.bnframework.modules.home.fragment.mode.SectionItem; import com.bonait.bnframework.modules.home.fragment.mode.fragment_plc; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import com.qmuiteam.qmui.widget.section.QMUISection; import com.qmuiteam.qmui.widget.section.QMUIStickySectionAdapter; import com.qmuiteam.qmui.widget.section.QMUIStickySectionLayout; @@ -46,7 +47,7 @@ import butterknife.ButterKnife; public class CpActivity extends BaseActivity { @BindView(R.id.topbar) - QMUITopBar mTopBar; + QMUITopBarLayout mTopBar; @BindView(R.id.qmuisection_layout) QMUIStickySectionLayout mSectionLayout; diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpxzActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpxzActivity.java index d8aac838..96e17787 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpxzActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpxzActivity.java @@ -15,13 +15,14 @@ import com.bonait.bnframework.common.utils.ToastUtils; import com.bonait.bnframework.common.view.MyLayoutManager; import com.bonait.bnframework.modules.home.adapter.sp_adapter; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import butterknife.BindView; import butterknife.ButterKnife; public class CpxzActivity extends BaseActivity { @BindView(R.id.topbar) - QMUITopBar mTopBar;//顶部标题 + QMUITopBarLayout mTopBar;//顶部标题 @BindView(R.id.recycler_view) RecyclerView recyclerView;//菜谱列表 @BindView(R.id.search_view) diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java index 405b87bd..a872335b 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java @@ -46,6 +46,7 @@ import com.bonait.bnframework.modules.home.adapter.lcsz_adapter; import com.bonait.bnframework.modules.home.fragment.mode.fragment_gx; import com.bonait.bnframework.modules.home.fragment.mode.item_gx; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import com.qmuiteam.qmui.widget.dialog.QMUIDialog; import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; import com.youth.banner.Banner; @@ -67,7 +68,7 @@ import butterknife.OnClick; public class DiyActivity extends BaseActivity { @BindView(R.id.topbar) - QMUITopBar mTopBar; + QMUITopBarLayout mTopBar; @BindView(R.id.edittext) EditText edittext;//菜谱名称 @BindView(R.id.cpfm) diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java index cdcebe5f..b028bb9e 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java @@ -39,6 +39,7 @@ import com.bonait.bnframework.modules.home.adapter.gongxubuzhou_adapter; import com.bonait.bnframework.modules.home.fragment.mode.fragment_gx; import com.bonait.bnframework.modules.home.fragment.mode.item_gx; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import com.qmuiteam.qmui.widget.dialog.QMUIDialog; import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; import com.youth.banner.Banner; @@ -57,7 +58,7 @@ import butterknife.OnClick; public class DiyUpdateActivity extends BaseActivity { @BindView(R.id.topbar) - QMUITopBar mTopBar; + QMUITopBarLayout mTopBar; @BindView(R.id.edittext) EditText edittext;//菜谱名称 @BindView(R.id.cpfm) diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/FileActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/FileActivity.java index 9c212092..7fa9982f 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/FileActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/FileActivity.java @@ -12,6 +12,7 @@ import android.widget.Button; import android.widget.TextView; import com.bonait.bnframework.R; +import com.bonait.bnframework.common.base.BaseActivity; import com.bonait.bnframework.common.filepicker.FileAllFragment; import com.bonait.bnframework.common.filepicker.FileCommonFragment; import com.bonait.bnframework.common.filepicker.OnUpdateDataListener; @@ -19,11 +20,12 @@ import com.bonait.bnframework.common.filepicker.PickerManager; import com.bonait.bnframework.common.filepicker.model.FileEntity; import com.bonait.bnframework.common.filepicker.util.FileUtils; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import java.io.File; -public class FileActivity extends AppCompatActivity implements View.OnClickListener, OnUpdateDataListener { - private QMUITopBar mTopBar; +public class FileActivity extends BaseActivity implements View.OnClickListener, OnUpdateDataListener { + private QMUITopBarLayout mTopBar; private Button btn_common,btn_all; private TextView tv_size,tv_confirm; private Fragment commonFileFragment,allFileFragment; @@ -139,11 +141,11 @@ public class FileActivity extends AppCompatActivity implements View.OnClickListe tv_confirm.setText(getString(R.string.file_select_res,res)); } - @Override - public void onBackPressed() { - super.onBackPressed(); - if(!isConfirm){ - PickerManager.getInstance().files.clear(); - } - } +// @Override +// public void onBackPressed() { +// super.onBackPressed(); +// if(!isConfirm){ +// PickerManager.getInstance().files.clear(); +// } +// } } \ No newline at end of file diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java index f8bf9a7e..be7b9ad7 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java @@ -22,6 +22,7 @@ import com.bonait.bnframework.modules.home.adapter.image_sp_adapter; import com.bonait.bnframework.modules.home.adapter.sp_adapter; import com.bonait.bnframework.modules.home.fragment.mode.image_sp; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import java.io.File; import java.util.ArrayList; @@ -33,7 +34,7 @@ import butterknife.ButterKnife; public class ImageChooseActivity extends BaseActivity { @BindView(R.id.topbar) - QMUITopBar mTopBar;//顶部标题 + QMUITopBarLayout mTopBar;//顶部标题 @BindView(R.id.recycler_view) RecyclerView recyclerView;//image列表 private static final String CACHE_PATH= Environment.getExternalStorageDirectory().getAbsolutePath()+"/hblxiaochaodb/WebImage"; diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SzActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SzActivity.java index 66a28955..93438bef 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SzActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SzActivity.java @@ -16,6 +16,7 @@ import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemSeasonin import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemSystemsetFragment; import com.bonait.bnframework.modules.home.fragment.from.fragment.systeminternetfragment; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import com.qmuiteam.qmui.widget.QMUIViewPager; import butterknife.BindView; @@ -23,7 +24,7 @@ import butterknife.ButterKnife; public class SzActivity extends BaseActivity { @BindView(R.id.topbar) - QMUITopBar mTopBar;//top标题 + QMUITopBarLayout mTopBar;//top标题 @BindView(R.id.navigation) BottomNavigationView bottomNavigationView; @BindView(R.id.viewpager) diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java index 32dce487..d2549c4a 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java @@ -18,6 +18,7 @@ import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemCsFltlFr import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemCsControlFragment; import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemCsMonitorFragment; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import com.qmuiteam.qmui.widget.QMUIViewPager; import butterknife.BindView; @@ -25,7 +26,7 @@ import butterknife.ButterKnife; public class WhActivity extends BaseActivity { @BindView(R.id.topbar) - QMUITopBar mTopBar; + QMUITopBarLayout mTopBar; @BindView(R.id.navigation) BottomNavigationView bottomNavigationView; @BindView(R.id.viewpager) diff --git a/app/src/main/java/com/bonait/bnframework/modules/mine/fragment/from/NoticeActivity.java b/app/src/main/java/com/bonait/bnframework/modules/mine/fragment/from/NoticeActivity.java index 5f191250..5f820469 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/mine/fragment/from/NoticeActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/mine/fragment/from/NoticeActivity.java @@ -10,6 +10,7 @@ import com.bonait.bnframework.common.base.BaseActivity; import com.bonait.bnframework.common.utils.ToastUtils; import com.orhanobut.logger.Logger; import com.qmuiteam.qmui.widget.QMUITopBar; +import com.qmuiteam.qmui.widget.QMUITopBarLayout; import butterknife.BindView; import butterknife.ButterKnife; @@ -18,7 +19,7 @@ import butterknife.OnClick; public class NoticeActivity extends BaseActivity{ @BindView(R.id.topbar) - QMUITopBar mTopBar; + QMUITopBarLayout mTopBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java b/app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java index c4734695..00d09c22 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java @@ -11,6 +11,7 @@ import android.view.KeyEvent; import com.bonait.bnframework.R; import com.bonait.bnframework.business.MainInit; +import com.bonait.bnframework.common.base.BaseActivity; import com.bonait.bnframework.common.constant.ConfigName; import com.bonait.bnframework.common.constant.Constants; import com.bonait.bnframework.manager.ActivityLifecycleManager; @@ -22,7 +23,7 @@ import okhttp3.OkHttpClient; import pub.devrel.easypermissions.AfterPermissionGranted; import pub.devrel.easypermissions.EasyPermissions; -public class WelcomeActivity extends AppCompatActivity { +public class WelcomeActivity extends BaseActivity { private Handler handler = new Handler(); /* diff --git a/app/src/main/res/layout/activity_cp.xml b/app/src/main/res/layout/activity_cp.xml index 34b239df..401b44ab 100644 --- a/app/src/main/res/layout/activity_cp.xml +++ b/app/src/main/res/layout/activity_cp.xml @@ -1,32 +1,31 @@ - - + tools:context=".modules.home.fragment.from.CpActivity"> + + android:layout_marginTop="?attr/qmui_topbar_height" + android:background="@color/activity_background" + android:fitsSystemWindows="true"> + android:layout_height="match_parent" /> - \ No newline at end of file + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_cpxz.xml b/app/src/main/res/layout/activity_cpxz.xml index bd64dd4c..6ba57077 100644 --- a/app/src/main/res/layout/activity_cpxz.xml +++ b/app/src/main/res/layout/activity_cpxz.xml @@ -1,5 +1,5 @@ - - + android:background="@color/activity_background" + android:layout_marginTop="?attr/qmui_topbar_height" + android:fitsSystemWindows="true" + > - \ No newline at end of file + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_diy.xml b/app/src/main/res/layout/activity_diy.xml index 6c19d77d..cfffe888 100644 --- a/app/src/main/res/layout/activity_diy.xml +++ b/app/src/main/res/layout/activity_diy.xml @@ -1,5 +1,5 @@ - - + + android:layout_marginTop="?attr/qmui_topbar_height" + android:background="@color/qmui_config_color_white" + android:fitsSystemWindows="true"> @@ -314,4 +309,11 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_diy_update.xml b/app/src/main/res/layout/activity_diy_update.xml index d75d3f71..05d977f0 100644 --- a/app/src/main/res/layout/activity_diy_update.xml +++ b/app/src/main/res/layout/activity_diy_update.xml @@ -1,5 +1,5 @@ - - + + android:layout_marginTop="?attr/qmui_topbar_height" + android:background="@color/qmui_config_color_white" + android:fitsSystemWindows="true"> @@ -329,4 +324,11 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_file.xml b/app/src/main/res/layout/activity_file.xml index 649672e0..c317da5b 100644 --- a/app/src/main/res/layout/activity_file.xml +++ b/app/src/main/res/layout/activity_file.xml @@ -1,5 +1,5 @@ - - - -