Browse Source

更新界面

tags/old_version_1
fyf 1 year ago
parent
commit
17219e2878
45 changed files with 1369 additions and 92 deletions
  1. +2
    -1
      app/build.gradle
  2. +31
    -9
      app/src/main/AndroidManifest.xml
  3. +16
    -0
      app/src/main/java/com/bonait/bnframework/common/constant/MessageName.java
  4. +87
    -0
      app/src/main/java/com/bonait/bnframework/common/message/MessageLooper.java
  5. +170
    -0
      app/src/main/java/com/bonait/bnframework/common/message/MessageManager.java
  6. +30
    -0
      app/src/main/java/com/bonait/bnframework/common/message/testmode.java
  7. +12
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigation2Activity.java
  8. +6
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationActivity.java
  9. +5
    -5
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
  10. +53
    -10
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home2Fragment.java
  11. +48
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java
  12. +43
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java
  13. +43
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SzActivity.java
  14. +44
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/WhActivity.java
  15. +20
    -2
      app/src/main/java/com/bonait/bnframework/modules/mine/fragment/MyFragment.java
  16. +96
    -0
      app/src/main/java/com/bonait/bnframework/modules/mine/fragment/from/NoticeActivity.java
  17. +2
    -1
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java
  18. +27
    -0
      app/src/main/res/drawable/cp_bj.xml
  19. +27
    -0
      app/src/main/res/drawable/diy_bj.xml
  20. +27
    -0
      app/src/main/res/drawable/hr_bj.xml
  21. +27
    -0
      app/src/main/res/drawable/sz_bj.xml
  22. +27
    -0
      app/src/main/res/drawable/wh_bj.xml
  23. +28
    -0
      app/src/main/res/layout/activity_cp.xml
  24. +28
    -0
      app/src/main/res/layout/activity_diy.xml
  25. +100
    -0
      app/src/main/res/layout/activity_notice.xml
  26. +28
    -0
      app/src/main/res/layout/activity_sz.xml
  27. +31
    -0
      app/src/main/res/layout/activity_welcome.xml
  28. +27
    -0
      app/src/main/res/layout/activity_wh.xml
  29. +42
    -32
      app/src/main/res/layout/fragment_home1.xml
  30. +203
    -28
      app/src/main/res/layout/fragment_home2.xml
  31. BIN
     
  32. BIN
     
  33. BIN
     
  34. BIN
     
  35. BIN
     
  36. BIN
     
  37. BIN
     
  38. BIN
     
  39. BIN
     
  40. +7
    -0
      app/src/main/res/values-night/themes.xml
  41. +6
    -0
      app/src/main/res/values/attrs.xml
  42. +5
    -1
      app/src/main/res/values/colors.xml
  43. +5
    -0
      app/src/main/res/values/strings.xml
  44. +9
    -3
      app/src/main/res/values/styles.xml
  45. +7
    -0
      app/src/main/res/values/themes.xml

+ 2
- 1
app/build.gradle View File

