idata
wangh 1 year ago
parent 3dd848769c
commit 71d1194158

@ -7,12 +7,15 @@
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:icon="@drawable/logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@drawable/logo"
android:supportsRtl="true"
android:theme="@style/Theme.Beijingdaxing"
tools:targetApi="31">
<activity
android:name=".FpOutActivity"
android:exported="false" />
<activity
android:name=".FpInActivity"
android:exported="false" />
@ -36,15 +39,19 @@
<activity
android:name=".HomePageActivity"
android:exported="true">
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
</activity>
<activity
android:name=".MainActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true" />
</application>
</manifest>

@ -1,17 +1,11 @@
package com.example.beijing_daxing;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.BaseObservable;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ObservableBoolean;
import androidx.databinding.ObservableField;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.Toast;
import com.example.beijing_daxing.adapter.CheckAdapter;
@ -21,6 +15,7 @@ import com.example.beijing_daxing.base.MyRecultCall;
import com.example.beijing_daxing.base.MyResult;
import com.example.beijing_daxing.been.Stock;
import com.example.beijing_daxing.databinding.ActivityCheckBinding;
import com.example.beijing_daxing.dialog.InPutDialog;
import com.example.beijing_daxing.uitls.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
@ -28,14 +23,15 @@ import com.lzy.okgo.model.Response;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
public class CheckActivity extends BaseActivity implements AdapterClickCall {
public class CheckActivity extends BaseActivity implements AdapterClickCall, InPutDialog.InPutDialogCall {
private ActivityCheckBinding binding;
private CheckAdapter adapter;
private List<Stock> list;
private List<String> selectList;
private ObservableBoolean state;
private AlertDialog.Builder inputDialog;
private InPutDialog inputDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -59,23 +55,14 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall {
}
});
initRequest();
initAlertDialog();
}
inputDialog = new InPutDialog(this);
inputDialog.setInPutDialogCall(this);
private void initAlertDialog() {
final EditText editText = new EditText(this);
inputDialog = new AlertDialog.Builder(this);
inputDialog.setTitle("输入跳过原因").setView(editText);
inputDialog.setPositiveButton("确定", (dialog, which) -> {
var stock = list.get(tag);
stock.setState("跳过");
stock.setRemark(editText.getText().toString());
adapter.notifyItemChanged(tag);
});
}
private void initRequest() {
OkGo.<MyResult>post(url + "/xj/select").params("user", SharedPreferencesUtils.getstring("user", "")).execute(new MyRecultCall(dialog, this) {
@Override
@ -85,6 +72,10 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall {
if (body.getCode() == 0) {
list = gson.fromJson(body.getData().toString(), new TypeToken<List<Stock>>() {
}.getType());
if (list == null || list.isEmpty()) {
Toast.makeText(CheckActivity.this, "没有维护巡检区域", Toast.LENGTH_SHORT).show();
return;
}
adapter.setList(list);
adapter.notifyDataSetChanged();
return;
@ -93,41 +84,47 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall {
}
});
}
private int subIndex=-1;
private int subIndex = -1;
@Override
protected void sanRfid(List<String> epcs) {
var text = epcs.get(0);
binding.checkEpc.setText(text);
Stock stock=new Stock();
Stock stock = new Stock();
stock.setEpcCode(text);
var index = list.indexOf(stock);
if (index==-1){
if (index == -1) {
Toast.makeText(this, "轮挡扫描错误", Toast.LENGTH_SHORT).show();
return;
}
subIndex=index;
subIndex = index;
}
public void check_submit(View view) {
list.forEach(t->{
if (t.getState().equals("未检")) return;
});
OkGo.<MyResult>post(url+"/xj/submit")
var type = list.stream().anyMatch(t -> t.getState().equals("未检"));
if (type) {
Toast.makeText(this, "未检完全部轮挡,不允许提交", Toast.LENGTH_SHORT).show();
return;
}
OkGo.<MyResult>post(url + "/xj/submit")
.tag(this)
.params("json",gson.toJson(list))
.params("user", SharedPreferencesUtils.getstring("user","test-user"))
.execute(new MyRecultCall(dialog,this){
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
Toast.makeText(CheckActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
// finish();
}
});
.params("json", gson.toJson(list))
.params("user", SharedPreferencesUtils.getstring("user", "test-user"))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
Toast.makeText(CheckActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
finish();
}
});
}
public void check_stock(View view) {
if (subIndex==-1) return;
if (subIndex == -1) return;
var stock = list.get(subIndex);
stock.setState(binding.checkItemSelect.getSelectedItem().toString());
stock.setRemark(binding.checkRemark.getText().toString());
@ -145,4 +142,12 @@ public class CheckActivity extends BaseActivity implements AdapterClickCall {
}
@Override
public void inPutDialogReculi(String name) {
var stock = list.get(tag);
stock.setState("跳过");
stock.setRemark(name);
inputDialog.dismiss();
adapter.notifyDataSetChanged();
}
}

@ -58,7 +58,7 @@ public class FpInActivity extends BaseActivity {
}
public void fpin_submit(View view){
Log.e("TAG", "onSuccess:" +vm.toString() );
// Log.e("TAG", "onSuccess:" +vm.toString() );
var state = vm.getState();
if (!state.equals("报废")){
Toast.makeText(this, "轮挡状态:"+state+",不能使用废品入库功能", Toast.LENGTH_SHORT).show();

@ -0,0 +1,137 @@
package com.example.beijing_daxing;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ObservableBoolean;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.Toast;
import com.example.beijing_daxing.adapter.OutAdapter;
import com.example.beijing_daxing.adapter.StoreCheckAdapter;
import com.example.beijing_daxing.base.BaseActivity;
import com.example.beijing_daxing.base.MyRecultCall;
import com.example.beijing_daxing.base.MyResult;
import com.example.beijing_daxing.been.Stock;
import com.example.beijing_daxing.databinding.ActivityFpOutBinding;
import com.example.beijing_daxing.uitls.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import java.util.ArrayList;
import java.util.List;
public class FpOutActivity extends BaseActivity {
private ObservableBoolean checkState;
private List<Stock> list;
private OutAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityFpOutBinding binding= DataBindingUtil. setContentView(this,R.layout.activity_fp_out);
checkState=new ObservableBoolean();
binding.setCheckState(checkState);
adapter = new OutAdapter(this);
binding.setAdapter(adapter);
initRequest();
}
private List<String> tagList;
@Override
protected void sanRfid(List<String> epcs) {
epcs.forEach(t -> {
if (tagList.contains(t)){
tagList.add(t);
return;
}
var stock = new Stock();
stock.setEpcCode(t);
var index = list.indexOf(stock);
if (index != -1) {
list.get(index).setState("Y");
}
});
adapter.notifyDataSetChanged();
}
private void initRequest() {
OkGo.<MyResult>post(url + "/fpout/select").tag(this).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 0) {
list = gson.fromJson(body.getData().toString(), new TypeToken<List<Stock>>() {
}.getType());
tagList=new ArrayList<>();
adapter.setList(list);
adapter.notifyDataSetChanged();
} else {
Toast.makeText(FpOutActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
}
}
});
}
public void fp_out_read(View view) {
var b = checkState.get();
if (b) {
handler.removeCallbacks(runnable);
} else {
handler.postDelayed(runnable, 0);
}
checkState.set(!b);
}
public void fp_out_submit(View view) {
if (list.stream().anyMatch(t -> t.getState().equals("N"))){
return;
}
handler.removeCallbacks(runnable);
OkGo.<MyResult>post(url+"/fpout/submit")
.tag(this)
.params("user", SharedPreferencesUtils.getstring("user","test"))
.params("json",gson.toJson(list))
.execute(new MyRecultCall(dialog,this){
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode()==0){
finish();
Toast.makeText(FpOutActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(FpOutActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
}
}
});
}
@SuppressLint("HandlerLeak")
private Handler handler = new Handler() {
@Override
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
}
};
private Runnable runnable = new Runnable() {
@Override
public void run() {
sendBroadcast(broadcastIntent);
handler.postDelayed(runnable, 1000);
}
};
@Override
protected void onDestroy() {
super.onDestroy();
handler.removeCallbacks(runnable);
handler=null;
runnable=null;
}
}

