Browse Source

大炒调整

一拖四炒菜机
pry 1 year ago
parent
commit
7922a63a5e
29 changed files with 1265 additions and 60 deletions
  1. +6
    -0
      .idea/encodings.xml
  2. +8
    -0
      .idea/misc.xml
  3. +10
    -4
      app/src/main/AndroidManifest.xml
  4. +169
    -0
      app/src/main/java/com/bonait/bnframework/MainActivity.java
  5. +1
    -0
      app/src/main/java/com/bonait/bnframework/common/image/MyBitmapUtils.java
  6. +1
    -0
      app/src/main/java/com/bonait/bnframework/common/utils/AppUtils.java
  7. +70
    -0
      app/src/main/java/com/bonait/bnframework/dialog/DialogManager.java
  8. +22
    -0
      app/src/main/java/com/bonait/bnframework/dialog/DialogView.java
  9. +22
    -0
      app/src/main/java/com/bonait/bnframework/material_view.java
  10. +4
    -43
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java
  11. +143
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/RobotMain.java
  12. +2
    -9
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/LoginActivity.java
  13. +0
    -3
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java
  14. +14
    -0
      app/src/main/java/com/bonait/bnframework/par_set.java
  15. +27
    -0
      app/src/main/res/drawable/border_background.xml
  16. +30
    -0
      app/src/main/res/drawable/button4.xml
  17. +5
    -0
      app/src/main/res/drawable/dialog_bg.xml
  18. +5
    -0
      app/src/main/res/drawable/par_set_bg.xml
  19. +19
    -0
      app/src/main/res/drawable/spinner_br.xml
  20. +4
    -0
      app/src/main/res/drawable/spinner_text_br.xml
  21. +213
    -0
      app/src/main/res/layout/datatab/layout/activity_main.xml
  22. +61
    -0
      app/src/main/res/layout/datatab/layout/activity_material_view.xml
  23. +138
    -0
      app/src/main/res/layout/datatab/layout/activity_par_set.xml
  24. +13
    -0
      app/src/main/res/layout/datatab/layout/select_item.xml
  25. +227
    -0
      app/src/main/res/layout/fragment_robot_main.xml
  26. BIN
     
  27. +25
    -0
      app/src/main/res/values/spinner_array.xml
  28. +1
    -1
      app/src/main/res/values/styles.xml
  29. +25
    -0
      app/src/main/res/values/themes.xml

+ 6
- 0
.idea/encodings.xml View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/app/src/main/java/com/bonait/bnframework/modules/home/activity/MainActivity.java" charset="UTF-8" />
</component>
</project>

+ 8
- 0
.idea/misc.xml View File

@@ -1,4 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="corretto-11" project-jdk-type="JavaSDK" />
<component name="VisualizationToolProject">
<option name="state">
<ProjectState>
<option name="scale" value="0.0675542406311637" />
</ProjectState>
</option>
</component>
</project>

+ 10
- 4
app/src/main/AndroidManifest.xml View File

@@ -33,6 +33,15 @@
tools:ignore="GoogleAppIndexingWarning"
tools:node="merge"
tools:replace="android:icon">
<activity
android:name=".par_set"
android:exported="false" />
<activity
android:name=".material_view"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="false" />
<activity
android:name=".modules.home.fragment.mode.Silos_item_fragment"
android:exported="false"
@@ -43,7 +52,6 @@
<activity
android:name=".modules.mine.fragment.from.UserActivity"
android:exported="false" />

<activity
android:name=".modules.home.fragment.from.fragment.JiaoYan_sdkz_fragment"
android:exported="false"
@@ -56,7 +64,6 @@
android:name=".modules.home.fragment.from.WdszActivity"
android:exported="false"
tools:ignore="Instantiatable" />

<activity
android:name=".modules.home.fragment.from.DzcjyActivity"
android:exported="false"
@@ -174,8 +181,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".modules.welcome.activity.LoginActivity">
</activity>
<activity android:name=".modules.welcome.activity.LoginActivity" />

<receiver
android:name=".common.base.BootReceiver"


+ 169
- 0
app/src/main/java/com/bonait/bnframework/MainActivity.java View File

@@ -0,0 +1,169 @@
package com.bonait.bnframework;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

