增加 查询输入功能

fengshen
wanghao 2 months ago
parent f125653ee4
commit 511212d59f

Binary file not shown.

@ -1,8 +1,8 @@
package com.example.writeepc;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import androidx.databinding.DataBindingUtil;
@ -31,6 +31,13 @@ public class ShuangqianActivity extends BaseActivity implements MyScannerCall {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_shuangqian);
String ACTION_SCAN_INIT = "com.rfid.SCAN_INIT";
Intent intent = new Intent();
intent.setAction(ACTION_SCAN_INIT);
sendBroadcast(intent);
initUHFRManager1();
initDialog();
int powerBinding = Integer.parseInt(SharedPreferencesUtils.getstring("powerBinding", "22"));

@ -7,6 +7,8 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Handler;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.Button;
@ -79,6 +81,26 @@ public class ShuangqianActivity2 extends BaseActivity {
Intent toKillService = new Intent();
toKillService.setAction(ACTION_CLOSE_SCAN);
sendBroadcast(toKillService);
binding.dataEpc.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
if (s.length()==24){
haohuaMesSelect(s.toString());
}
}
});
}
@ -110,7 +132,7 @@ public class ShuangqianActivity2 extends BaseActivity {
if (readState) {
dataReadRFID(null);
// callWebService(buildSelectRequest(result));
haohuaMesSelect(result);
// haohuaMesSelect(result);
}

@ -66,7 +66,6 @@
android:drawableTop="@mipmap/ic_un"
android:drawablePadding="10dp"
android:gravity="center"
android:visibility="gone"
android:text="解绑"
android:textSize="20sp" />

@ -58,27 +58,27 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginTop="20dp"
android:orientation="horizontal">
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="55dp"-->
<!-- android:layout_marginTop="20dp"-->
<!-- android:orientation="horizontal">-->
<TextView
style="@style/info_text"
android:layout_width="110dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:text="胎胚年份:" />
<!-- <TextView-->
<!-- style="@style/info_text"-->
<!-- android:layout_width="110dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_gravity="center"-->
<!-- android:text="胎胚年份:" />-->
<EditText
android:id="@+id/socket_year"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
/>
</LinearLayout>
<!-- <EditText-->
<!-- android:id="@+id/socket_year"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_gravity="center"-->
<!-- android:gravity="center"-->
<!-- />-->
<!-- </LinearLayout>-->
<LinearLayout
android:layout_width="match_parent"

@ -41,7 +41,7 @@
android:layout_gravity="center"
android:text="扫描RFID:" />
<TextView
<EditText
android:id="@+id/data_epc"
style="@style/san_text"
android:layout_width="match_parent"

@ -75,8 +75,8 @@
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="20dp"
android:orientation="horizontal">
android:orientation="horizontal"
android:visibility="gone">
<TextView
style="@style/info_text"
@ -91,14 +91,14 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:entries="@array/power"
android:textAlignment="center"
android:lines="1"
/>
android:textAlignment="center" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
style="@style/button_style"

Loading…
Cancel
Save