@ -11,10 +11,16 @@ import android.widget.AdapterView;
import android.widget.Toast;
import com.example.beijing_daxing.adapter.HomePageAdapter;
import com.example.beijing_daxing.base.BaseActivity;
import com.example.beijing_daxing.base.MyApplication;
import com.example.beijing_daxing.databinding.ActivityHomePageBinding;
import com.example.beijing_daxing.been.HomeIcon;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.handheld.UHFLonger.UHFLongerManager;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class HomePageActivity extends AppCompatActivity {
@ -22,19 +28,22 @@ public class HomePageActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityHomePageBinding binding= DataBindingUtil. setContentView(this,R.layout.activity_home_page);
ActivityHomePageBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_home_page);
List<HomeIcon> list = new ArrayList<>();
list.add(new HomeIcon(R.mipmap.home_in1, "轮挡入库", InActivity.class));
list.add(new HomeIcon(R.mipmap.home_out1, "轮挡领用出库", OutActivity.class));
list.add(new HomeIcon(R.mipmap.home_store_check, "仓库盘点", StoreCheckActivity.class));
list.add(new HomeIcon(R.mipmap.home_check, "轮挡巡检", CheckActivity.class));
list.add(new HomeIcon(R.mipmap.home_bf, "轮挡报废", BFActivity.class));
list.add(new HomeIcon(R.mipmap.home_in, "废品入库", FpInActivity.class));
list.add(new HomeIcon(R.mipmap.home_out, "废品出库", CheckActivity.class));
list.add(new HomeIcon(R.mipmap.home_out, "废品出库", FpOutActivity.class));
var intent = getIntent();
/* try {
if (!loginUser.equals("admin")) {
ArrayList<String> strings = getIntent().getStringArrayListExtra("json");
try {
if (!intent.getStringExtra("user").equals("admin")) {
ArrayList<String> strings = new Gson().fromJson(intent.getStringExtra("json"), new TypeToken<ArrayList<String>>() {
}.getType());
if (strings != null) {
Iterator<HomeIcon> iter = list.iterator();
while (iter.hasNext()) {
@ -49,7 +58,7 @@ public class HomePageActivity extends AppCompatActivity {
}
} catch (Exception e) {
e.printStackTrace();
}*/
}
HomePageAdapter adapter = new HomePageAdapter(list, this);
binding.homeGridview.setAdapter(adapter);
binding.homeGridview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@ -60,7 +69,10 @@ public class HomePageActivity extends AppCompatActivity {
}
});
}
private long exitTime = 0;
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == 4) {
@ -75,4 +87,13 @@ public class HomePageActivity extends AppCompatActivity {
return super.onKeyDown(keyCode, event);
}
@Override
protected void onDestroy() {
super.onDestroy();
var uhfLongerManager = MyApplication.getUhfLongerManager();
uhfLongerManager.close();
MyApplication.uhfLongerManager = null;
}
}