@@ -63,7 +63,7 @@ dependencies {
implementation "com.jakewharton:butterknife:$rootProject.butterknife"
annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterknife"

// SuperTextView
// SuperTextView 属性控件
implementation 'com.github.lygttpod:SuperTextView:2.1.8'

// android-saripaar 基于规则的Android表单验证库
@@ -87,4 +87,5 @@ dependencies {
// Optional, if you use support library fragments:
debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.3'
implementation files('libs/commons-codec-1.6.jar')

}

+ 31
- 9
app/src/main/AndroidManifest.xml View File

@@ -2,7 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.bonait.bnframework">

<!-- 网络权限 -->
<uses-permission android:name="android.permission.INTERNET" /> <!-- 网络连接 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 获取网络连接状态 -->
@@ -17,14 +16,31 @@

<application
android:name=".MainApplication"
android:networkSecurityConfig="@xml/network_security_config"
android:allowBackup="true"
android:icon="@mipmap/ico"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ico"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
tools:ignore="GoogleAppIndexingWarning"
tools:node="merge">
<activity
android:name=".modules.home.fragment.from.SzActivity"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.WhActivity"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.CpActivity"
android:exported="false" />
<activity
android:name=".modules.home.fragment.from.DiyActivity"
android:exported="false" />
<activity
android:name=".modules.mine.fragment.from.NoticeActivity"
android:exported="false" />

<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
@@ -40,22 +56,28 @@
android:theme="@style/AppTheme.Launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".modules.welcome.activity.LoginActivity">
<!-- <intent-filter>-->
<!-- <action android:name="com.bonait.bnframework.modules.welcome.activity.LoginActivity.ACTION_START" />-->

<!-- <category android:name="android.intent.category.DEFAULT" />-->
<!-- </intent-filter>-->
<!-- <intent-filter> -->
<!-- <action android:name="com.bonait.bnframework.modules.welcome.activity.LoginActivity.ACTION_START" /> -->


<!-- <category android:name="android.intent.category.DEFAULT" /> -->
<!-- </intent-filter> -->
</activity>
<activity android:name=".test.TestActivity">
<!--<intent-filter>

<!--
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>-->
</intent-filter>
-->
</activity>
<activity android:name=".modules.home.activity.BottomNavigation2Activity" />
<activity android:name=".modules.home.activity.BottomNavigationActivity" />


+ 16
- 0
app/src/main/java/com/bonait/bnframework/common/constant/MessageName.java View File

@@ -0,0 +1,16 @@
package com.bonait.bnframework.common.constant;

/**
* 消息名称管理枚举
*/
public interface MessageName {
String Common="Common";//通用消息
String PF_From_Close="PF_From_Close";//配方界面关闭通知
String Click="Click";
String GetOrderInformation="GetOrderInformation";//获取订单信息
String UpdateOrderStatus="UpdateOrderStatus";//更新订单状态
String ShowOrderMakeForm="ShowOrderMakeForm";//显示弹窗
String CloseOrderMakeForm="CloseOrderMakeForm";//关闭弹窗
String UpdateVersion="UpdateVersion";//更新版本
String SelectZY="SelectZY";//选中主页
}

+ 87
- 0
app/src/main/java/com/bonait/bnframework/common/message/MessageLooper.java View File

@@ -0,0 +1,87 @@
package com.bonait.bnframework.common.message;

import android.text.TextUtils;

import java.util.Iterator;
import java.util.Map;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;

/**
* 消息Demo
*/
public class MessageLooper {
private volatile static MessageLooper mInstance;
/**
* 由于会有频繁的增加、删除、采用现成ConCurrentHasMap() vector也是安全的额
*/
private Map<String, Vector<OnMessageListener>> mMessageReceiver = new ConcurrentHashMap<>();

public interface OnMessageListener {
void onMessage(Object msg);
}
public synchronized static MessageLooper getMessageLooper() {
if (mInstance == null) {
synchronized (MessageLooper.class) {
if (mInstance == null) {
mInstance = new MessageLooper();
}
}
}
return mInstance;
}
private MessageLooper() {
super();
}
/**
* 注册事件
* @param cmd
* @param listener
*/
public void registerReceiver(String cmd, OnMessageListener listener) {
if (!TextUtils.isEmpty(cmd) && listener != null) {
Vector<OnMessageListener> listeners = mMessageReceiver.get(cmd);
if (listeners == null) {
listeners = new Vector<>();
}
listeners.add(listener);
this.mMessageReceiver.put(cmd, listeners);
}
}
/**
* 注销事件
* @param listener
*/
public void unRegisterReciver(OnMessageListener listener) {
if (listener != null) {
Iterator iterator = this.mMessageReceiver.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<String, Vector<OnMessageListener>> entry = (Map.Entry) iterator.next();
if (entry != null) {
String key = entry.getKey();
Vector<OnMessageListener> listeners = this.mMessageReceiver.get(key);
if (listeners != null && listeners.remove(listener)) {
return;
}
}
}
}
}
/**
* 发送事件
* @param cmd
* @param message
*/
public void sendMessage(String cmd, Object message) {
if (!TextUtils.isEmpty(cmd)) {
Vector<OnMessageListener> listeners = this.mMessageReceiver.get(cmd);
if (listeners != null) {
for (int i = 0; i < listeners.size(); i++) {
OnMessageListener listener = listeners.get(i);
listener.onMessage(message);
}
}
}
}

}

+ 170
- 0
app/src/main/java/com/bonait/bnframework/common/message/MessageManager.java View File

@@ -0,0 +1,170 @@
package com.bonait.bnframework.common.message;

import android.app.Activity;
import android.app.Fragment;

import java.util.ArrayList;
import java.util.List;

