Browse Source

创建系统设置的空页面

tags/old_version_1
fyf 1 year ago
parent
commit
53e8318f09
35 changed files with 813 additions and 25 deletions
  1. +21
    -0
      app/src/main/AndroidManifest.xml
  2. +89
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SzActivity.java
  3. +79
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java
  4. +54
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsFltlFragment.java
  5. +54
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsJrFragment.java
  6. +54
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsTlFragment.java
  7. +54
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemDeviceinFragment.java
  8. +54
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSeasoningsetFragment.java
  9. +54
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSystemsetFragment.java
  10. +53
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/systeminternetfragment.java
  11. +7
    -0
      app/src/main/res/drawable/icon_deviceinformation.xml
  12. +7
    -0
      app/src/main/res/drawable/icon_networkmanagement.xml
  13. +7
    -0
      app/src/main/res/drawable/icon_seasoningsettings.xml
  14. +7
    -0
      app/src/main/res/drawable/icon_systemsettings.xml
  15. +19
    -11
      app/src/main/res/layout/activity_sz.xml
  16. +20
    -11
      app/src/main/res/layout/activity_wh.xml
  17. +3
    -2
      app/src/main/res/layout/fragment_home1.xml
  18. +19
    -0
      app/src/main/res/layout/fragment_system_cs_fltl.xml
  19. +19
    -0
      app/src/main/res/layout/fragment_system_cs_jr.xml
  20. +19
    -0
      app/src/main/res/layout/fragment_system_cs_tl.xml
  21. +19
    -0
      app/src/main/res/layout/fragment_system_devicein.xml
  22. +19
    -0
      app/src/main/res/layout/fragment_system_internet.xml
  23. +19
    -0
      app/src/main/res/layout/fragment_system_seasoningset.xml
  24. +19
    -0
      app/src/main/res/layout/fragment_system_systemset.xml
  25. +15
    -0
      app/src/main/res/menu/maintenance.xml
  26. +23
    -0
      app/src/main/res/menu/system.xml
  27. BIN
     
  28. BIN
     
  29. BIN
     
  30. BIN
     
  31. BIN
     
  32. BIN
     
  33. BIN
     
  34. BIN
     
  35. +6
    -0
      app/src/main/res/values/strings.xml

+ 21
- 0
app/src/main/AndroidManifest.xml View File

@@ -28,6 +28,27 @@
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"
tools:node="merge">
<activity
android:name=".modules.home.fragment.from.fragment.SystemCsFltlFragment"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.fragment.SystemCsTlFragment"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.fragment.SystemCsJrFragment"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.fragment.SystemSeasoningsetFragment"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.fragment.SystemSystemsetFragment"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.fragment.SystemDeviceinFragment"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.fragment.systeminternetfragment"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.CpxzActivity"
android:exported="false" />


+ 89
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SzActivity.java View File

@@ -1,25 +1,52 @@
package com.bonait.bnframework.modules.home.fragment.from;

import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.message.MessageLooper;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.modules.home.adapter.FragmentAdapter;
import com.bonait.bnframework.modules.home.fragment.Home1Fragment;
import com.bonait.bnframework.modules.home.fragment.Home2Fragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemDeviceinFragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemSeasoningsetFragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemSystemsetFragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.systeminternetfragment;
import com.bonait.bnframework.modules.mine.fragment.MyFragment;
import com.qmuiteam.qmui.widget.QMUITopBar;
import com.qmuiteam.qmui.widget.QMUIViewPager;

import butterknife.BindView;
import butterknife.ButterKnife;

public class SzActivity extends BaseActivity {
@BindView(R.id.topbar)
QMUITopBar mTopBar;
QMUITopBar mTopBar;//top标题
@BindView(R.id.navigation)
BottomNavigationView bottomNavigationView;
@BindView(R.id.viewpager)
QMUIViewPager viewPager;
private MenuItem menuItem;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sz);//属性绑定
ButterKnife.bind(this);
initTopBar();

initFragment();
viewPager.addOnPageChangeListener(pageChangeListener);
// 设置viewPager缓存多少个fragment
viewPager.setOffscreenPageLimit(4);
bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
}
private void initTopBar() {
mTopBar.setTitle("系统设置");
@@ -31,6 +58,67 @@ public class SzActivity extends BaseActivity {
});
}