@ -83,19 +83,19 @@ public class InActivity extends BaseActivity implements AdapterClickCall {
String binchCode = vm.getBinchCode();
if (binchCode == null || epcList.isEmpty()) return;
vm.setEpcList(epcList);
vm.setSubmitUser(SharedPreferencesUtils.getstring("user","test"));
vm.setSubmitUser(SharedPreferencesUtils.getstring("user", "test"));
OkGo.<MyResult>post(url + "/instore/submit")
.upRequestBody(RequestBody.create(JSON, gson.toJson(vm)))
.execute(new MyRecultCall(dialog,this){
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
if (response.body().getCode()==0){
Toast.makeText(InActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
Toast.makeText(InActivity.this, response.body().getMsg(), Toast.LENGTH_SHORT).show();
if (response.body().getCode() == 0) {
finish();
}else {
Toast.makeText(InActivity.this, response.body().getMsg(), Toast.LENGTH_SHORT).show();
}
}
});
}

@ -66,7 +66,8 @@ public class MainActivity extends BaseActivity {
SharedPreferencesUtils.putstring("user",name);
SharedPreferencesUtils.putstring("pass",pass);
Intent intent=new Intent(MainActivity.this, HomePageActivity.class);
intent.putExtra("json",response.body());
intent.putExtra("json",body);
intent.putExtra("user",name);
startActivity(intent);
finish();
}
@ -75,11 +76,5 @@ public class MainActivity extends BaseActivity {
});
}
@Override
protected void onDestroy() {
super.onDestroy();
if (uhfLongerManager!=null){
uhfLongerManager.close();
}
}
}