import com.bonait.bnframework.common.helper.I.IRun;
import com.bonait.bnframework.dialog.DialogManager;
import com.bonait.bnframework.dialog.DialogView;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MainActivity extends AppCompatActivity {

@BindView(R.id.main_btn1)
Button btn1;

@BindView(R.id.main_btn2)
Button btn2;

@BindView(R.id.main_btn3)
Button btn3;

@BindView(R.id.main_btn4)
Button btn4;

private DialogView mDialogVisual;
private DialogView mParSetVisual;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
// btn1=this.findViewById(R.id.main_btn1);
// btn2=this.findViewById(R.id.main_btn2);
// btn3=this.findViewById(R.id.main_btn3);
// btn4=this.findViewById(R.id.main_btn4);
OpenGoodSelectDialog();

mDialogVisual= DialogManager.getInstance().initView(this, R.layout.activity_material_view, Gravity.BOTTOM);
mParSetVisual = DialogManager.getInstance().initView(this,R.layout.activity_par_set,Gravity.BOTTOM);
// Button btn1=this.findViewById(R.id.main_btn1);
// btn1.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// //true:点击弹框外面可取消显示
// //false:点击弹框外面不可取消显示
// mDialogVisual.setCanceledOnTouchOutside(false);
// Button openSetView = mDialogVisual .findViewById(R.id.open);
// openSetView.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
//// DialogView d1= DialogManager.getInstance().initView(this, R.layout.activity_par_set, Gravity.BOTTOM);
// Log.i("info", "onClick: 打开设置弹框");
// }
// });
// DialogManager.getInstance().show(mDialogVisual,R.id.close_dialog); //显示自定义弹框
// }
// });

// Button btn2=this.findViewById(R.id.main_btn2);
// btn2.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Log.d("Debug", "选中商品二");
// }
// });
//
// Button btn3=this.findViewById(R.id.main_btn3);
// btn3.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Log.d("Debug", "选中商品三");
// }
// });
//
// Button btn4=this.findViewById(R.id.main_btn4);
// btn4.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Log.d("Debug", "选中商品四");
// }
// });
}


private void OpenGoodSelectDialog()
{
btn1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view){
mDialogVisual.setCanceledOnTouchOutside(false);
Button openSetView = mDialogVisual .findViewById(R.id.open);
openSetView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

//参数配置界面确认按钮
ButtonClickBinder(mParSetVisual, R.id.parset_ok_btn,()->{
Log.i("TAG", "onClick: 确认参数配置");
DialogManager.getInstance().hide(mParSetVisual);//关闭参数设置窗口
});

//参数配置界面取消按钮
ButtonClickBinder(mParSetVisual, R.id.parset_cancel_btn, ()->{
Log.i("TAG", "onClick: 退出参数配置");
DialogManager.getInstance().hide(mParSetVisual);//关闭参数设置窗口
});

DialogManager.getInstance().hide(mDialogVisual);//关闭商品选择窗口
DialogManager.getInstance().show(mParSetVisual,R.id.parset_close_dialog); //打开参数设置窗口

ParSetInit(R.id.location_selection,new String[] {"0", "1", "2", "3", "4","5","6"});
ParSetInit(R.id.accessories_selection_1,new String[] {"0", "1", "2", "3", "4","5","6","7","8"});
ParSetInit(R.id.accessories_selection_2,new String[] {"0", "1", "2", "3", "4","5","6","7","8"});
}
});
DialogManager.getInstance().show(mDialogVisual,R.id.close_dialog); //打开商品选择窗口
}
});
}

private void ParSetInit(int id,String[] args)
{
Spinner sp = mParSetVisual.findViewById(id);
ArrayAdapter<String> starAdapter = new ArrayAdapter<String>(getBaseContext(), R.layout.select_item, args);
sp.setAdapter(starAdapter);
sp.setSelection(0);
sp.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {

}

@Override
public void onNothingSelected(AdapterView<?> adapterView) {

}
});
}

/**
* 弹框按钮事件绑定
* @param dv 弹框页面
* @param id 按钮id
* @param action 执行委托
*/
private void ButtonClickBinder(DialogView dv,int id, IRun action){
if(dv!=null&& !dv.findViewById(id).hasOnClickListeners()){
dv.findViewById(id).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(action!=null) action.Run();
}
});
}
}


}

+ 1
- 0
app/src/main/java/com/bonait/bnframework/common/image/MyBitmapUtils.java View File