/**
* viewPager里添加fragment
*/
private void initFragment() {
FragmentAdapter fragmentAdapter = new FragmentAdapter(getSupportFragmentManager());
fragmentAdapter.addFragment(new systeminternetfragment());
fragmentAdapter.addFragment(new SystemDeviceinFragment());
fragmentAdapter.addFragment(new SystemSystemsetFragment());
fragmentAdapter.addFragment(new SystemSeasoningsetFragment());

viewPager.setAdapter(fragmentAdapter);
}
//-------------------------配置viewPager与fragment关联----------------------------//
/**
* 配置bottom底部菜单栏监听器,手指点击底部菜单监听
*/
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {

@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.bottom_navigation_1:
viewPager.setCurrentItem(0);
return true;
case R.id.bottom_navigation_2:
viewPager.setCurrentItem(1);
return true;
case R.id.bottom_navigation_3:
viewPager.setCurrentItem(2);
return true;
case R.id.bottom_navigation_4:
viewPager.setCurrentItem(3);
return true;
}
return false;
}
};


/**
* 配置ViewPager监听器,手指滑动监听
*/
private ViewPager.OnPageChangeListener pageChangeListener = new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
MenuItem menuItem = bottomNavigationView.getMenu().getItem(position);
}

@Override
public void onPageSelected(int position) {
menuItem = bottomNavigationView.getMenu().getItem(position);
menuItem.setChecked(true);
}

@Override
public void onPageScrollStateChanged(int state) {

}
};

@Override
public void onDestroy() {
super.onDestroy();


+ 79
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java View File

@@ -1,13 +1,25 @@
package com.bonait.bnframework.modules.home.fragment.from;

import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.modules.home.adapter.FragmentAdapter;
import com.bonait.bnframework.modules.home.fragment.Home1Fragment;
import com.bonait.bnframework.modules.home.fragment.Home2Fragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemCsFltlFragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemCsJrFragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.SystemCsTlFragment;
import com.bonait.bnframework.modules.mine.fragment.MyFragment;
import com.qmuiteam.qmui.widget.QMUITopBar;
import com.qmuiteam.qmui.widget.QMUIViewPager;

import butterknife.BindView;
import butterknife.ButterKnife;
@@ -15,12 +27,23 @@ import butterknife.ButterKnife;
public class WhActivity extends BaseActivity {
@BindView(R.id.topbar)
QMUITopBar mTopBar;
@BindView(R.id.navigation)
BottomNavigationView bottomNavigationView;
@BindView(R.id.viewpager)
QMUIViewPager viewPager;
private MenuItem menuItem;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_wh);//属性绑定
ButterKnife.bind(this);
initTopBar();

initFragment();
viewPager.addOnPageChangeListener(pageChangeListener);
// 设置viewPager缓存多少个fragment
viewPager.setOffscreenPageLimit(4);
bottomNavigationView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
}
private void initTopBar() {
mTopBar.setTitle("系统维护");
@@ -32,6 +55,62 @@ public class WhActivity extends BaseActivity {
});
}

/**
* viewPager里添加fragment
*/
private void initFragment() {
FragmentAdapter fragmentAdapter = new FragmentAdapter(getSupportFragmentManager());
fragmentAdapter.addFragment(new SystemCsJrFragment());
fragmentAdapter.addFragment(new SystemCsTlFragment());
fragmentAdapter.addFragment(new SystemCsFltlFragment());
viewPager.setAdapter(fragmentAdapter);
}
//-------------------------配置viewPager与fragment关联----------------------------//
/**
* 配置bottom底部菜单栏监听器,手指点击底部菜单监听
*/
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {

@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.bottom_navigation_1:
viewPager.setCurrentItem(0);
return true;
case R.id.bottom_navigation_2:
viewPager.setCurrentItem(1);
return true;
case R.id.bottom_navigation_3:
viewPager.setCurrentItem(2);
return true;
}
return false;
}
};


/**
* 配置ViewPager监听器,手指滑动监听
*/
private ViewPager.OnPageChangeListener pageChangeListener = new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
MenuItem menuItem = bottomNavigationView.getMenu().getItem(position);
}

@Override
public void onPageSelected(int position) {
menuItem = bottomNavigationView.getMenu().getItem(position);
menuItem.setChecked(true);
}

@Override
public void onPageScrollStateChanged(int state) {

}
};