/**
* 创建人:奉友福
* 描述:消息中心
*/
public class MessageManager {

private volatile static MessageManager mInstance;
private static MessageLooper messageLooper = MessageLooper.getMessageLooper();
private List<ListenerContainer> containerList = new ArrayList<>();

public synchronized static MessageManager getInstance() {
if (mInstance == null) {
synchronized (MessageManager.class) {
if (mInstance == null) {
mInstance = new MessageManager();
}
}
}
return mInstance;
}

/**
* 注册事件
*
* @param activity
* @param cmd 事件唯一标志
* @param listener 事件回调
*/
public void registerMessageReceiver(Activity activity, String cmd, MessageLooper.OnMessageListener listener) {
if (messageLooper != null) {
messageLooper.registerReceiver(cmd, listener);
}
ListenerContainer container = getListenerContainer(activity);
if (container == null) {
container = new ListenerContainer(activity);
containerList.add(container);
}
container.addListener(listener);
}

/**
* 注册事件
*
* @param fragment
* @param cmd
* @param listener
*/
public void registerMessageReceiver(Fragment fragment, String cmd, MessageLooper.OnMessageListener listener) {
if (messageLooper != null) {
messageLooper.registerReceiver(cmd, listener);
}
ListenerContainer container = getListenerContainer(fragment);
if (container == null) {
container = new ListenerContainer(fragment);
containerList.add(container);
}
container
.addListener(listener);
}

/**
* 取消事件
*
* @param activity
*/
public void unRegisterMessageReceiver(Activity activity) {
ListenerContainer container = getListenerContainer(activity);
if (container != null) {
container.clear();
}
}
public void unRegisterMessageReceiver(Fragment fragment) {
ListenerContainer container = getListenerContainer(fragment);
if (container != null) {
container.clear();
}
}

/**
* 发送事件
*
* @param cmd
* @param message
*/
public void sendMessage(String cmd, Object message) {
messageLooper.sendMessage(cmd, message);
}
public ListenerContainer getListenerContainer(Activity activity) {
if (activity != null && containerList != null) {
for (ListenerContainer container : containerList) {
if (container == null) {
continue;
}
if (container.activity != null && container.activity == activity) {
return container;
}
}
}
return null;
}
public ListenerContainer getListenerContainer(Fragment fragment) {
if (fragment != null && containerList != null) {
for (ListenerContainer container : containerList) {
if (container == null) {
continue;
}
if (container.fragment != null && container.fragment == fragment) {
return container;
}
}
}
return null;
}

/**
* 将同一个Activity或Fragment的OnMessageListener放到一起,便于统一取消事件
*/
private static class ListenerContainer {
Activity activity;
Fragment fragment;
ArrayList<MessageLooper.OnMessageListener> listeners;

ListenerContainer(Activity activity) {
this.activity = activity;
}

ListenerContainer(Fragment fragment) {
this.fragment = fragment;
}

/**
* 添加监听器
*
* @param listener
*/
public void addListener(MessageLooper.OnMessageListener listener) {
if (listener != null) {
if (listeners == null) {
listeners = new ArrayList<>();
}
listeners.add(listener);
}
}

/**
* 清空监听器
*/
public void clear() {
activity = null;
fragment = null;
if (listeners != null) {
for (MessageLooper.OnMessageListener listener : listeners) {
if (listener != null) {
messageLooper.unRegisterReciver(listener);
}
}
listeners.clear();
listeners = null;
}
}
}
}

+ 30
- 0
app/src/main/java/com/bonait/bnframework/common/message/testmode.java View File

@@ -0,0 +1,30 @@
package com.bonait.bnframework.common.message;

/**
* 消息中心测试Demo
*/
public class testmode {

public void Senddata(String str)
{
//MessageManager.getInstance().sendMessage(MessageName.PullTheDishes.name(),str);
}

public void onCreate()
{
// MessageManager.getInstance().registerMessageReceiver((Activity) null, MessageName.PullTheDishes.name(), new MessageLooper.OnMessageListener() {
// @Override
// public void onMessage(Object msg) {
// if (msg != null) {
//
// }
// }
// });

}
public void onDestroy()
{
// MessageName name= MessageName.valueOf("111");
// MessageManager.getInstance().unRegisterMessageReceiver((Activity) null);
}
}

+ 12
- 0
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigation2Activity.java View File

@@ -8,6 +8,9 @@ import android.view.KeyEvent;
import android.view.MenuItem;

import com.bonait.bnframework.R;
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.manager.ActivityLifecycleManager;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.utils.ToastUtils;
@@ -54,6 +57,15 @@ public class BottomNavigation2Activity extends BaseActivity {
fragmentAdapter.addFragment(new Home2Fragment());
fragmentAdapter.addFragment(new MyFragment());
viewPager.setAdapter(fragmentAdapter);

MessageManager.getInstance().registerMessageReceiver(this, MessageName.SelectZY, new MessageLooper.OnMessageListener() {
@Override
public void onMessage(Object msg) {
if (msg != null) {
viewPager.setCurrentItem(0);
}
}
});
}

//-------------------------配置viewPager与fragment关联----------------------------//


+ 6
- 0
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationActivity.java View File

@@ -1,6 +1,7 @@
package com.bonait.bnframework.modules.home.activity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
@@ -12,6 +13,9 @@ import android.view.View;
import android.view.ViewGroup;

import com.bonait.bnframework.R;
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.manager.ActivityLifecycleManager;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.utils.ToastUtils;
@@ -197,6 +201,8 @@ public class BottomNavigationActivity extends BaseActivity {
mViewPager.setOffscreenPageLimit(3);
mViewPager.addOnPageChangeListener(pageChangeListener);
mTabSegment.setupWithViewPager(mViewPager,false);


}