@@ -32,6 +32,7 @@ public class MyBitmapUtils {
//内存缓存
String name="";
//https://hbl-1305371387.cos.ap-chengdu.myqcloud.com/Franchisee/jccy@163.com/goods/133381212328681942.jpg
//133381212328681942.jpg
if(url.contains("http"))
{
name=url.substring(url.lastIndexOf('/')+1);


+ 1
- 0
app/src/main/java/com/bonait/bnframework/common/utils/AppUtils.java View File

@@ -4,6 +4,7 @@ import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.util.Log;

import org.apache.commons.codec.binary.Base64;



+ 70
- 0
app/src/main/java/com/bonait/bnframework/dialog/DialogManager.java View File

@@ -0,0 +1,70 @@
package com.bonait.bnframework.dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.View;

import com.bonait.bnframework.R;


public class DialogManager {
private static volatile DialogManager mInstance = null;

private DialogManager() {

}

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

public DialogView initView(Context context, int layout) {
return new DialogView(context,layout, R.style.CustomDialog, Gravity.CENTER);
}

public DialogView initView(Context context,int layout,int gravity) {
return new DialogView(context,layout, R.style.mydialog, gravity);
}

// 显示弹框
public void show(DialogView view) {
if (view != null) {
if (!view.isShowing()) {
view.show();
}
}
}

// 显示弹框
public void show(DialogView view,int closeId) {
if (view != null) {
if (!view.isShowing()) {
if(!view.findViewById(closeId).hasOnClickListeners()){
view.findViewById(closeId).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view1) {
hide(view);
}
});
}
view.show();
}
}
}

// 隐藏弹框
public void hide(DialogView view) {
if (view != null) {
if (view.isShowing()) {
view.dismiss();
}
}
}
}


+ 22
- 0
app/src/main/java/com/bonait/bnframework/dialog/DialogView.java View File

@@ -0,0 +1,22 @@
package com.bonait.bnframework.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;

import androidx.annotation.NonNull;

public class DialogView extends Dialog {

public DialogView(@NonNull Context context, int layout, int style, int gravity) {
super(context, style);
setContentView(layout);
Window mWindow = getWindow();
// WindowManager.LayoutParams params = mWindow.getAttributes();
// params.width = WindowManager.LayoutParams.MATCH_PARENT;
// params.height = WindowManager.LayoutParams.WRAP_CONTENT;
// params.gravity = gravity;
// mWindow.setAttributes(params);
}
}


+ 22
- 0
app/src/main/java/com/bonait/bnframework/material_view.java View File

@@ -0,0 +1,22 @@
package com.bonait.bnframework;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;

import com.bonait.bnframework.dialog.DialogManager;
import com.bonait.bnframework.dialog.DialogView;

public class material_view extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_material_view);
}
}

+ 4
- 43
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java View File

@@ -6,6 +6,7 @@ import androidx.viewpager.widget.ViewPager;
import android.os.Bundle;
import android.util.Log;

import com.bonait.bnframework.MainActivity;
import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.business.OrderServer;
@@ -31,6 +32,7 @@ import com.bonait.bnframework.modules.home.adapter.FragmentAdapter;
import com.bonait.bnframework.modules.home.fragment.DingDanfragment;
import com.bonait.bnframework.modules.home.fragment.GongnengFragment;
import com.bonait.bnframework.modules.home.fragment.MakeGoodFragment;
import com.bonait.bnframework.modules.home.fragment.RobotMain;
import com.bonait.bnframework.modules.home.fragment.SheZhifragment;
import com.bonait.bnframework.modules.mine.fragment.MyFragment;
import com.qmuiteam.qmui.widget.QMUIViewPager;
@@ -88,7 +90,8 @@ public class BottomNavigationMainActivity extends BaseActivity {
fragmentList = new ArrayList<>();
fragmentList.add(new GongnengFragment());
fragmentList.add(new DingDanfragment());
fragmentList.add(new MakeGoodFragment());
// fragmentList.add(new MakeGoodFragment());//再来一单
fragmentList.add(new RobotMain());
fragmentList.add(new SheZhifragment());
fragmentList.add(new MyFragment());
ConfigName.getInstance().fragmentAdapter = new FragmentAdapter(getSupportFragmentManager(), fragmentList);
@@ -147,48 +150,6 @@ public class BottomNavigationMainActivity extends BaseActivity {
MessageLog.ShowInfo("重新连接Modbus异常," + e.getMessage());
}
}).start();