@Override
public void onDestroy() {
super.onDestroy();


+ 54
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsFltlFragment.java View File

@@ -0,0 +1,54 @@
package com.bonait.bnframework.modules.home.fragment.from.fragment;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.orhanobut.logger.Logger;

import butterknife.ButterKnife;

public class SystemCsFltlFragment extends BaseFragment {


private Context context;
@Override
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_system_cs_fltl, null);
ButterKnife.bind(this, root);
return root;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("我的fragment创建");
context = getContext();
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("我的fragment销毁");
}

/**
* 当在activity设置viewPager + BottomNavigation + fragment时,
* 为防止viewPager左滑动切换界面,与fragment左滑返回上一界面冲突引起闪退问题,
* 必须加上此方法,禁止fragment左滑返回上一界面。
*
* 切记!切记!切记!否则会闪退!
*
* 当在fragment设置viewPager + BottomNavigation + fragment时,则不会出现这个问题。
*/
@Override
protected boolean canDragBack() {
return false;
}
}

+ 54
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsJrFragment.java View File

@@ -0,0 +1,54 @@
package com.bonait.bnframework.modules.home.fragment.from.fragment;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.orhanobut.logger.Logger;

import butterknife.ButterKnife;

public class SystemCsJrFragment extends BaseFragment {


private Context context;
@Override
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_system_cs_jr, null);
ButterKnife.bind(this, root);
return root;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("我的fragment创建");
context = getContext();
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("我的fragment销毁");
}

/**
* 当在activity设置viewPager + BottomNavigation + fragment时,
* 为防止viewPager左滑动切换界面,与fragment左滑返回上一界面冲突引起闪退问题,
* 必须加上此方法,禁止fragment左滑返回上一界面。
*
* 切记!切记!切记!否则会闪退!
*
* 当在fragment设置viewPager + BottomNavigation + fragment时,则不会出现这个问题。
*/
@Override
protected boolean canDragBack() {
return false;
}
}

+ 54
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemCsTlFragment.java View File

@@ -0,0 +1,54 @@
package com.bonait.bnframework.modules.home.fragment.from.fragment;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.orhanobut.logger.Logger;

import butterknife.ButterKnife;

public class SystemCsTlFragment extends BaseFragment {


private Context context;
@Override
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_system_cs_tl, null);
ButterKnife.bind(this, root);
return root;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("我的fragment创建");
context = getContext();
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("我的fragment销毁");
}

/**
* 当在activity设置viewPager + BottomNavigation + fragment时,
* 为防止viewPager左滑动切换界面,与fragment左滑返回上一界面冲突引起闪退问题,
* 必须加上此方法,禁止fragment左滑返回上一界面。
*
* 切记!切记!切记!否则会闪退!
*
* 当在fragment设置viewPager + BottomNavigation + fragment时,则不会出现这个问题。
*/
@Override
protected boolean canDragBack() {
return false;
}
}

+ 54
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemDeviceinFragment.java View File

@@ -0,0 +1,54 @@
package com.bonait.bnframework.modules.home.fragment.from.fragment;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.orhanobut.logger.Logger;

import butterknife.ButterKnife;

public class SystemDeviceinFragment extends BaseFragment {


private Context context;
@Override
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_system_devicein, null);
ButterKnife.bind(this, root);
return root;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("我的fragment创建");
context = getContext();
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("我的fragment销毁");
}

/**
* 当在activity设置viewPager + BottomNavigation + fragment时,
* 为防止viewPager左滑动切换界面,与fragment左滑返回上一界面冲突引起闪退问题,
* 必须加上此方法,禁止fragment左滑返回上一界面。
*
* 切记!切记!切记!否则会闪退!
*
* 当在fragment设置viewPager + BottomNavigation + fragment时,则不会出现这个问题。
*/
@Override
protected boolean canDragBack() {
return false;
}
}

+ 54
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSeasoningsetFragment.java View File

@@ -0,0 +1,54 @@
package com.bonait.bnframework.modules.home.fragment.from.fragment;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.orhanobut.logger.Logger;

import butterknife.ButterKnife;

public class SystemSeasoningsetFragment extends BaseFragment {


private Context context;
@Override
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_system_seasoningset, null);
ButterKnife.bind(this, root);
return root;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("我的fragment创建");
context = getContext();
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("我的fragment销毁");
}