/**


+ 5
- 5
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java View File

@@ -45,14 +45,14 @@ public class Home1Fragment extends BaseFragment {
initTopBar();
}

@OnClick(R.id.button)
public void onViewClicked() {
ToastUtils.info("主页");
}
// @OnClick(R.id.button)
// public void onViewClicked() {
// ToastUtils.info("主页");
// }

private void initTopBar() {
mTopBar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.app_color_theme_4));
mTopBar.setTitle("快捷点菜界面");
mTopBar.setTitle("菜谱烹饪");
}

/*private void initTopBar() {


+ 53
- 10
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home2Fragment.java View File

@@ -2,6 +2,8 @@ package com.bonait.bnframework.modules.home.fragment;


import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -10,8 +12,19 @@ import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.bonait.bnframework.modules.home.fragment.from.CpActivity;
import com.bonait.bnframework.modules.home.fragment.from.DiyActivity;
import com.bonait.bnframework.modules.home.fragment.from.SzActivity;
import com.bonait.bnframework.modules.home.fragment.from.WhActivity;
import com.bonait.bnframework.modules.welcome.activity.LoginActivity;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.layout.QMUIRelativeLayout;
import com.qmuiteam.qmui.widget.QMUICollapsingTopBarLayout;
import com.qmuiteam.qmui.widget.QMUITopBar;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;

import butterknife.BindView;
@@ -23,10 +36,11 @@ import butterknife.OnClick;
*/
public class Home2Fragment extends BaseFragment {


@BindView(R.id.collapsing_topbar_layout)
QMUICollapsingTopBarLayout mCollapsingTopBarLayout;
@BindView(R.id.topbar)
QMUITopBarLayout mTopBar;
QMUITopBar mTopBar;
private Context context;
public Home2Fragment() {
}

@@ -34,8 +48,6 @@ public class Home2Fragment extends BaseFragment {
protected View onCreateView() {
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_home2, null);
ButterKnife.bind(this, root);


return root;
}

@@ -43,17 +55,48 @@ public class Home2Fragment extends BaseFragment {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Logger.d("第二页创建");
context = getContext();
initTopBar();
}

private void initTopBar() {
mTopBar.setTitle("小炒功能菜单");
mCollapsingTopBarLayout.setTitle("功能菜单");
}

@OnClick({R.id.kshr,R.id.diy,R.id.cp,R.id.wh,R.id.sz})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.kshr://开始制作商品
MessageManager.getInstance().sendMessage(MessageName.SelectZY,"Open");
ToastUtils.info("打开烹饪界面");
break;
case R.id.diy://diy模式
skipToActivity(DiyActivity.class);
ToastUtils.info("打开diy界面");
break;
case R.id.cp://菜谱
skipToActivity(CpActivity.class);
ToastUtils.info("打开菜谱界面");
break;
case R.id.wh://维护界面
skipToActivity(WhActivity.class);
ToastUtils.info("打开维护界面界面");
break;
case R.id.sz://系统设置界面
skipToActivity(SzActivity.class);
ToastUtils.info("打开系统设置界面");
break;
}
}

@OnClick(R.id.button)
public void onViewClicked() {
ToastUtils.info("功能");
/**
* 跳转界面
*/
private void skipToActivity(Class da) {
// 跳转到登录页面
Intent intent = new Intent(context, da);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}

@Override


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

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

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.widget.QMUITopBar;

import butterknife.BindView;
import butterknife.ButterKnife;

public class CpActivity extends BaseActivity {

@BindView(R.id.topbar)
QMUITopBar mTopBar;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cp);
//属性绑定
ButterKnife.bind(this);
initTopBar();
}

private void initTopBar() {
mTopBar.setTitle("菜谱管理");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}

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

@Override
protected boolean canDragBack() {
return false;
}
}

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

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

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.qmuiteam.qmui.widget.QMUITopBar;

import butterknife.BindView;
import butterknife.ButterKnife;

public class DiyActivity extends BaseActivity {
@BindView(R.id.topbar)
QMUITopBar mTopBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_diy);//属性绑定
ButterKnife.bind(this);
initTopBar();
}
private void initTopBar() {
mTopBar.setTitle("DIY模式");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}

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

@Override
protected boolean canDragBack() {
return false;
}
}

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

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

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.qmuiteam.qmui.widget.QMUITopBar;

import butterknife.BindView;
import butterknife.ButterKnife;

public class SzActivity extends BaseActivity {
@BindView(R.id.topbar)
QMUITopBar mTopBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sz);//属性绑定
ButterKnife.bind(this);
initTopBar();
}
private void initTopBar() {
mTopBar.setTitle("系统设置");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}

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

@Override
protected boolean canDragBack() {
return false;
}
}

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

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

import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.qmuiteam.qmui.widget.QMUITopBar;

import butterknife.BindView;
import butterknife.ButterKnife;

public class WhActivity extends BaseActivity {
@BindView(R.id.topbar)
QMUITopBar mTopBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_wh);//属性绑定
ButterKnife.bind(this);
initTopBar();
}
private void initTopBar() {
mTopBar.setTitle("系统维护");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}

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

@Override
protected boolean canDragBack() {
return false;
}
}

+ 20
- 2
app/src/main/java/com/bonait/bnframework/modules/mine/fragment/MyFragment.java View File