// try {
//
// ThreadManager.Get().StartLong("PLC断线重连线程", true, new IThread() {
// @Override
// public void Run() throws InterruptedException {
// try {
// if (ConfigName.getInstance().PlcIsConnect) {
// //ping 不通
// boolean status = ModbusClient.ping2(ConfigName.getInstance().Address, 1, 1);
// if (!status) //ping 不通 连接
// {
// MessageLog.ShowInfo("PLC状态断开,尝试连接...");
// ConfigName.getInstance().PlcIsConnect = false;
// }
// } else {
// boolean status = ModbusClient.ping2(ConfigName.getInstance().Address, 1, 1);
// if (status) {
// MessageLog.ShowInfo("设备 " + ConfigName.getInstance().Address + " PLC通讯正常,准备连接!");
// ModbusClient.ConnectPLC();
// } else {
// MessageLog.ShowInfo("PLC状态断开,尝试连接...");
// ConfigName.getInstance().PlcIsConnect = false;
// }
// }
// Thread.sleep(10000);
// } catch (Exception e) {
// Log.i("PLC", "PLC重连接失败!" + e.getMessage());
// }
// }
//
// @Override
// public void RunComplete() throws InterruptedException {
// }
// });
// } catch (Exception e) {
// MessageLog.ShowInfo("重新连接Modbus异常," + e.getMessage());
// }
}




+ 143
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/RobotMain.java View File

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

import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.helper.I.IRun;
import com.bonait.bnframework.dialog.DialogManager;
import com.bonait.bnframework.dialog.DialogView;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;

import butterknife.BindView;
import butterknife.ButterKnife;

public class RobotMain extends BaseFragment {

// @BindView(R.id.robot_topbar)
// QMUITopBarLayout mTopBar;//顶部标题

@BindView(R.id.main_btn1)
Button btn1;

@BindView(R.id.main_btn2)
Button btn2;

@BindView(R.id.main_btn3)
Button btn3;

@BindView(R.id.main_btn4)
Button btn4;

private DialogView mDialogVisual;
private DialogView mParSetVisual;


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

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Init();
OpenGoodSelectDialog();
mDialogVisual= DialogManager.getInstance().initView(getContext(), R.layout.activity_material_view, Gravity.BOTTOM);
mParSetVisual = DialogManager.getInstance().initView(getContext(),R.layout.activity_par_set,Gravity.BOTTOM);
}

private void Init(){
ConfigData.getInstance().GetOrganize(getContext());
ConfigData.getInstance().GetGevGood(getContext(),null);
}

private void OpenGoodSelectDialog()
{
btn1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view){
mDialogVisual.setCanceledOnTouchOutside(false);
Button openSetView = mDialogVisual .findViewById(R.id.open);
openSetView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

//参数配置界面确认按钮
ButtonClickBinder(mParSetVisual, R.id.parset_ok_btn,()->{
Log.i("TAG", "onClick: 确认参数配置");
DialogManager.getInstance().hide(mParSetVisual);//关闭参数设置窗口
});

//参数配置界面取消按钮
ButtonClickBinder(mParSetVisual, R.id.parset_cancel_btn, ()->{
Log.i("TAG", "onClick: 退出参数配置");
DialogManager.getInstance().hide(mParSetVisual);//关闭参数设置窗口
});

DialogManager.getInstance().hide(mDialogVisual);//关闭商品选择窗口
DialogManager.getInstance().show(mParSetVisual,R.id.parset_close_dialog); //打开参数设置窗口

ParSetInit(R.id.location_selection,new String[] {"0", "1", "2", "3", "4","5","6"});
ParSetInit(R.id.accessories_selection_1,new String[] {"0", "1", "2", "3", "4","5","6","7","8"});
ParSetInit(R.id.accessories_selection_2,new String[] {"0", "1", "2", "3", "4","5","6","7","8"});
}
});
DialogManager.getInstance().show(mDialogVisual,R.id.close_dialog); //打开商品选择窗口
}
});
}

private void ParSetInit(int id,String[] args)
{
Spinner sp = mParSetVisual.findViewById(id);
ArrayAdapter<String> starAdapter = new ArrayAdapter<String>(getContext(), R.layout.select_item, args);
sp.setAdapter(starAdapter);
sp.setSelection(0);
sp.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {

}

@Override
public void onNothingSelected(AdapterView<?> adapterView) {

}
});
}