@ -135,6 +135,7 @@ public class StoreCheckActivity extends BaseActivity {
@Override
protected void onDestroy() {
super.onDestroy();
handler.removeCallbacks(runnable);
handler=null;
runnable=null;
}

@ -0,0 +1,65 @@
package com.example.beijing_daxing.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.example.beijing_daxing.R;
import com.example.beijing_daxing.been.Stock;
import com.example.beijing_daxing.databinding.ItemOutBinding;
import com.example.beijing_daxing.databinding.ItemStoreCheckBinding;
import java.util.List;
/**
* @author wanghao
* @date 2024/1/19 14:32
*/
public class OutAdapter extends RecyclerView.Adapter<OutAdapter.MyViewHoder> {
private Context context;
private List<Stock> list;
private LayoutInflater inflater;
public OutAdapter(Context context) {
this.context = context;
inflater = LayoutInflater.from(context);
}
public void setList(List<Stock> list) {
this.list = list;
}
@Override
public MyViewHoder onCreateViewHolder(ViewGroup parent, int viewType) {
ItemOutBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_out, parent, false);
return new MyViewHoder(binding);
}
@Override
public void onBindViewHolder(MyViewHoder holder, int position) {
var binding = holder.getBinding();
binding.setItem(list.get(position));
}
@Override
public int getItemCount() {
return list==null?0:list.size();
}
public class MyViewHoder extends RecyclerView.ViewHolder {
private ItemOutBinding binding;
public MyViewHoder( ItemOutBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
public ItemOutBinding getBinding() {
return binding;
}
}
}

@ -9,6 +9,8 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Window;
import android.widget.Toast;
@ -23,14 +25,14 @@ import java.util.List;
import okhttp3.MediaType;
public abstract class BaseActivity extends AppCompatActivity {
// public static String url = "http://192.168.0.102:90/api";
public static String url = "http://172.20.10.2:90/api";
public static String url = "http://192.168.0.102:90/api";
// public static String url = "http://172.20.10.2:90/api";
public ProgressDialog dialog;
public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");
public UHFLongerManager uhfLongerManager;
private MediaPlayer mediaPlayer;
private MyReceiver myReceiver;
public MyReceiver myReceiver;
public Intent broadcastIntent;
@ -45,13 +47,18 @@ public abstract class BaseActivity extends AppCompatActivity {
broadcastIntent = new Intent("android.rfid.FUN_KEY");
broadcastIntent.putExtra("keydown", false);
}
// private long readTime = 0;
public class MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (!intent.getBooleanExtra("keydown", false)) {
var keydown = intent.getBooleanExtra("keydown", false);
if (!keydown ) {
// readTime = System.currentTimeMillis();
List<String> strings = uhfLongerManager.inventoryRealTime();
Log.e("TAG", "驱动"+(uhfLongerManager==null) );
if (strings == null || strings.isEmpty()) {
return;
}
@ -77,13 +84,13 @@ public abstract class BaseActivity extends AppCompatActivity {
registerReceiver(myReceiver, intentFilter);
mediaPlayer = MediaPlayer.create(this, R.raw.msg);
}
@Override
protected void onDestroy() {
super.onDestroy();
unregisterReceiver(myReceiver);
}
protected abstract void sanRfid(List<String> epcs);
}

@ -0,0 +1,48 @@
package com.example.beijing_daxing.dialog;
import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import com.example.beijing_daxing.R;
import com.example.beijing_daxing.databinding.DialogInputBinding;
/**
* @author wanghao
* @date 2024/2/21 14:33
*/
public class InPutDialog extends Dialog {
private InPutDialogCall inPutDialogCall;
private DialogInputBinding binding;
public void setInPutDialogCall(InPutDialogCall inPutDialogCall) {
this.inPutDialogCall = inPutDialogCall;
}
public InPutDialog(@NonNull Context context) {
super(context, R.style.dialog);
binding = DataBindingUtil.inflate(LayoutInflater.from(context),
R.layout.dialog_input, null, false);
setContentView(binding.getRoot());
binding.dialogFalse.setOnClickListener(v -> dismiss());
binding.dialogTrue.setOnClickListener(v -> {
inPutDialogCall.inPutDialogReculi( binding.inputDialogText.getText().toString().trim());
});
}
public interface InPutDialogCall {
void inPutDialogReculi(String name);
}
@Override
public void show() {
super.show(); binding.inputDialogText.setText(null);
}
}

@ -5,7 +5,7 @@
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:fillColor="@color/blue"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<layout 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">
<data>
<variable
name="checkState"
type="androidx.databinding.ObservableBoolean" />
<variable
name="adapter"
type="com.example.beijing_daxing.adapter.OutAdapter" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".FpOutActivity">
<TextView
style="@style/title_text"
android:layout_width="match_parent"
android:layout_height="45dp"
android:text="废品出库" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:adapter="@{adapter}"
android:background="@color/white"
android:padding="10dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_margin="20dp"
android:orientation="horizontal">
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginEnd="15dp"
android:backgroundTint="@{checkState?@color/yellow:@color/black}"
android:onClick="fp_out_read"
android:text='@{checkState?"停止扫描":"自动扫描"}'
android:textSize="18sp" />
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="20dp"
android:layout_weight="1"
android:onClick="fp_out_submit"
android:textSize="18sp"
android:text="提交出库" />
</LinearLayout>
</LinearLayout>
</layout>

@ -52,11 +52,14 @@
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:hint="用户名">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:text="@={user.name}" />
</com.google.android.material.textfield.TextInputLayout>
@ -73,7 +76,7 @@
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="50dp"
android:inputType="textPassword"
android:layout_gravity="center"
android:imeOptions="actionDone"

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="246dp"
android:background="@drawable/info_text_bg"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
android:letterSpacing="0.2"
android:text="输入提示"
android:textColor="@color/black"
android:textSize="23sp" />
<EditText
android:id="@+id/input_dialog_text"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_margin="20dp"
android:background="@drawable/san_text_bg"
android:hint="输入巡检跳过原因"
android:gravity="center" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/bg1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp">
<TextView
android:id="@+id/dialog_false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:textSize="20sp"
android:textColor="@color/yellow"
android:letterSpacing="1"
android:text="取消" />
<View
android:layout_width="2dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:background="@color/bg1" />
<TextView
android:id="@+id/dialog_true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:textSize="20sp"
android:textColor="@color/blue"
android:letterSpacing="1"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="item"
type="com.example.beijing_daxing.been.Stock" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background='@{item.state.equals("Y")?@color/green:@color/item_bg}'
android:orientation="horizontal">
<TextView
android:id="@+id/item_index"
style="@style/item_text_style"
android:layout_width="40dp"
android:layout_height="match_parent"
android:text='@{String.valueOf(item.index)}' />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
style="@style/item_text_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:minHeight="45dp"
android:layout_weight="1"
android:text="@{item.epcCode}" />
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@color/white" />
<TextView
style="@style/item_text_style"
android:layout_width="100dp"
android:layout_height="match_parent"
android:text="@{item.locationCode}" />
</LinearLayout>
</layout>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

@ -61,4 +61,19 @@
<item name="android:layout_marginEnd">8dp</item>
</style>
<style name="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>
<item name="android:windowMinWidthMinor">95%</item><!--宽度铺满全屏-->
</style>
</resources>
Loading…
Cancel
Save