@@ -22,8 +22,8 @@ import com.bonait.bnframework.common.constant.Constants;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.UpdateAppUtils;
import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.bonait.bnframework.modules.mine.fragment.from.NoticeActivity;
import com.bonait.bnframework.modules.welcome.activity.LoginActivity;
import com.bonait.bnframework.modules.welcome.activity.WelcomeActivity;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
@@ -50,6 +50,9 @@ public class MyFragment extends BaseFragment {
@BindView(R.id.stv_logout)
SuperTextView stvLogout;

@BindView(R.id.stv_announcement)
SuperTextView stvAnnouncement;

/*
private static final String BUNDLE_TITLE = "key_title";
public static MyFragment newInstance(String title) {
@@ -114,8 +117,23 @@ public class MyFragment extends BaseFragment {
});
}
});
}

stvAnnouncement.setOnSuperTextViewClickListener(new SuperTextView.OnSuperTextViewClickListener() {
@Override
public void onClickListener(SuperTextView superTextView) {
skipToNoticeActivity();
}
});
}
/**
* 跳转登录界面
*/
private void skipToNoticeActivity() {
// 跳转到登录页面
Intent intent = new Intent(context, NoticeActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
/**
* 跳转登录界面
*/


+ 96
- 0
app/src/main/java/com/bonait/bnframework/modules/mine/fragment/from/NoticeActivity.java View File

@@ -0,0 +1,96 @@
package com.bonait.bnframework.modules.mine.fragment.from;

import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.RelativeLayout;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.mobsandgeeks.saripaar.ValidationError;
import com.mobsandgeeks.saripaar.Validator;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.widget.QMUITopBar;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class NoticeActivity extends BaseActivity{

@BindView(R.id.topbar)
QMUITopBar mTopBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notice);
//属性绑定
ButterKnife.bind(this);
initTopBar();
}

@OnClick({R.id.button})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.button:
ToastUtils.info("我是信息通知栏");
break;
case R.id.clean_password:

break;
}
}

private void initTopBar() {
mTopBar.setTitle("信息通知栏");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
//左侧添加文字
// mTopBar.addLeftTextButton("返回",1).setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// Logger.d("点击返回");
// finish();
// }
// });
// //右侧添加图片
// mTopBar.addRightImageButton(R.drawable.icon_letter,2).setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// Logger.d("点击QQ");
// }
// });
// //右侧添加样式
// View root = LayoutInflater.from(this).inflate(R.layout.view_right, null);
// RelativeLayout.LayoutParams layoutParams = mTopBar.generateTopBarImageButtonLayoutParams();
// mTopBar.addRightView(root,3,layoutParams);
// root.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// Logger.d("点击分享");
// }
// });
}

@Override
public void onDestroy() {
super.onDestroy();
Logger.d("销毁界面");
}

@Override
protected boolean canDragBack() {
return false;
}
}

+ 2
- 1
app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java View File

@@ -6,6 +6,7 @@ import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;

import com.bonait.bnframework.R;
import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.bonait.bnframework.common.constant.Constants;
import com.bonait.bnframework.common.constant.SPConstants;
@@ -35,7 +36,7 @@ public class WelcomeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.activity_welcome);
setContentView(R.layout.activity_welcome);
initWelcome();
}



+ 27
- 0
app/src/main/res/drawable/cp_bj.xml View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#7FEF5362"
android:radius="-1dp">

<item android:state_pressed="true">
<shape>
<solid android:color="#FA4939" />
<corners android:radius="20dp" />
</shape>
</item>

<item android:state_enabled="false">
<shape>
<solid android:color="#cccccc" />
<corners android:radius="20dp" />
</shape>
</item>


<item>
<shape>
<solid android:color="#dd5347" />
<corners android:radius="20dp" />
</shape>
</item>
</ripple>

+ 27
- 0
app/src/main/res/drawable/diy_bj.xml View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#7FEF5362"
android:radius="-1dp">

<item android:state_pressed="true">
<shape>
<solid android:color="#0093FF" />
<corners android:radius="20dp" />
</shape>
</item>

<item android:state_enabled="false">
<shape>
<solid android:color="#cccccc" />
<corners android:radius="20dp" />
</shape>
</item>


<item>
<shape>
<solid android:color="#0389eb" />
<corners android:radius="20dp" />
</shape>
</item>
</ripple>

+ 27
- 0
app/src/main/res/drawable/hr_bj.xml View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#7FEF5362"
android:radius="-1dp">

<item android:state_pressed="true">
<shape>
<solid android:color="#E1255D" />
<corners android:radius="20dp" />
</shape>
</item>

<item android:state_enabled="false">
<shape>
<solid android:color="#cccccc" />
<corners android:radius="20dp" />
</shape>
</item>


<item>
<shape>
<solid android:color="#ee5f8a" />
<corners android:radius="20dp" />
</shape>
</item>
</ripple>

+ 27
- 0
app/src/main/res/drawable/sz_bj.xml View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#7FEF5362"
android:radius="-1dp">

<item android:state_pressed="true">
<shape>
<solid android:color="#06B2F3" />
<corners android:radius="20dp" />
</shape>
</item>

<item android:state_enabled="false">
<shape>
<solid android:color="#cccccc" />
<corners android:radius="20dp" />
</shape>
</item>


<item>
<shape>
<solid android:color="#2ea1cc" />
<corners android:radius="20dp" />
</shape>
</item>
</ripple>

+ 27
- 0
app/src/main/res/drawable/wh_bj.xml View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#7FEF5362"
android:radius="-1dp">