/**
* 弹框按钮事件绑定
* @param dv 弹框页面
* @param id 按钮id
* @param action 执行委托
*/
private void ButtonClickBinder(DialogView dv,int id, IRun action){
if(dv!=null&& !dv.findViewById(id).hasOnClickListeners()){
dv.findViewById(id).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(action!=null) action.Run();
}
});
}
}

}

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

@@ -22,29 +22,23 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.bonait.bnframework.MainActivity;
import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.bg.SnowView;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.Constants;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_USER;
import com.bonait.bnframework.common.db.res.UserLogEnum;
import com.bonait.bnframework.common.helper.ActiveMax;
import com.bonait.bnframework.common.helper.MessageLog;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.AnimationToolUtils;
import com.bonait.bnframework.common.utils.AppUtils;
import com.bonait.bnframework.common.utils.Des3Utils;
import com.bonait.bnframework.common.utils.KeyboardToolUtils;
import com.bonait.bnframework.common.utils.PreferenceUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.bonait.bnframework.modules.home.activity.BottomNavigationMainActivity;
import com.bonait.bnframework.modules.welcome.model.AppLoginPo;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.HttpParams;
import com.mobsandgeeks.saripaar.ValidationError;
import com.mobsandgeeks.saripaar.Validator;
import com.mobsandgeeks.saripaar.annotation.NotEmpty;
@@ -52,8 +46,6 @@ import com.mobsandgeeks.saripaar.annotation.Order;
import com.mobsandgeeks.saripaar.annotation.Password;
import com.qmuiteam.qmui.util.QMUIStatusBarHelper;

import org.litepal.LitePal;

import java.util.List;

import butterknife.BindView;
@@ -232,6 +224,7 @@ public class LoginActivity extends BaseActivity implements Validator.ValidationL
// 退出界面之前把状态栏还原为白色字体与图标
QMUIStatusBarHelper.setStatusBarDarkMode(LoginActivity.this);
Intent intent = new Intent(LoginActivity.this, BottomNavigationMainActivity.class);
// Intent intent = new Intent(LoginActivity.this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
// 结束所有Activity


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

@@ -6,8 +6,6 @@ import android.os.Bundle;
import android.os.Handler;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;

import android.view.KeyEvent;

@@ -21,7 +19,6 @@ import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.lzy.okgo.OkGo;

import okhttp3.OkHttpClient;
import pub.devrel.easypermissions.AfterPermissionGranted;
import pub.devrel.easypermissions.EasyPermissions;

public class WelcomeActivity extends BaseActivity {


+ 14
- 0
app/src/main/java/com/bonait/bnframework/par_set.java View File

@@ -0,0 +1,14 @@
package com.bonait.bnframework;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public class par_set extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_par_set);
}
}

+ 27
- 0
app/src/main/res/drawable/border_background.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="#ffffff"
android:radius="-1dp">

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

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


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

+ 30
- 0
app/src/main/res/drawable/button4.xml View File

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

<item android:state_pressed="true">
<shape>
<solid android:color="@color/orange_primary_dark" />
<corners android:radius="10dp" />
</shape>
</item>

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


<item>
<shape>
<solid android:color="@color/yellow_primary_dark" />
<corners android:radius="10dp" />
<stroke
android:width="1dp"
android:color="@color/amber_primary" />
</shape>
</item>
</ripple>

+ 5
- 0
app/src/main/res/drawable/dialog_bg.xml View File

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

+ 5
- 0
app/src/main/res/drawable/par_set_bg.xml View File

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

+ 19
- 0
app/src/main/res/drawable/spinner_br.xml View File

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

<item>
<shape >
<corners android:radius="5dp"/>
<stroke android:width="1dp" android:color="#c17833"/>
<padding android:bottom="5dp" android:left="5dp" android:right="5dp" android:top="5dp"/>
</shape>
</item>

<item >
<bitmap
android:gravity="end"
android:src="@mipmap/spinner_down_2">
</bitmap>
</item>

</layer-list>

+ 4
- 0
app/src/main/res/drawable/spinner_text_br.xml View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="1dp" android:color="@color/gray"/>
</shape>

+ 213
- 0
app/src/main/res/layout/datatab/layout/activity_main.xml View File

@@ -0,0 +1,213 @@
<?xml version="1.0" encoding="utf-8"?>
<GridLayout 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:background="#dddddd"
android:rowCount="2"
android:columnCount="2"
android:orientation="horizontal"
android:layout_height="match_parent"
tools:context=".MainActivity">