/**
* 当在activity设置viewPager + BottomNavigation + fragment时,
* 为防止viewPager左滑动切换界面,与fragment左滑返回上一界面冲突引起闪退问题,
* 必须加上此方法,禁止fragment左滑返回上一界面。
*
* 切记!切记!切记!否则会闪退!
*
* 当在fragment设置viewPager + BottomNavigation + fragment时,则不会出现这个问题。
*/
@Override
protected boolean canDragBack() {
return false;
}
}

+ 54
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/SystemSystemsetFragment.java View File

@@ -0,0 +1,54 @@
package com.bonait.bnframework.modules.home.fragment.from.fragment;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.orhanobut.logger.Logger;

import butterknife.ButterKnife;

public class SystemSystemsetFragment extends BaseFragment {


private Context context;
@Override
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_system_systemset, null);
ButterKnife.bind(this, root);
return root;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("我的fragment创建");
context = getContext();
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("我的fragment销毁");
}

/**
* 当在activity设置viewPager + BottomNavigation + fragment时,
* 为防止viewPager左滑动切换界面,与fragment左滑返回上一界面冲突引起闪退问题,
* 必须加上此方法,禁止fragment左滑返回上一界面。
*
* 切记!切记!切记!否则会闪退!
*
* 当在fragment设置viewPager + BottomNavigation + fragment时,则不会出现这个问题。
*/
@Override
protected boolean canDragBack() {
return false;
}
}

+ 53
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/systeminternetfragment.java View File

@@ -0,0 +1,53 @@
package com.bonait.bnframework.modules.home.fragment.from.fragment;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.orhanobut.logger.Logger;

import butterknife.ButterKnife;

public class systeminternetfragment extends BaseFragment {

private Context context;
@Override
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_system_internet, null);
ButterKnife.bind(this, root);
return root;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("我的fragment创建");
context = getContext();
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("我的fragment销毁");
}

/**
* 当在activity设置viewPager + BottomNavigation + fragment时,
* 为防止viewPager左滑动切换界面,与fragment左滑返回上一界面冲突引起闪退问题,
* 必须加上此方法,禁止fragment左滑返回上一界面。
*
* 切记!切记!切记!否则会闪退!
*
* 当在fragment设置viewPager + BottomNavigation + fragment时,则不会出现这个问题。
*/
@Override
protected boolean canDragBack() {
return false;
}
}

+ 7
- 0
app/src/main/res/drawable/icon_deviceinformation.xml View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!--选择状态下的图片-->
<item android:drawable="@mipmap/sbxx_selected" android:state_checked="true"/>
<!--未选择状态下的图片-->
<item android:drawable="@mipmap/sbxx" android:state_checked="false"/>
</selector>

+ 7
- 0
app/src/main/res/drawable/icon_networkmanagement.xml View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!--选择状态下的图片-->
<item android:drawable="@mipmap/wl_selected" android:state_checked="true"/>
<!--未选择状态下的图片-->
<item android:drawable="@mipmap/wl" android:state_checked="false"/>
</selector>

+ 7
- 0
app/src/main/res/drawable/icon_seasoningsettings.xml View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!--选择状态下的图片-->
<item android:drawable="@mipmap/cssz_selected" android:state_checked="true"/>
<!--未选择状态下的图片-->
<item android:drawable="@mipmap/cssz" android:state_checked="false"/>
</selector>

+ 7
- 0
app/src/main/res/drawable/icon_systemsettings.xml View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!--选择状态下的图片-->
<item android:drawable="@mipmap/xtsz_selected" android:state_checked="true"/>
<!--未选择状态下的图片-->
<item android:drawable="@mipmap/xtsz" android:state_checked="false"/>
</selector>

+ 19
- 11
app/src/main/res/layout/activity_sz.xml View File

@@ -12,17 +12,25 @@
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/qmui_config_color_white">
<RelativeLayout style="@style/button_wrapper_style">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="这里请编写设置界面!">
</com.qmuiteam.qmui.widget.textview.QMUILinkTextView>
</RelativeLayout>
</ScrollView>
android:background="@color/qmui_config_color_white"
android:orientation="vertical">
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="@dimen/home_tab_height"
android:layout_gravity="bottom"
android:background="?attr/qmui_list_item_bg_with_border_bottom"
app:itemHorizontalTranslationEnabled="false"
app:labelVisibilityMode="labeled"
app:menu="@menu/system" />
<com.qmuiteam.qmui.widget.QMUIViewPager
android:id="@+id/viewpager"
android:background="?attr/app_content_bg_color"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"/>
</LinearLayout>
</LinearLayout>