<item android:state_pressed="true">
<shape>
<solid android:color="#0626F3" />
<corners android:radius="20dp" />
</shape>
</item>

<item android:state_enabled="false">
<shape>
<solid android:color="#cccccc" />
<corners android:radius="20dp" />
</shape>
</item>


<item>
<shape>
<solid android:color="#3951eb" />
<corners android:radius="20dp" />
</shape>
</item>
</ripple>

+ 28
- 0
app/src/main/res/layout/activity_cp.xml View File

@@ -0,0 +1,28 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.CpActivity"
android:orientation="vertical"
android:background="@color/app_color_blue"
android:fitsSystemWindows="true">
<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
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>
</LinearLayout>

+ 28
- 0
app/src/main/res/layout/activity_diy.xml View File

@@ -0,0 +1,28 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.DiyActivity"
android:orientation="vertical"
android:background="@color/app_color_blue"
android:fitsSystemWindows="true">
<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
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>
</LinearLayout>

+ 100
- 0
app/src/main/res/layout/activity_notice.xml View File

@@ -0,0 +1,100 @@
<?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.mine.fragment.from.NoticeActivity"-->
<!-- android:background="@color/qmui_config_color_white"-->
<!-- android:fitsSystemWindows="true"-->
<!-- android:orientation="vertical">-->
<!-- <ScrollView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginTop="?attr/qmui_topbar_height"-->
<!-- android:fillViewport="true"-->
<!-- android:fitsSystemWindows="true">-->

<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center_horizontal"-->
<!-- android:orientation="vertical"-->
<!-- android:paddingBottom="25dp"-->
<!-- android:paddingTop="70dp">-->

<!-- <ImageView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:contentDescription="Logo"-->
<!-- android:src="@mipmap/ico"/>-->

<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="15dp"-->
<!-- android:textColor="?attr/qmui_config_color_gray_3"-->
<!-- android:textSize="16sp"/>-->

<!-- <com.qmuiteam.qmui.widget.grouplist.QMUIGroupListView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="35dp"/>-->

<!-- <Space-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="0dp"-->
<!-- android:layout_weight="1"/>-->

<!-- <TextView-->
<!-- android:id="@+id/copyright"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="25dp"-->
<!-- android:gravity="center_horizontal"-->
<!-- android:textColor="?attr/qmui_config_color_gray_7"/>-->
<!-- </LinearLayout>-->

<!-- </ScrollView>-->

<!-- <com.qmuiteam.qmui.widget.QMUITopBarLayout-->
<!-- android:id="@+id/topbar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:fitsSystemWindows="true"/>-->
<!--</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>-->


<LinearLayout 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.mine.fragment.from.NoticeActivity"
android:background="@color/app_color_blue"
android:fitsSystemWindows="true"
android:orientation="vertical">
<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
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.roundwidget.QMUIRoundButton
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:clickable="true"
android:gravity="center"
android:padding="10dp"
android:text="我是信息通知"
android:textColor="@color/qmui_s_link_color"
app:qmui_borderColor="@color/qmui_s_link_color"
app:qmui_borderWidth="1px"/>
</RelativeLayout>
</ScrollView>
</LinearLayout>

+ 28
- 0
app/src/main/res/layout/activity_sz.xml View File

@@ -0,0 +1,28 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.SzActivity"
android:orientation="vertical"
android:background="@color/app_color_blue"
android:fitsSystemWindows="true">
<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
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>
</LinearLayout>

+ 31
- 0
app/src/main/res/layout/activity_welcome.xml View File

@@ -6,4 +6,35 @@
android:layout_height="match_parent"
tools:context=".modules.welcome.activity.WelcomeActivity">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.QMUILoadingView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:color="@color/white"
android:visibility="visible"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="219dp"
tools:layout_editor_absoluteY="224dp"
android:layout_centerInParent="true"/>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="软件初始化,加载中请稍后...."
android:textColor="@color/white"
android:textSize="16dp"/>
</LinearLayout>

</RelativeLayout>

</android.support.constraint.ConstraintLayout>

+ 27
- 0
app/src/main/res/layout/activity_wh.xml View File

@@ -0,0 +1,27 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.WhActivity"
android:orientation="vertical"
android:background="@color/app_color_blue">
<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
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>
</LinearLayout>

+ 42
- 32
app/src/main/res/layout/fragment_home1.xml View File

@@ -1,39 +1,49 @@
<?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"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/app_color_theme_4"
android:fitsSystemWindows="true"
android:orientation="vertical">

<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/app_color_theme_4"
android:fitsSystemWindows="true"
android:orientation="vertical">

<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>

<ScrollView
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.roundwidget.QMUIRoundButton
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:clickable="true"
android:gravity="center"
android:padding="10dp"
android:text="fragment1"
android:textColor="@color/qmui_s_link_color"
app:qmui_borderColor="@color/qmui_s_link_color"
app:qmui_borderWidth="1px"/>

</RelativeLayout>
</ScrollView>
android:background="@color/qmui_config_color_white">