<GridLayout android:layout_margin="10dp"
android:columnCount="2"
android:background="@drawable/border_background"
android:elevation="10dp"
android:layout_rowWeight="1"
android:orientation="horizontal"
android:layout_columnWeight="1">
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:src="@mipmap/cg"
android:layout_margin="10dp"
android:layout_rowWeight="1"
android:layout_columnWeight="1"/>

<LinearLayout
android:layout_width="0dp"
android:layout_rowWeight="1"
android:layout_height="0dp"
android:layout_margin="10dp"
android:orientation="vertical"
android:layout_columnWeight="1">
<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="状态:"/>

<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="空闲中"/>

<Button
android:id="@+id/main_btn1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:textSize="20sp"
android:background="@drawable/button4"
android:text="选择菜品"/>
</LinearLayout>
</GridLayout>

<GridLayout android:layout_margin="10dp"
android:columnCount="2"
android:background="@drawable/border_background"
android:elevation="10dp"
android:layout_rowWeight="1"
android:orientation="horizontal"
android:layout_columnWeight="1">
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:src="@mipmap/cg"
android:layout_margin="10dp"
android:layout_rowWeight="1"
android:layout_columnWeight="1"/>

<LinearLayout
android:layout_width="0dp"
android:layout_rowWeight="1"
android:layout_height="0dp"
android:layout_margin="10dp"
android:orientation="vertical"
android:layout_columnWeight="1">
<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="状态:"/>

<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="空闲中"/>

<Button
android:id="@+id/main_btn2"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:textSize="20sp"
android:background="@drawable/button4"
android:text="选择菜品"/>
</LinearLayout>
</GridLayout>

<GridLayout android:layout_margin="10dp"
android:columnCount="2"
android:background="@drawable/border_background"
android:elevation="10dp"
android:layout_rowWeight="1"
android:orientation="horizontal"
android:layout_columnWeight="1">
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:src="@mipmap/cg"
android:layout_margin="10dp"
android:layout_rowWeight="1"
android:layout_columnWeight="1"/>

<LinearLayout
android:layout_width="0dp"
android:layout_rowWeight="1"
android:layout_height="0dp"
android:layout_margin="10dp"
android:orientation="vertical"
android:layout_columnWeight="1">
<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="状态:"/>

<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="空闲中"/>

<Button
android:id="@+id/main_btn3"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:textSize="20sp"
android:background="@drawable/button4"
android:text="选择菜品"/>
</LinearLayout>
</GridLayout>

<GridLayout android:layout_margin="10dp"
android:columnCount="2"
android:background="@drawable/border_background"
android:elevation="10dp"
android:layout_rowWeight="1"
android:orientation="horizontal"
android:layout_columnWeight="1">
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:src="@mipmap/cg"
android:layout_margin="10dp"
android:layout_rowWeight="1"
android:layout_columnWeight="1"/>

<LinearLayout
android:layout_width="0dp"
android:layout_rowWeight="1"
android:layout_height="0dp"
android:layout_margin="10dp"
android:orientation="vertical"
android:layout_columnWeight="1">
<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="状态:"/>

<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="空闲中"/>

<Button
android:id="@+id/main_btn4"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:textSize="20sp"
android:background="@drawable/button4"
android:text="选择菜品"/>
</LinearLayout>
</GridLayout>

</GridLayout>

+ 61
- 0
app/src/main/res/layout/datatab/layout/activity_material_view.xml View File

@@ -0,0 +1,61 @@
<?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:background="@drawable/par_set_bg"
android:layout_height="match_parent"
tools:context=".material_view">

<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_marginTop="5dp"
android:layout_height="400dp">

<RelativeLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:text="商品选择"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_centerVertical="true"
android:textSize="16sp"
android:textStyle="bold"
android:layout_height="25dp"/>

<Button
android:id="@+id/close_dialog"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:textColor="@color/red_primary_dark"
android:text="×"
android:textSize="40sp"
android:background="@android:color/transparent"
android:layout_margin="5dp"/>

</RelativeLayout>

<View
android:layout_width="match_parent"
android:background="#dddddd"
android:layout_height="1dp"/>

<LinearLayout
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="match_parent">
<Button android:layout_width="wrap_content"
android:text="打开"
android:id="@+id/open"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>