+ 20
- 11
app/src/main/res/layout/activity_wh.xml View File

@@ -11,17 +11,26 @@
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/qmui_config_color_white">
<RelativeLayout style="@style/button_wrapper_style">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="这里请编写维护界面!">
</com.qmuiteam.qmui.widget.textview.QMUILinkTextView>
</RelativeLayout>
</ScrollView>
android:background="@color/qmui_config_color_white"
android:orientation="vertical">
<android.support.design.widget.BottomNavigationView
android:layout_marginTop="-25dp"
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_gravity="top"
android:background="?attr/qmui_list_item_bg_with_border_bottom"
app:itemHorizontalTranslationEnabled="false"
app:labelVisibilityMode="labeled"
app:menu="@menu/maintenance"/>
<com.qmuiteam.qmui.widget.QMUIViewPager
android:id="@+id/viewpager"
android:background="?attr/app_content_bg_color"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"/>
</LinearLayout>
</LinearLayout>

+ 3
- 2
app/src/main/res/layout/fragment_home1.xml View File

@@ -275,11 +275,12 @@ android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">

<ImageView
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/zhanting"/>
android:layout_centerInParent="true"
android:src="@mipmap/zhanting" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"


+ 19
- 0
app/src/main/res/layout/fragment_system_cs_fltl.xml View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.fragment.SystemCsFltlFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/main_background">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这里是参数设置的辅料投料"/>

</LinearLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 19
- 0
app/src/main/res/layout/fragment_system_cs_jr.xml View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.fragment.SystemCsJrFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/main_background">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这里是参数设置的主控与加热"/>

</LinearLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 19
- 0
app/src/main/res/layout/fragment_system_cs_tl.xml View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.fragment.SystemCsTlFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/main_background">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这里是参数设置的主投料与电机"/>

</LinearLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 19
- 0
app/src/main/res/layout/fragment_system_devicein.xml View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.fragment.SystemDeviceinFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/main_background">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这里是系统设置的设备信息"/>

</LinearLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 19
- 0
app/src/main/res/layout/fragment_system_internet.xml View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.fragment.systeminternetfragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/main_background">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这里是系统设置的网络配置"/>

</LinearLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 19
- 0
app/src/main/res/layout/fragment_system_seasoningset.xml View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.fragment.SystemSeasoningsetFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/main_background">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这里是系统设置的液态料配置"/>

</LinearLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 19
- 0
app/src/main/res/layout/fragment_system_systemset.xml View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.fragment.SystemSystemsetFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/main_background">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="这里是系统设置的系统配置"/>

</LinearLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 15
- 0
app/src/main/res/menu/maintenance.xml View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/bottom_navigation_1"
android:title="主机#加热" />

<item
android:id="@+id/bottom_navigation_2"
android:title="主投料#电机" />

<item
android:id="@+id/bottom_navigation_3"
android:title="辅料投料" />
</menu>

+ 23
- 0
app/src/main/res/menu/system.xml View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/bottom_navigation_1"
android:icon="@drawable/icon_networkmanagement"
android:title="@string/NetworkManagement" />

<item
android:id="@+id/bottom_navigation_2"
android:icon="@drawable/icon_deviceinformation"
android:title="@string/DeviceInformation" />

<item
android:id="@+id/bottom_navigation_3"
android:icon="@drawable/icon_systemsettings"
android:title="@string/SystemSettings" />

<item
android:id="@+id/bottom_navigation_4"
android:icon="@drawable/icon_seasoningsettings"
android:title="@string/SeasoningSettings" />
</menu>

BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


+ 6
- 0
app/src/main/res/values/strings.xml View File

@@ -13,4 +13,10 @@

<string name="common_example">示例图片</string>

<!-- TODO: 系统设置 -->
<string name="NetworkManagement">网络管理</string>
<string name="DeviceInformation">设备信息</string>
<string name="SystemSettings">系统设置</string>
<string name="SeasoningSettings">调料设置</string>

</resources>

Loading…
Cancel
Save