<RelativeLayout style="@style/button_wrapper_style">

<!-- <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton-->
<!-- android:id="@+id/button"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:clickable="true"-->
<!-- android:gravity="center"-->
<!-- android:padding="10dp"-->
<!-- android:text="fragment1"-->
<!-- android:textColor="@color/qmui_s_link_color"-->
<!-- app:qmui_borderColor="@color/qmui_s_link_color"-->
<!-- app:qmui_borderWidth="1px"/>-->

<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="这里请编写主页小炒制作界面!https://129.33.4.5.com这里请编写主页小炒制作界面这里请编写主页小炒制作界面">

</com.qmuiteam.qmui.widget.textview.QMUILinkTextView>


</RelativeLayout>
</ScrollView>

</LinearLayout>

+ 203
- 28
app/src/main/res/layout/fragment_home2.xml View File

@@ -1,39 +1,214 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout
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:layout_height="match_parent"
android:background="@color/qmui_config_color_white">

<ScrollView
<com.qmuiteam.qmui.widget.QMUIAppBarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/qmui_topbar_height"
android:background="@color/qmui_config_color_white"
android:layout_height="256dp"
android:fitsSystemWindows="true">

<RelativeLayout style="@style/button_wrapper_style">
<com.qmuiteam.qmui.widget.QMUICollapsingTopBarLayout
android:id="@+id/collapsing_topbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:qmui_collapsedTitleGravity="center"
app:qmui_contentScrim="?attr/qmui_config_color_blue"
app:qmui_expandedTitleGravity="center_horizontal|bottom"
app:qmui_expandedTitleMarginBottom="20dp"
app:qmui_statusBarScrim="?attr/qmui_config_color_blue"
android:minHeight="?attr/qmui_topbar_height">

<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:clickable="true"
android:gravity="center"
android:padding="10dp"
android:text="fragment2"
android:textColor="@color/qmui_s_link_color"
app:qmui_borderColor="@color/qmui_s_link_color"
app:qmui_borderWidth="1px"/>

</RelativeLayout>
</ScrollView>

<com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar"
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false"
android:scaleType="centerCrop"
android:contentDescription="@string/common_example"
android:src="@mipmap/gongnengbeijing"
app:qmui_layout_collapseMode="parallax"
app:qmui_layout_collapseParallaxMultiplier="0.7"/>

<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"
android:fitsSystemWindows="true"
app:qmui_layout_collapseMode="pin"
app:qmui_topbar_bg_color="@color/qmui_config_color_transparent"
app:qmui_topbar_need_separator="false"/>
</com.qmuiteam.qmui.widget.QMUICollapsingTopBarLayout>
</com.qmuiteam.qmui.widget.QMUIAppBarLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"/>
android:scrollbars="none"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"

app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:orientation="vertical">
<com.qmuiteam.qmui.layout.QMUIRelativeLayout
android:id="@+id/kshr"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:background="@drawable/hr_bj">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@mipmap/hr"
android:layout_centerVertical="true"
android:layout_marginLeft="40dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="150dp"
android:text="开始烹饪"
android:textColor="@color/white"
android:textSize="@dimen/card_view_in_height" />
</com.qmuiteam.qmui.layout.QMUIRelativeLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.qmuiteam.qmui.layout.QMUIRelativeLayout
android:id="@+id/diy"
android:layout_width="140dp"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:background="@drawable/diy_bj">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@mipmap/diy"
android:layout_centerInParent="true"
android:layout_marginLeft="20dp"/>
</com.qmuiteam.qmui.layout.QMUIRelativeLayout>

<com.qmuiteam.qmui.layout.QMUIRelativeLayout
android:id="@+id/cp"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:layout_marginLeft="@dimen/dp_10"
android:background="@drawable/cp_bj">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@mipmap/cp"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"/>
<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="120dp"
android:text="菜谱"
android:textColor="@color/white"
android:textSize="@dimen/card_view_in_height" />
</com.qmuiteam.qmui.layout.QMUIRelativeLayout>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.qmuiteam.qmui.layout.QMUIRelativeLayout
android:id="@+id/wh"
android:layout_width="180dp"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:background="@drawable/wh_bj">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@mipmap/wh"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="100dp"
android:text="维护"
android:textColor="@color/white"
android:textSize="@dimen/card_view_in_height" />
</com.qmuiteam.qmui.layout.QMUIRelativeLayout>


<com.qmuiteam.qmui.layout.QMUIRelativeLayout
android:id="@+id/sz"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:layout_marginLeft="@dimen/dp_10"
android:background="@drawable/sz_bj">
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@mipmap/sz"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="100dp"
android:text="设置"
android:textColor="@color/white"
android:textSize="@dimen/card_view_in_height" />
</com.qmuiteam.qmui.layout.QMUIRelativeLayout>

</LinearLayout>

</LinearLayout>



</android.support.design.widget.CoordinatorLayout>
<!--<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout 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">-->

<!-- <ScrollView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginTop="?attr/qmui_topbar_height"-->
<!-- android:background="@color/qmui_config_color_white"-->
<!-- android:fitsSystemWindows="true">-->