</LinearLayout>

+ 138
- 0
app/src/main/res/layout/datatab/layout/activity_par_set.xml View File

@@ -0,0 +1,138 @@
<?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="400dp"
android:orientation="vertical"
android:background="@drawable/par_set_bg"
android:layout_height="wrap_content"
tools:context=".par_set">

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/parset_close_dialog"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:textColor="@color/red_primary_dark"
android:text="×"
android:textSize="40sp"
android:background="@android:color/transparent"
android:layout_margin="5dp"/>
</RelativeLayout>

<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_margin="20dp"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text=" 选择库位:"/>

<Spinner
android:id="@+id/location_selection"
android:layout_width="match_parent"
android:spinnerMode="dropdown"
android:layout_marginLeft="10dp"
android:paddingLeft="-10dp"
android:paddingRight="-10dp"
android:dropDownWidth="match_parent"
android:background="@drawable/spinner_br"
android:dropDownVerticalOffset="0dp"
android:dropDownSelector="@color/red_primary_dark"
android:entries="@array/sp1"
android:layout_height="48dp"/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_margin="20dp"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="选择辅料1:"/>

<Spinner
android:id="@+id/accessories_selection_1"
android:layout_width="match_parent"
android:spinnerMode="dropdown"
android:layout_marginLeft="10dp"
android:paddingLeft="-10dp"
android:paddingRight="-10dp"
android:dropDownWidth="match_parent"
android:background="@drawable/spinner_br"
android:dropDownVerticalOffset="0dp"
android:dropDownSelector="@color/red_primary_dark"
android:entries="@array/accessories_sp"
android:layout_height="48dp"/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_margin="20dp"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="选择辅料2:"/>

<Spinner
android:id="@+id/accessories_selection_2"
android:layout_width="match_parent"
android:spinnerMode="dropdown"
android:layout_marginLeft="10dp"
android:paddingLeft="-10dp"
android:paddingRight="-10dp"
android:dropDownWidth="match_parent"
android:background="@drawable/spinner_br"
android:dropDownVerticalOffset="0dp"
android:dropDownSelector="@color/red_primary_dark"
android:entries="@array/accessories_sp"
android:layout_height="48dp"/>

</LinearLayout>


<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_margin="20dp"
android:layout_height="wrap_content">

<Button
android:id="@+id/parset_ok_btn"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginRight="10dp"
android:background="@drawable/button4"
android:text="确认"
android:layout_height="wrap_content"/>

<Button
android:id="@+id/parset_cancel_btn"
android:layout_width="0dp"
android:text="取消"
android:layout_weight="1"
android:layout_marginLeft="10dp"
android:background="@drawable/button4"
android:layout_height="wrap_content"/>

</LinearLayout>


</LinearLayout>

+ 13
- 0
app/src/main/res/layout/datatab/layout/select_item.xml View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical"
android:textColor="#000000"
android:background="@drawable/spinner_text_br"
android:paddingLeft="10dp"
android:textSize="20sp"
android:text="0"
android:layout_height="48dp">

</TextView>

+ 227
- 0
app/src/main/res/layout/fragment_robot_main.xml View File

@@ -0,0 +1,227 @@
<?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:background="@color/app_color_blue"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.RobotMain">

<GridLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/qmui_topbar_height"
android:background="#dddddd"
android:rowCount="2"
android:columnCount="2"
android:orientation="horizontal">

<GridLayout android:layout_margin="10dp"
android:columnCount="2"
android:background="@drawable/border_background"
android:elevation="10dp"
android:layout_rowWeight="1"
android:orientation="horizontal"
android:layout_columnWeight="1">
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:src="@mipmap/cg"
android:layout_margin="10dp"
android:layout_rowWeight="1"
android:layout_columnWeight="1"/>

<LinearLayout
android:layout_width="0dp"
android:layout_rowWeight="1"
android:layout_height="0dp"
android:layout_margin="10dp"
android:orientation="vertical"
android:layout_columnWeight="1">
<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="状态:"/>

<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="空闲中"/>

<Button
android:id="@+id/main_btn1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:textSize="20sp"
android:background="@drawable/button4"
android:text="选择菜品"/>
</LinearLayout>
</GridLayout>

<GridLayout android:layout_margin="10dp"
android:columnCount="2"
android:background="@drawable/border_background"
android:elevation="10dp"
android:layout_rowWeight="1"
android:orientation="horizontal"
android:layout_columnWeight="1">
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:src="@mipmap/cg"
android:layout_margin="10dp"
android:layout_rowWeight="1"
android:layout_columnWeight="1"/>

<LinearLayout
android:layout_width="0dp"
android:layout_rowWeight="1"
android:layout_height="0dp"
android:layout_margin="10dp"
android:orientation="vertical"
android:layout_columnWeight="1">
<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="状态:"/>

<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="空闲中"/>

<Button
android:id="@+id/main_btn2"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:textSize="20sp"
android:background="@drawable/button4"
android:text="选择菜品"/>
</LinearLayout>
</GridLayout>

<GridLayout android:layout_margin="10dp"
android:columnCount="2"
android:background="@drawable/border_background"
android:elevation="10dp"
android:layout_rowWeight="1"
android:orientation="horizontal"
android:layout_columnWeight="1">
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:src="@mipmap/cg"
android:layout_margin="10dp"
android:layout_rowWeight="1"
android:layout_columnWeight="1"/>

<LinearLayout
android:layout_width="0dp"
android:layout_rowWeight="1"
android:layout_height="0dp"
android:layout_margin="10dp"
android:orientation="vertical"
android:layout_columnWeight="1">
<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="状态:"/>

<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="空闲中"/>

<Button
android:id="@+id/main_btn3"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:textSize="20sp"
android:background="@drawable/button4"
android:text="选择菜品"/>
</LinearLayout>
</GridLayout>

<GridLayout android:layout_margin="10dp"
android:columnCount="2"
android:background="@drawable/border_background"
android:elevation="10dp"
android:layout_rowWeight="1"
android:orientation="horizontal"
android:layout_columnWeight="1">
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:src="@mipmap/cg"
android:layout_margin="10dp"
android:layout_rowWeight="1"
android:layout_columnWeight="1"/>

<LinearLayout
android:layout_width="0dp"
android:layout_rowWeight="1"
android:layout_height="0dp"
android:layout_margin="10dp"
android:orientation="vertical"
android:layout_columnWeight="1">
<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="状态:"/>

<TextView
android:layout_width="300dp"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:textSize="40sp"
android:textColor="#f0a732"
android:text="空闲中"/>

<Button
android:id="@+id/main_btn4"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="20dp"
android:textSize="20sp"
android:background="@drawable/button4"
android:text="选择菜品"/>
</LinearLayout>
</GridLayout>

</GridLayout>

<com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/robot_topbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/app_color_blue" />

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

BIN
View File


+ 25
- 0
app/src/main/res/values/spinner_array.xml View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="sp1">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
</string-array>

<string-array name="accessories_sp">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</string-array>

</resources>

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

@@ -105,7 +105,7 @@
<item name="android:background">@drawable/spinner_border</item>
<!-- <item name="android:popupBackground">@color/main_background</item>-->
<item name="android:dropDownVerticalOffset">30dp</item>
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingLeft">10dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingTop">0dp</item>
<item name="android:paddingBottom">0dp</item>


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

@@ -18,4 +18,29 @@
<attr name="app_skin_span_normal_bg_color" format="color"/>
<attr name="app_skin_span_pressed_bg_color" format="color"/>
<attr name="app_skin_alpha_test" format="float"/>

<!--自定义dialog背景全透明无边框theme -->
<style name="CustomDialog" parent="android:style/Theme.Dialog">
<!--背景颜色及和透明程度-->
<item name="android:windowBackground">@android:color/transparent</item>
<!--是否去除标题 -->
<item name="android:windowNoTitle">true</item>
<!--是否去除边框-->
<item name="android:windowFrame">@null</item>
<!--是否浮现在activity之上-->
<item name="android:windowIsFloating">true</item>
<!--是否模糊-->
<item name="android:backgroundDimEnabled">true</item>
</style>

<!--自定义dialog背景弹框设置-->
<style name="mydialog" parent="android:style/Theme.Dialog">
<!-- 背景透明,设置圆角对话框必须设置背景透明,否则四角会有背景色小块-->
<item name="android:windowBackground">@android:color/transparent</item>
<!-- 没有标题 -->
<item name="android:windowNoTitle">true</item>
<!-- 背景模糊 -->
<item name="android:backgroundDimEnabled">true</item>
</style>

</resources>

Loading…
Cancel
Save