<!-- <RelativeLayout style="@style/button_wrapper_style">-->

<!-- <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton-->
<!-- android:id="@+id/button"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:clickable="true"-->
<!-- android:gravity="center"-->
<!-- android:padding="10dp"-->
<!-- android:text="fragment2"-->
<!-- android:textColor="@color/qmui_s_link_color"-->
<!-- app:qmui_borderColor="@color/qmui_s_link_color"-->
<!-- app:qmui_borderWidth="1px"/>-->

<!-- </RelativeLayout>-->
<!-- </ScrollView>-->

<!-- <com.qmuiteam.qmui.widget.QMUITopBarLayout-->
<!-- android:id="@+id/topbar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:fitsSystemWindows="true"/>-->

</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>
<!--</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>-->

BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


+ 7
- 0
app/src/main/res/values-night/themes.xml View File

@@ -0,0 +1,7 @@
<resources>

<style name="ThemeOverlay.Bpa_MinCook.FullscreenContainer" parent="">
<item name="fullscreenBackgroundColor">@color/light_blue_900</item>
<item name="fullscreenTextColor">@color/light_blue_A400</item>
</style>
</resources>

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

@@ -0,0 +1,6 @@
<resources>
<declare-styleable name="FullscreenAttrs">
<attr name="fullscreenBackgroundColor" format="color" />
<attr name="fullscreenTextColor" format="color" />
</declare-styleable>
</resources>

+ 5
- 1
app/src/main/res/values/colors.xml View File

@@ -94,7 +94,7 @@
<color name="lime_primary_dark">#AFB42B</color>
<color name="yellow_primary">#FFEB3B</color>
<color name="yellow_primary_dark">#FBC02D</color>
<color name="yellow_light3" >#CDCDB4</color>
<color name="yellow_light3">#CDCDB4</color>
<color name="amber_primary">#FFC107</color>
<color name="amber_primary_dark">#FFA000</color>
<color name="orange_primary">#ff9800</color>
@@ -107,4 +107,8 @@
<color name="grey_primary_dark">#616161</color>
<color name="blue_grey_primary">#607d8b</color>
<color name="blue_grey_primary_dark">#455A64</color>
<color name="light_blue_600">#FF039BE5</color>
<color name="light_blue_900">#FF01579B</color>
<color name="light_blue_A200">#FF40C4FF</color>
<color name="light_blue_A400">#FF00B0FF</color>
</resources>

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

@@ -8,4 +8,9 @@
<string name="title_dashboard">功能</string>
<string name="user_account">请输入用户名</string>
<string name="mine">我的</string>
<string name="dummy_button">Dummy Button</string>
<string name="dummy_content">DUMMY\nCONTENT</string>

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

</resources>

+ 9
- 3
app/src/main/res/values/styles.xml View File

@@ -28,8 +28,8 @@
<item name="app_content_bg_color">@color/qmui_config_color_white</item>

</style>
<style name="AppTheme.Launcher" parent="QMUI.Compat.NoActionBar" >
<style name="AppTheme.Launcher" parent="QMUI.Compat.NoActionBar">
<!-- 通过windowBackground可以设置背景色、背景图片、能解析出图片的XML文件等-->
<item name="android:windowBackground">@drawable/welcome</item> <!--设置启动背景图-->
<item name="windowNoTitle">true</item>
@@ -99,7 +99,8 @@
<style name="DialogTheme2" parent="QMUI.Dialog">
<item name="qmui_dialog_wrapper_style">@style/dialog_wrapper_style_63</item>
<item name="qmui_dialog_title_style">@style/DialogTheme2TitleStyle</item>
<item name="qmui_dialog_action_container_style">@style/DialogTheme2ActionContainerStyle</item>
<item name="qmui_dialog_action_container_style">@style/DialogTheme2ActionContainerStyle
</item>
<item name="qmui_dialog_action_style">@style/DialogTheme2ActionStyle</item>
<item name="qmui_dialog_message_content_style">@style/DialogTheme2MessageContentStyle</item>
<item name="qmui_dialog_menu_container_style">@style/DialogTheme2MenuContainerStyle</item>
@@ -177,4 +178,9 @@
<item name="qmui_dialog_menu_container_padding_top_when_title_exist">23dp</item>
<item name="qmui_dialog_menu_container_padding_bottom_when_action_exist">24dp</item>
</style>

<style name="Widget.AppTheme.ButtonBar.Fullscreen" parent="">
<item name="android:background">@color/black_overlay</item>
<item name="android:buttonBarStyle">?android:attr/buttonBarStyle</item>
</style>
</resources>

+ 7
- 0
app/src/main/res/values/themes.xml View File

@@ -0,0 +1,7 @@
<resources>

<style name="ThemeOverlay.Bpa_MinCook.FullscreenContainer" parent="">
<item name="fullscreenBackgroundColor">@color/light_blue_600</item>
<item name="fullscreenTextColor">@color/light_blue_A200</item>
</style>
</resources>

Loading…
Cancel
Save