first commit: upload android project
commit
779c2393e5
@ -0,0 +1,14 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="1.8" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="1.8" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven3" />
|
||||
<option name="name" value="maven3" />
|
||||
<option name="url" value="http://oss.jfrog.org/artifactory/oss-snapshot-local/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenLocal" />
|
||||
<option name="name" value="MavenLocal" />
|
||||
<option name="url" value="file:/$USER_HOME$/.m2/repository/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven2" />
|
||||
<option name="name" value="maven2" />
|
||||
<option name="url" value="https://jitpack.io" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1 @@
|
||||
/build
|
||||
@ -0,0 +1,61 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
defaultConfig {
|
||||
applicationId "com.example.uhf"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
//testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
debug {
|
||||
File strFile = new File("/chainway.keystore")
|
||||
storeFile file(strFile)
|
||||
storePassword "123456"
|
||||
keyPassword "123456"
|
||||
keyAlias "chainway"
|
||||
}
|
||||
release {
|
||||
File strFile = new File("/chainway.keystore")
|
||||
storeFile file(strFile)
|
||||
storePassword "123456"
|
||||
keyPassword "123456"
|
||||
keyAlias "chainway"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = '1.8'
|
||||
targetCompatibility = '1.8'
|
||||
}
|
||||
productFlavors {
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
|
||||
implementation files('libs/xUtils-2.5.5.jar') //implementation files('org.xutils:xutils:2.5.+')
|
||||
implementation files('libs/jxl.jar')
|
||||
implementation(name: 'DeviceAPI_ver20210618', ext: 'aar')
|
||||
|
||||
//compile 'com.android.support:support-v4:18.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.2.+'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.+'
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,18 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in D:\soft\android\sdk/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
-keep class * extends java.lang.annotation.Annotation { *; }
|
||||
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.uhf"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:theme="@style/CustomTheme" >
|
||||
<activity
|
||||
android:name=".activity.UHFMainActivity"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -0,0 +1,48 @@
|
||||
package com.example.uhf.adapter;
|
||||
|
||||
|
||||
import com.example.uhf.fragment.KeyDwonFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2021/6/22.
|
||||
*/
|
||||
public class ViewPagerAdapter extends FragmentPagerAdapter {
|
||||
|
||||
private List<KeyDwonFragment> lstFrg = new ArrayList<KeyDwonFragment>();
|
||||
private List<String> lstTitles = new ArrayList<String>();
|
||||
|
||||
public ViewPagerAdapter(FragmentManager fm, List<KeyDwonFragment> fragments, List<String> titles) {
|
||||
super(fm);
|
||||
|
||||
lstFrg = fragments;
|
||||
lstTitles = titles;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
if (lstFrg.size() > 0) {
|
||||
return lstFrg.get(position);
|
||||
}
|
||||
throw new IllegalStateException("No fragment at position " + position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return lstFrg.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
if (lstTitles.size() > 0) {
|
||||
return lstTitles.get(position);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package com.example.uhf.fragment;
|
||||
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
|
||||
import com.example.uhf.activity.UHFMainActivity;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
/**
|
||||
* Created by Administrator on 2021/6/22.
|
||||
*/
|
||||
|
||||
public class FileImport {
|
||||
static String xlsFilePath = Environment.getExternalStorageDirectory() + "/outxmldata/";
|
||||
|
||||
public static boolean daochu(String tmpname, ArrayList<HashMap<String, String>> lists2) {
|
||||
|
||||
try {
|
||||
|
||||
String file = "";
|
||||
if (tmpname.isEmpty())
|
||||
file = xlsFilePath + "xls"
|
||||
+ GetTimesyyyymmddhhmmss() + ".xls";
|
||||
else
|
||||
file = xlsFilePath + tmpname;
|
||||
File path2 = new File(xlsFilePath);
|
||||
|
||||
if (path2.mkdirs()) {
|
||||
|
||||
}
|
||||
List<Object> al22 = new ArrayList<Object>();
|
||||
List<String> al2 = new ArrayList<String>();
|
||||
al2.add("编号");
|
||||
|
||||
// al2.add("筛选栏");
|
||||
|
||||
al22.add(al2);
|
||||
FileXls.writeXLS(file, al22);
|
||||
List<Object> ac = new ArrayList<Object>();
|
||||
|
||||
int adds = -1;
|
||||
String id = "";
|
||||
// String sxl = "";
|
||||
for (int i = 0; i < lists2.size(); i++) {
|
||||
List<String> al = new ArrayList<String>();
|
||||
Set<Entry<String, String>> sets = lists2.get(i).entrySet();
|
||||
|
||||
|
||||
for (Entry<String, String> entry : sets) {
|
||||
|
||||
if (entry.getKey().equals("tagUii")) {
|
||||
id = entry.getValue().toString();
|
||||
id = id.replace("EPC:", "");
|
||||
id = id.replace("TID:", "");
|
||||
id = id.substring(0, 12);
|
||||
} else {
|
||||
}
|
||||
// Object value=entry.getValue();
|
||||
}
|
||||
al.add(id);
|
||||
|
||||
// al.add(sxl);
|
||||
ac.add(al);
|
||||
}
|
||||
|
||||
return FileXls.writeXLS(file, ac);
|
||||
} catch (Exception ex) {
|
||||
Log.i(UHFMainActivity.TAG, "导出异常=" + ex.getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static String GetTimesyyyymmdd() {
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date curDate = new Date(System.currentTimeMillis());// 获取当前时间
|
||||
String dt = formatter.format(curDate);
|
||||
|
||||
return dt;
|
||||
|
||||
}
|
||||
|
||||
public static String GetTimesddMMyy() {
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yy");
|
||||
Date curDate = new Date(System.currentTimeMillis());// 获取当前时间
|
||||
String dt = formatter.format(curDate);
|
||||
|
||||
return dt;
|
||||
|
||||
}
|
||||
|
||||
public static String GetTimesyyyymmddhhmmss() {
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
Date curDate = new Date(System.currentTimeMillis());// 获取当前时间
|
||||
String dt = formatter.format(curDate);
|
||||
|
||||
return dt;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,260 @@
|
||||
package com.example.uhf.fragment;
|
||||
|
||||
import android.util.Xml;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import jxl.Cell;
|
||||
import jxl.CellType;
|
||||
import jxl.DateCell;
|
||||
import jxl.NumberCell;
|
||||
import jxl.Sheet;
|
||||
import jxl.Workbook;
|
||||
import jxl.read.biff.BiffException;
|
||||
import jxl.write.Label;
|
||||
import jxl.write.WritableSheet;
|
||||
import jxl.write.WritableWorkbook;
|
||||
import jxl.write.WriteException;
|
||||
import jxl.write.biff.RowsExceededException;
|
||||
/**
|
||||
* Created by Administrator on 2018/7/25.
|
||||
*/
|
||||
|
||||
public class FileXls {
|
||||
|
||||
private static final int DEFAULT_SHEET = 0;
|
||||
|
||||
public static String readXLS(String path) {
|
||||
String str = "";
|
||||
|
||||
try {
|
||||
Workbook workbook = Workbook.getWorkbook(new File(path));
|
||||
Sheet sheet = workbook.getSheet(0);
|
||||
int columnCount = sheet.getColumns();
|
||||
int rowCount = sheet.getRows();
|
||||
|
||||
Cell cell = null;
|
||||
for (int i = 0; i < rowCount; i++) {
|
||||
for (int j = 0; j < columnCount; j++) {
|
||||
cell = sheet.getCell(j, i);
|
||||
String temp2 = "";
|
||||
if (cell.getType() == CellType.NUMBER) {
|
||||
temp2 = ((NumberCell) cell).getValue() + "";
|
||||
} else if (cell.getType() == CellType.DATE) {
|
||||
temp2 = "" + ((DateCell) cell).getDate();
|
||||
} else {
|
||||
temp2 = "" + cell.getContents();
|
||||
}
|
||||
str = str + " " + temp2;
|
||||
}
|
||||
str += "\n";
|
||||
}
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
public static ArrayList<HashMap<String, Object>> readXLSmap(String path) {
|
||||
String str = "";
|
||||
ArrayList<HashMap<String, Object>> listmap = new ArrayList<HashMap<String, Object>>();
|
||||
try {
|
||||
Workbook workbook = Workbook.getWorkbook(new File(path));
|
||||
Sheet sheet = workbook.getSheet(0);
|
||||
int columnCount = sheet.getColumns();
|
||||
int rowCount = sheet.getRows();
|
||||
|
||||
Cell cell = null;
|
||||
for (int i = 1; i < rowCount; i++) {
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("tagUii", sheet.getCell(0, i).getContents());
|
||||
// map.put("jl", sheet.getCell(1, i).getContents());
|
||||
|
||||
listmap.add(map);
|
||||
}
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
return listmap;
|
||||
}
|
||||
|
||||
public static List<ArrayList<String>> readXLSX(String path) {
|
||||
String v = null;
|
||||
List<String> list = new ArrayList<String>();
|
||||
List<ArrayList<String>> table = new ArrayList<ArrayList<String>>();
|
||||
|
||||
try {
|
||||
ZipFile file = new ZipFile(new File(path));
|
||||
|
||||
ZipEntry sharedStringXML = file.getEntry("xl/sharedStrings.xml");
|
||||
InputStream inputStream = file.getInputStream(sharedStringXML);
|
||||
XmlPullParser parser = Xml.newPullParser();
|
||||
parser.setInput(inputStream, "utf-8");
|
||||
int event = parser.getEventType();
|
||||
while (event != XmlPullParser.END_DOCUMENT) {
|
||||
switch (event) {
|
||||
case XmlPullParser.START_TAG:
|
||||
String tag = parser.getName();
|
||||
if (tag.equalsIgnoreCase("t")) {
|
||||
list.add(parser.nextText());
|
||||
}
|
||||
break;
|
||||
case XmlPullParser.END_TAG:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
event = parser.next();
|
||||
}
|
||||
|
||||
ZipEntry sheetXML = file.getEntry("xl/worksheets/sheet1.xml");
|
||||
InputStream inputStreamsheet = file.getInputStream(sheetXML);
|
||||
parser = Xml.newPullParser();
|
||||
parser.setInput(inputStreamsheet, "utf-8");
|
||||
event = parser.getEventType();
|
||||
|
||||
ArrayList<String> row = null;
|
||||
boolean isText = false;
|
||||
while (event != XmlPullParser.END_DOCUMENT) {
|
||||
|
||||
switch (event) {
|
||||
case XmlPullParser.START_TAG:
|
||||
String tag = parser.getName();
|
||||
|
||||
if (tag.equalsIgnoreCase("row")) {
|
||||
row = new ArrayList<String>();
|
||||
table.add(row);
|
||||
} else if (tag.equalsIgnoreCase("c")) {
|
||||
String t = parser.getAttributeValue(null, "t");
|
||||
|
||||
if (t != null) {
|
||||
isText = true;
|
||||
} else {
|
||||
isText = false;
|
||||
}
|
||||
} else if (tag.equalsIgnoreCase("v")) {
|
||||
String cell = parser.nextText();
|
||||
|
||||
if (cell != null) {
|
||||
if (isText) {
|
||||
row.add(list.get(Integer.parseInt(cell)));
|
||||
} else {
|
||||
row.add(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XmlPullParser.END_TAG:
|
||||
if (parser.getName().equalsIgnoreCase("row") && v != null) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
event = parser.next();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
public static boolean writeXLS(String path, List<Object> table) {
|
||||
File file = createXLS(path);
|
||||
|
||||
if (file == null) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
try {
|
||||
return addData(file, table);
|
||||
} catch (RowsExceededException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
|
||||
} catch (WriteException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static File createXLS(String path) {
|
||||
|
||||
File file = null;
|
||||
|
||||
try {
|
||||
file = new File(path);
|
||||
if (file.exists())
|
||||
return file;
|
||||
WritableWorkbook book = Workbook.createWorkbook(file);
|
||||
WritableSheet sheet = book.createSheet("sheet1", 0);
|
||||
|
||||
book.write();
|
||||
book.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean addData(File file, List<Object> table)
|
||||
throws IOException, RowsExceededException, WriteException {
|
||||
|
||||
Workbook wb = null;
|
||||
try {
|
||||
wb = Workbook.getWorkbook(file);
|
||||
} catch (BiffException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
WritableWorkbook book = Workbook.createWorkbook(file, wb);
|
||||
WritableSheet sheet = book.getSheet(0);
|
||||
// List<String> attrs = table;
|
||||
int i = sheet.getRows();
|
||||
for (int j = 0; j < table.size(); j++) {
|
||||
List<String> attrs = (List<String>) table.get(j);
|
||||
for (int attr = 0; attr < attrs.size(); attr++) {
|
||||
Label label = new Label(attr, i + j, attrs.get(attr));
|
||||
sheet.addCell(label);
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* for (int attr = 0; attr < attrs.size(); attr++) { Label label = new
|
||||
* Label(attr, i, attrs.get(attr)); sheet.addCell(label); }
|
||||
*/
|
||||
|
||||
book.write();
|
||||
book.close();
|
||||
wb.close();
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public static final int CREATE_FAIL = -1;
|
||||
public static final int ADD_DATA_FAIL = -2;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.example.uhf.fragment;
|
||||
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2015-03-10.
|
||||
*/
|
||||
public class KeyDwonFragment extends Fragment {
|
||||
|
||||
public void myOnKeyDwon() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,211 @@
|
||||
package com.example.uhf.fragment;
|
||||
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
|
||||
import com.example.uhf.R;
|
||||
import com.example.uhf.activity.UHFMainActivity;
|
||||
import com.example.uhf.tools.UIHelper;
|
||||
import com.rscja.deviceapi.entity.UHFTAGInfo;
|
||||
import com.rscja.deviceapi.interfaces.IUHF;
|
||||
|
||||
import static com.example.uhf.R.id.etPtr_filterK;
|
||||
|
||||
|
||||
public class UHFKillFragment extends KeyDwonFragment implements OnClickListener {
|
||||
|
||||
private static final String TAG = "UHFKillFragment";
|
||||
private UHFMainActivity mContext;
|
||||
|
||||
private EditText EtTagUii_Write;
|
||||
private EditText EtAccessPwd_Kill;
|
||||
private EditText etLen_Read;
|
||||
private EditText etData_filter;
|
||||
private EditText etPtr_Read;
|
||||
|
||||
private Button BtUii_Kill;
|
||||
private Button btnKill;
|
||||
private CheckBox CkWithUii_Kill;
|
||||
|
||||
private RadioButton rbEPC_filter;
|
||||
private RadioButton rbTID_filter;
|
||||
private RadioButton rbUser_filter;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.uhf_kill_fragment, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
mContext = (UHFMainActivity) getActivity();
|
||||
etPtr_Read = (EditText) getView().findViewById(etPtr_filterK);
|
||||
etLen_Read = (EditText) getView().findViewById(R.id.etLen_filterK);
|
||||
etData_filter = (EditText) getView().findViewById(R.id.etData_filterK);
|
||||
EtAccessPwd_Kill = (EditText) getView().findViewById(R.id.EtAccessPwd_Kill);
|
||||
|
||||
CkWithUii_Kill = (CheckBox) getView().findViewById(R.id.CkWithUii_Kill);
|
||||
btnKill = (Button) getView().findViewById(R.id.btnKill);
|
||||
|
||||
rbEPC_filter = (RadioButton) getView().findViewById(R.id.rbEPC_filterK);
|
||||
rbTID_filter = (RadioButton) getView().findViewById(R.id.rbTID_filterK);
|
||||
rbUser_filter = (RadioButton) getView().findViewById(R.id.rbUser_filterK);
|
||||
|
||||
btnKill.setOnClickListener(new btnKillOnClickListener());
|
||||
rbEPC_filter.setOnClickListener(this);
|
||||
rbTID_filter.setOnClickListener(this);
|
||||
rbUser_filter.setOnClickListener(this);
|
||||
}
|
||||
|
||||
public class BtUii_WriteClickListener implements OnClickListener {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
UHFTAGInfo uiiStr = mContext.mReader.inventorySingleTag();
|
||||
|
||||
if (uiiStr != null) {
|
||||
EtTagUii_Write.setText(uiiStr.getEPC());
|
||||
} else {
|
||||
EtTagUii_Write.setText("");
|
||||
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_read_tag_fail);
|
||||
// mContext.playSound(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.rbEPC_filter:
|
||||
if (rbEPC_filter.isChecked()) {
|
||||
etPtr_Read.setText("32");
|
||||
}
|
||||
break;
|
||||
case R.id.rbTID_filter:
|
||||
if (rbTID_filter.isChecked()) {
|
||||
etPtr_Read.setText("0");
|
||||
}
|
||||
break;
|
||||
case R.id.rbUser_filter:
|
||||
if (rbUser_filter.isChecked()) {
|
||||
etPtr_Read.setText("0");
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class btnKillOnClickListener implements OnClickListener {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
String strPWD = EtAccessPwd_Kill.getText().toString().trim();// 访问密码
|
||||
|
||||
if (!TextUtils.isEmpty(strPWD)) {
|
||||
if (strPWD.length() != 8) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_addr_must_len8);
|
||||
return;
|
||||
} else if (!mContext.vailHexInput(strPWD)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nohex);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nopwd);
|
||||
return;
|
||||
}
|
||||
|
||||
if (CkWithUii_Kill.isChecked())// 指定标签
|
||||
{
|
||||
|
||||
if (etPtr_Read.getText().toString() == null || etPtr_Read.getText().toString().isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "过滤数据的起始地址不能为空");
|
||||
return;
|
||||
}
|
||||
if (etData_filter.getText().toString() == null || etData_filter.getText().toString().isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "过滤数据不能为空");
|
||||
return;
|
||||
}
|
||||
if (etLen_Read.getText().toString() == null || etLen_Read.getText().toString().isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "过滤数据长度不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
int filterPtr = Integer.parseInt(etPtr_Read.getText().toString());
|
||||
String filterData = etData_filter.getText().toString();
|
||||
int filterCnt = Integer.parseInt(etLen_Read.getText().toString());
|
||||
int filterBank = 0;
|
||||
if (rbEPC_filter.isChecked()) {
|
||||
filterBank = IUHF.Bank_EPC;
|
||||
} else if (rbTID_filter.isChecked()) {
|
||||
filterBank = IUHF.Bank_TID;
|
||||
} else if (rbUser_filter.isChecked()) {
|
||||
filterBank = IUHF.Bank_USER;
|
||||
|
||||
}
|
||||
|
||||
String strUII = EtTagUii_Write.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(strUII)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_tag_must_not_null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mContext.mReader.killTag(strPWD, filterBank, filterPtr, filterCnt, filterData)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_kill_succ);
|
||||
mContext.playSound(1);
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_kill_fail);
|
||||
mContext.playSound(2);
|
||||
}
|
||||
|
||||
} else {
|
||||
Boolean strKillUII = mContext.mReader.killTag(strPWD);
|
||||
if (strKillUII) {
|
||||
UIHelper.ToastMessage(mContext, strKillUII + " " + getString(R.string.rfid_mgs_kill_succ));
|
||||
mContext.playSound(1);
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_kill_fail);
|
||||
// mContext.playSound(2);
|
||||
mContext.playSound(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CkWithUii_WriteCheckedChangedListener implements OnCheckedChangeListener {
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// TODO Auto-generated method stub
|
||||
EtTagUii_Write.setText("");
|
||||
|
||||
if (isChecked) {
|
||||
BtUii_Kill.setBackgroundResource(R.drawable.button_bg);
|
||||
BtUii_Kill.setEnabled(true);
|
||||
// BtUii_Write.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
BtUii_Kill.setBackgroundResource(R.drawable.button_bg_gray);
|
||||
BtUii_Kill.setEnabled(false);
|
||||
// BtUii_Write.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,304 @@
|
||||
package com.example.uhf.fragment;
|
||||
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
|
||||
import com.example.uhf.R;
|
||||
import com.example.uhf.activity.UHFMainActivity;
|
||||
import com.example.uhf.tools.UIHelper;
|
||||
import com.rscja.deviceapi.interfaces.IUHF;
|
||||
|
||||
|
||||
public class UHFLockFragment extends KeyDwonFragment implements OnClickListener {
|
||||
|
||||
private static final String TAG = "UHFLockFragment";
|
||||
private UHFMainActivity mContext;
|
||||
|
||||
private EditText EtAccessPwd_Lock;
|
||||
private EditText etLockCode;
|
||||
private EditText etPtr_filter_lock;
|
||||
private EditText etLen_filter_lock;
|
||||
private EditText etData_filter_lock;
|
||||
|
||||
private Button btnLock;
|
||||
private CheckBox cb_filter_lock;
|
||||
|
||||
private RadioButton rbEPC_filter_lock;
|
||||
private RadioButton rbTID_filter_lock;
|
||||
private RadioButton rbUser_filter_lock;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.uhf_lock_fragment, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
mContext = (UHFMainActivity) getActivity();
|
||||
|
||||
etLockCode = (EditText) getView().findViewById(R.id.etLockCode);
|
||||
EtAccessPwd_Lock = (EditText) getView().findViewById(R.id.EtAccessPwd_Lock);
|
||||
etPtr_filter_lock = (EditText) getView().findViewById(R.id.etPtr_filter_lock);
|
||||
etLen_filter_lock = (EditText) getView().findViewById(R.id.etLen_filter_lock);
|
||||
etData_filter_lock = (EditText) getView().findViewById(R.id.etData_filter_lock);
|
||||
|
||||
btnLock = (Button) getView().findViewById(R.id.btnLock);
|
||||
cb_filter_lock = (CheckBox) getView().findViewById(R.id.cb_filter_lock);
|
||||
|
||||
rbEPC_filter_lock = (RadioButton) getView().findViewById(R.id.rbEPC_filter_lock);
|
||||
rbTID_filter_lock = (RadioButton) getView().findViewById(R.id.rbTID_filter_lock);
|
||||
rbUser_filter_lock = (RadioButton) getView().findViewById(R.id.rbUser_filter_lock);
|
||||
|
||||
rbEPC_filter_lock.setOnClickListener(this);
|
||||
rbTID_filter_lock.setOnClickListener(this);
|
||||
rbUser_filter_lock.setOnClickListener(this);
|
||||
|
||||
cb_filter_lock.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
String data = etData_filter_lock.getText().toString().trim();
|
||||
String rex = "[\\da-fA-F]*"; //匹配正则表达式,数据为十六进制格式
|
||||
if (data == null || data.isEmpty() || !data.matches(rex)) {
|
||||
UIHelper.ToastMessage(mContext, "过滤的数据必须是十六进制数据");
|
||||
cb_filter_lock.setChecked(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
etLockCode.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
|
||||
builder.setTitle(R.string.tvLockCode);
|
||||
final View vv = LayoutInflater.from(mContext).inflate(R.layout.uhf_dialog_lock_code, null);
|
||||
builder.setView(vv);
|
||||
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
dialogInterface.dismiss();
|
||||
etLockCode.getText().clear();
|
||||
}
|
||||
});
|
||||
|
||||
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
RadioButton rbOpen = (RadioButton) vv.findViewById(R.id.rbOpen);
|
||||
RadioButton rbLock = (RadioButton) vv.findViewById(R.id.rbLock);
|
||||
CheckBox cbPerm = (CheckBox) vv.findViewById(R.id.cbPerm);
|
||||
|
||||
CheckBox cbKill = (CheckBox) vv.findViewById(R.id.cbKill);
|
||||
CheckBox cbAccess = (CheckBox) vv.findViewById(R.id.cbAccess);
|
||||
CheckBox cbEPC = (CheckBox) vv.findViewById(R.id.cbEPC);
|
||||
CheckBox cbTid = (CheckBox) vv.findViewById(R.id.cbTid);
|
||||
CheckBox cbUser = (CheckBox) vv.findViewById(R.id.cbUser);
|
||||
String mask = "";
|
||||
String value = "";
|
||||
int[] data = new int[20];
|
||||
if (cbUser.isChecked()) {
|
||||
data[11] = 1;
|
||||
if (cbPerm.isChecked()) {
|
||||
data[0] = 1;
|
||||
data[10] = 1;
|
||||
}
|
||||
if (rbLock.isChecked()) {
|
||||
data[1] = 1;
|
||||
}
|
||||
}
|
||||
if (cbTid.isChecked()) {
|
||||
data[13] = 1;
|
||||
if (cbPerm.isChecked()) {
|
||||
data[12] = 1;
|
||||
data[2] = 1;
|
||||
}
|
||||
if (rbLock.isChecked()) {
|
||||
data[3] = 1;
|
||||
}
|
||||
}
|
||||
if (cbEPC.isChecked()) {
|
||||
data[15] = 1;
|
||||
if (cbPerm.isChecked()) {
|
||||
data[14] = 1;
|
||||
data[4] = 1;
|
||||
}
|
||||
if (rbLock.isChecked()) {
|
||||
data[5] = 1;
|
||||
}
|
||||
}
|
||||
if (cbAccess.isChecked()) {
|
||||
data[17] = 1;
|
||||
if (cbPerm.isChecked()) {
|
||||
data[16] = 1;
|
||||
data[6] = 1;
|
||||
}
|
||||
if (rbLock.isChecked()) {
|
||||
data[7] = 1;
|
||||
}
|
||||
}
|
||||
if (cbKill.isChecked()) {
|
||||
data[19] = 1;
|
||||
if (cbPerm.isChecked()) {
|
||||
data[18] = 1;
|
||||
data[8] = 1;
|
||||
}
|
||||
if (rbLock.isChecked()) {
|
||||
data[9] = 1;
|
||||
}
|
||||
}
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("0000");
|
||||
for (int k = data.length - 1; k >= 0; k--) {
|
||||
stringBuffer.append(data[k] + "");
|
||||
}
|
||||
|
||||
String code = binaryString2hexString(stringBuffer.toString());
|
||||
Log.i(UHFMainActivity.TAG, " tempCode=" + stringBuffer.toString() + " code=" + code);
|
||||
|
||||
etLockCode.setText(code.replace(" ", "0") + "");
|
||||
}
|
||||
});
|
||||
builder.create().show();
|
||||
}
|
||||
});
|
||||
|
||||
// etLockCode.setOnClickListener(new OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View view) {
|
||||
// AlertDialog.Builder builder= new AlertDialog.Builder(mContext);
|
||||
//
|
||||
// builder.setTitle(R.string.tvLockCode);
|
||||
// builder.create().show();
|
||||
// }
|
||||
// });
|
||||
|
||||
btnLock.setOnClickListener(new btnLockOnClickListener());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.rbEPC_filter_lock:
|
||||
etPtr_filter_lock.setText("32");
|
||||
break;
|
||||
case R.id.rbTID_filter_lock:
|
||||
etPtr_filter_lock.setText("0");
|
||||
break;
|
||||
case R.id.rbUser_filter_lock:
|
||||
etPtr_filter_lock.setText("0");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public class btnLockOnClickListener implements OnClickListener {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
String strPWD = EtAccessPwd_Lock.getText().toString().trim();// 访问密码
|
||||
String strLockCode = etLockCode.getText().toString().trim();
|
||||
|
||||
if (!TextUtils.isEmpty(strPWD)) {
|
||||
if (strPWD.length() != 8) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_addr_must_len8);
|
||||
return;
|
||||
} else if (!mContext.vailHexInput(strPWD)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nohex);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nopwd);
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(strLockCode)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nolockcode);
|
||||
return;
|
||||
}
|
||||
boolean result = false;
|
||||
if (cb_filter_lock.isChecked()) {
|
||||
String filterData = etData_filter_lock.getText().toString();
|
||||
if (filterData == null || filterData.isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "过滤数据不能为空!");
|
||||
return;
|
||||
}
|
||||
if (etPtr_filter_lock.getText().toString() == null || etPtr_filter_lock.getText().toString().isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "过滤起始地址不能为空");
|
||||
return;
|
||||
}
|
||||
if (etLen_filter_lock.getText().toString() == null || etLen_filter_lock.getText().toString().isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "过滤数据长度不能为空");
|
||||
return;
|
||||
}
|
||||
int filterPtr = Integer.parseInt(etPtr_filter_lock.getText().toString());
|
||||
int filterCnt = Integer.parseInt(etLen_filter_lock.getText().toString());
|
||||
int filterBank = 0;
|
||||
if (rbEPC_filter_lock.isChecked()) {
|
||||
filterBank = IUHF.Bank_EPC;
|
||||
} else if (rbTID_filter_lock.isChecked()) {
|
||||
filterBank = IUHF.Bank_TID;
|
||||
} else if (rbUser_filter_lock.isChecked()) {
|
||||
filterBank = IUHF.Bank_USER;
|
||||
}
|
||||
|
||||
if (mContext.mReader.lockMem(strPWD,
|
||||
filterBank,
|
||||
filterPtr,
|
||||
filterCnt,
|
||||
filterData,
|
||||
strLockCode)) {
|
||||
result = true;
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_lock_succ);
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_lock_fail);
|
||||
}
|
||||
} else {
|
||||
if (mContext.mReader.lockMem(strPWD, strLockCode)) {
|
||||
result = true;
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_lock_succ);
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_lock_fail);
|
||||
}
|
||||
}
|
||||
if (!result) {
|
||||
mContext.playSound(2);
|
||||
} else {
|
||||
mContext.playSound(1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static String binaryString2hexString(String bString) {
|
||||
if (bString == null || bString.equals("") || bString.length() % 8 != 0)
|
||||
return null;
|
||||
StringBuffer tmp = new StringBuffer();
|
||||
int iTmp = 0;
|
||||
for (int i = 0; i < bString.length(); i += 4) {
|
||||
iTmp = 0;
|
||||
for (int j = 0; j < 4; j++) {
|
||||
iTmp += Integer.parseInt(bString.substring(i + j, i + j + 1)) << (4 - j - 1);
|
||||
}
|
||||
tmp.append(Integer.toHexString(iTmp));
|
||||
}
|
||||
return tmp.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,454 @@
|
||||
package com.example.uhf.fragment;
|
||||
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RadioGroup.OnCheckedChangeListener;
|
||||
import android.widget.SimpleAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.uhf.R;
|
||||
import com.example.uhf.activity.UHFMainActivity;
|
||||
import com.example.uhf.tools.StringUtils;
|
||||
import com.example.uhf.tools.UIHelper;
|
||||
import com.rscja.deviceapi.entity.UHFTAGInfo;
|
||||
import com.rscja.deviceapi.interfaces.IUHF;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
public class UHFReadTagFragment extends KeyDwonFragment {
|
||||
|
||||
private boolean loopFlag = false;
|
||||
private int inventoryFlag = 1;
|
||||
private Handler handler;
|
||||
private ArrayList<HashMap<String, String>> tagList;
|
||||
private SimpleAdapter adapter;
|
||||
|
||||
private TextView tv_count;
|
||||
|
||||
private RadioGroup RgInventory;
|
||||
private RadioButton RbInventorySingle;
|
||||
private RadioButton RbInventoryLoop;
|
||||
|
||||
private Button BtClear;
|
||||
private Button Btimport;
|
||||
private Button BtInventory;
|
||||
private Button btnFilter;//过滤
|
||||
|
||||
private ListView LvTags;
|
||||
private LinearLayout llContinuous;
|
||||
private UHFMainActivity mContext;
|
||||
private HashMap<String, String> map;
|
||||
private PopupWindow popFilter;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
Log.i(UHFMainActivity.TAG, "UHFReadTagFragment.onCreateView");
|
||||
return inflater.inflate(R.layout.uhf_readtag_fragment, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
Log.i(UHFMainActivity.TAG, "UHFReadTagFragment.onActivityCreated");
|
||||
|
||||
String tr = "";
|
||||
mContext = (UHFMainActivity) getActivity();
|
||||
tagList = new ArrayList<HashMap<String, String>>();
|
||||
|
||||
BtClear = (Button) getView().findViewById(R.id.BtClear);
|
||||
Btimport = (Button) getView().findViewById(R.id.BtImport);
|
||||
tv_count = (TextView) getView().findViewById(R.id.tv_count);
|
||||
RgInventory = (RadioGroup) getView().findViewById(R.id.RgInventory);
|
||||
RbInventorySingle = (RadioButton) getView().findViewById(R.id.RbInventorySingle);
|
||||
RbInventoryLoop = (RadioButton) getView().findViewById(R.id.RbInventoryLoop);
|
||||
BtInventory = (Button) getView().findViewById(R.id.BtInventory);
|
||||
LvTags = (ListView) getView().findViewById(R.id.LvTags);
|
||||
llContinuous = (LinearLayout) getView().findViewById(R.id.llContinuous);
|
||||
|
||||
adapter = new SimpleAdapter(mContext, tagList, R.layout.listtag_items,
|
||||
new String[]{"tagUii", "tagLen", "tagCount", "tagRssi"},
|
||||
new int[]{R.id.TvTagUii, R.id.TvTagLen, R.id.TvTagCount,
|
||||
R.id.TvTagRssi});
|
||||
|
||||
BtClear.setOnClickListener(new BtClearClickListener());
|
||||
Btimport.setOnClickListener(new BtImportClickListener());
|
||||
RgInventory.setOnCheckedChangeListener(new RgInventoryCheckedListener());
|
||||
BtInventory.setOnClickListener(new BtInventoryClickListener());
|
||||
btnFilter = (Button) getView().findViewById(R.id.btnFilter);
|
||||
|
||||
btnFilter.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (popFilter == null) {
|
||||
View viewPop = LayoutInflater.from(mContext).inflate(R.layout.popwindow_filter, null);
|
||||
|
||||
popFilter = new PopupWindow(viewPop, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT, true);
|
||||
|
||||
popFilter.setTouchable(true);
|
||||
popFilter.setOutsideTouchable(true);
|
||||
popFilter.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
popFilter.setBackgroundDrawable(new BitmapDrawable());
|
||||
|
||||
final EditText etLen = (EditText) viewPop.findViewById(R.id.etLen);
|
||||
final EditText etPtr = (EditText) viewPop.findViewById(R.id.etPtr);
|
||||
final EditText etData = (EditText) viewPop.findViewById(R.id.etData);
|
||||
final RadioButton rbEPC = (RadioButton) viewPop.findViewById(R.id.rbEPC);
|
||||
final RadioButton rbTID = (RadioButton) viewPop.findViewById(R.id.rbTID);
|
||||
final RadioButton rbUser = (RadioButton) viewPop.findViewById(R.id.rbUser);
|
||||
final Button btSet = (Button) viewPop.findViewById(R.id.btSet);
|
||||
|
||||
btSet.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int filterBank = 0;
|
||||
if (rbEPC.isChecked()) {
|
||||
filterBank = IUHF.Bank_EPC;
|
||||
} else if (rbTID.isChecked()) {
|
||||
filterBank = IUHF.Bank_TID;
|
||||
} else if (rbUser.isChecked()) {
|
||||
filterBank = IUHF.Bank_USER;
|
||||
}
|
||||
if (etLen.getText().toString() == null || etLen.getText().toString().isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "数据长度不能为空");
|
||||
return;
|
||||
}
|
||||
if (etPtr.getText().toString() == null || etPtr.getText().toString().isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "起始地址不能为空");
|
||||
return;
|
||||
}
|
||||
int ptr = StringUtils.toInt(etPtr.getText().toString(), 0);
|
||||
int len = StringUtils.toInt(etLen.getText().toString(), 0);
|
||||
String data = etData.getText().toString().trim();
|
||||
if (len > 0) {
|
||||
String rex = "[\\da-fA-F]*"; //匹配正则表达式,数据为十六进制格式
|
||||
if (data == null || data.isEmpty() || !data.matches(rex)) {
|
||||
UIHelper.ToastMessage(mContext, "过滤的数据必须是十六进制数据");
|
||||
// mContext.playSound(2);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mContext.mReader.setFilter(filterBank, ptr, len, data)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_filter_succ);
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_filter_fail);
|
||||
// mContext.playSound(2);
|
||||
}
|
||||
} else {
|
||||
//禁用过滤
|
||||
String dataStr = "";
|
||||
if (mContext.mReader.setFilter(filterBank, 0, 0, dataStr)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.msg_disable_succ);
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.msg_disable_fail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
CheckBox cb_filter = (CheckBox) viewPop.findViewById(R.id.cb_filter);
|
||||
rbEPC.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (rbEPC.isChecked()) {
|
||||
etPtr.setText("32");
|
||||
}
|
||||
}
|
||||
});
|
||||
rbTID.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (rbTID.isChecked()) {
|
||||
etPtr.setText("0");
|
||||
}
|
||||
}
|
||||
});
|
||||
rbUser.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (rbUser.isChecked()) {
|
||||
etPtr.setText("0");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
cb_filter.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) { //启用过滤
|
||||
|
||||
} else { //禁用过滤
|
||||
|
||||
}
|
||||
popFilter.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (popFilter.isShowing()) {
|
||||
popFilter.dismiss();
|
||||
popFilter = null;
|
||||
} else {
|
||||
popFilter.showAsDropDown(view);
|
||||
}
|
||||
}
|
||||
});
|
||||
LvTags.setAdapter(adapter);
|
||||
clearData();
|
||||
Log.i(UHFMainActivity.TAG, "UHFReadTagFragment.EtCountOfTags=" + tv_count.getText());
|
||||
handler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
String result = msg.obj + "";
|
||||
String[] strs = result.split("@");
|
||||
addEPCToList(strs[0], strs[1]);
|
||||
mContext.playSound(1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
Log.i(UHFMainActivity.TAG, "UHFReadTagFragment.onPause");
|
||||
super.onPause();
|
||||
|
||||
// 停止识别
|
||||
stopInventory();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加EPC到列表中
|
||||
*
|
||||
* @param epc
|
||||
*/
|
||||
private void addEPCToList(String epc, String rssi) {
|
||||
if (!TextUtils.isEmpty(epc)) {
|
||||
int index = checkIsExist(epc);
|
||||
|
||||
map = new HashMap<String, String>();
|
||||
|
||||
map.put("tagUii", epc);
|
||||
map.put("tagCount", String.valueOf(1));
|
||||
map.put("tagRssi", rssi);
|
||||
|
||||
// mContext.getAppContext().uhfQueue.offer(epc + "\t 1");
|
||||
|
||||
if (index == -1) {
|
||||
tagList.add(map);
|
||||
LvTags.setAdapter(adapter);
|
||||
tv_count.setText("" + adapter.getCount());
|
||||
} else {
|
||||
int tagcount = Integer.parseInt(tagList.get(index).get("tagCount"), 10) + 1;
|
||||
|
||||
map.put("tagCount", String.valueOf(tagcount));
|
||||
tagList.set(index, map);
|
||||
|
||||
}
|
||||
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public class BtClearClickListener implements OnClickListener {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
clearData();
|
||||
}
|
||||
}
|
||||
|
||||
public class BtImportClickListener implements OnClickListener {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
if (BtInventory.getText().equals(mContext.getString(R.string.btInventory))) {
|
||||
if (tagList.size() == 0) {
|
||||
|
||||
UIHelper.ToastMessage(mContext, "无数据导出");
|
||||
return;
|
||||
}
|
||||
boolean re = FileImport.daochu("", tagList);
|
||||
if (re) {
|
||||
UIHelper.ToastMessage(mContext, "导出成功");
|
||||
|
||||
tv_count.setText("0");
|
||||
tagList.clear();
|
||||
|
||||
Log.i(UHFMainActivity.TAG, "tagList.size " + tagList.size());
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, "请停止扫描后再导出");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void clearData() {
|
||||
tv_count.setText("0");
|
||||
tagList.clear();
|
||||
|
||||
Log.i(UHFMainActivity.TAG, "tagList.size " + tagList.size());
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public class RgInventoryCheckedListener implements OnCheckedChangeListener {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
llContinuous.setVisibility(View.GONE);
|
||||
if (checkedId == RbInventorySingle.getId()) {
|
||||
// 单步识别
|
||||
inventoryFlag = 0;
|
||||
} else if (checkedId == RbInventoryLoop.getId()) {
|
||||
// 单标签循环识别
|
||||
inventoryFlag = 1;
|
||||
llContinuous.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BtInventoryClickListener implements OnClickListener {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
readTag();
|
||||
}
|
||||
}
|
||||
|
||||
private void readTag() {
|
||||
if (BtInventory.getText().equals(mContext.getString(R.string.btInventory)))// 识别标签
|
||||
{
|
||||
switch (inventoryFlag) {
|
||||
case 0:// 单步
|
||||
{
|
||||
UHFTAGInfo strUII = mContext.mReader.inventorySingleTag();
|
||||
if (strUII != null) {
|
||||
String strEPC = strUII.getEPC();
|
||||
addEPCToList(strEPC, strUII.getRssi());
|
||||
tv_count.setText("" + adapter.getCount());
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_inventory_fail);
|
||||
// mContext.playSound(2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:// 单标签循环 .startInventoryTag((byte) 0, (byte) 0))
|
||||
{
|
||||
// mContext.mReader.setEPCTIDMode(true);
|
||||
|
||||
if (mContext.mReader.startInventoryTag()) {
|
||||
BtInventory.setText(mContext
|
||||
.getString(R.string.title_stop_Inventory));
|
||||
loopFlag = true;
|
||||
setViewEnabled(false);
|
||||
new TagThread().start();
|
||||
} else {
|
||||
mContext.mReader.stopInventory();
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_inventory_open_fail);
|
||||
// mContext.playSound(2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {// 停止识别
|
||||
stopInventory();
|
||||
}
|
||||
}
|
||||
|
||||
private void setViewEnabled(boolean enabled) {
|
||||
RbInventorySingle.setEnabled(enabled);
|
||||
RbInventoryLoop.setEnabled(enabled);
|
||||
btnFilter.setEnabled(enabled);
|
||||
BtClear.setEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止识别
|
||||
*/
|
||||
private void stopInventory() {
|
||||
if (loopFlag) {
|
||||
loopFlag = false;
|
||||
setViewEnabled(true);
|
||||
if (mContext.mReader.stopInventory()) {
|
||||
BtInventory.setText(mContext.getString(R.string.btInventory));
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_inventory_stop_fail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断EPC是否在列表中
|
||||
*
|
||||
* @param strEPC 索引
|
||||
* @return
|
||||
*/
|
||||
public int checkIsExist(String strEPC) {
|
||||
int existFlag = -1;
|
||||
if (StringUtils.isEmpty(strEPC)) {
|
||||
return existFlag;
|
||||
}
|
||||
String tempStr = "";
|
||||
for (int i = 0; i < tagList.size(); i++) {
|
||||
HashMap<String, String> temp = new HashMap<String, String>();
|
||||
temp = tagList.get(i);
|
||||
tempStr = temp.get("tagUii");
|
||||
if (strEPC.equals(tempStr)) {
|
||||
existFlag = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return existFlag;
|
||||
}
|
||||
|
||||
private class TagThread extends Thread {
|
||||
public void run() {
|
||||
String strTid;
|
||||
String strResult;
|
||||
UHFTAGInfo res = null;
|
||||
while (loopFlag) {
|
||||
res = mContext.mReader.readTagFromBuffer();
|
||||
if (res != null) {
|
||||
strTid = res.getTid();
|
||||
if (strTid.length() != 0 && !strTid.equals("0000000" + "000000000") && !strTid.equals("000000000000000000000000")) {
|
||||
strResult = "TID:" + strTid + "\n";
|
||||
} else {
|
||||
strResult = "";
|
||||
}
|
||||
Log.i(UHFMainActivity.TAG, "EPC:" + res.getEPC() + "|" + strResult);
|
||||
Message msg = handler.obtainMessage();
|
||||
msg.obj = strResult + "EPC:" + res.getEPC() + "@" + res.getRssi();
|
||||
|
||||
handler.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void myOnKeyDwon() {
|
||||
readTag();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,273 @@
|
||||
package com.example.uhf.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import com.example.uhf.R;
|
||||
import com.example.uhf.activity.UHFMainActivity;
|
||||
import com.example.uhf.tools.StringUtils;
|
||||
import com.example.uhf.tools.UIHelper;
|
||||
import com.rscja.deviceapi.interfaces.IUHF;
|
||||
import com.rscja.utility.StringUtility;
|
||||
|
||||
public class UHFWriteFragment extends KeyDwonFragment implements OnClickListener {
|
||||
|
||||
//private static final String TAG = "UHFWriteFragment";
|
||||
private UHFMainActivity mContext;
|
||||
|
||||
private Spinner SpinnerBank_Write;
|
||||
private EditText EtPtr_Write;
|
||||
private EditText EtLen_Write;
|
||||
private EditText EtData_Write;
|
||||
private EditText EtAccessPwd_Write;
|
||||
private EditText etLen_filter_wt;
|
||||
private EditText etPtr_filter_wt;
|
||||
private EditText etData_filter_wt;
|
||||
|
||||
private Button BtWrite;
|
||||
private CheckBox cb_filter_wt, cb_QT_W;
|
||||
|
||||
private RadioButton rbEPC_filter_wt;
|
||||
private RadioButton rbTID_filter_wt;
|
||||
private RadioButton rbUser_filter_wt;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.uhf_write_fragment, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
mContext = (UHFMainActivity) getActivity();
|
||||
SpinnerBank_Write = (Spinner) getView().findViewById(R.id.SpinnerBank_Write);
|
||||
|
||||
EtPtr_Write = (EditText) getView().findViewById(R.id.EtPtr_Write);
|
||||
EtLen_Write = (EditText) getView().findViewById(R.id.EtLen_Write);
|
||||
EtData_Write = (EditText) getView().findViewById(R.id.EtData_Write);
|
||||
EtAccessPwd_Write = (EditText) getView().findViewById(R.id.EtAccessPwd_Write);
|
||||
etLen_filter_wt = (EditText) getView().findViewById(R.id.etLen_filter_wt);
|
||||
etPtr_filter_wt = (EditText) getView().findViewById(R.id.etPtr_filter_wt);
|
||||
etData_filter_wt = (EditText) getView().findViewById(R.id.etData_filter_wt);
|
||||
|
||||
BtWrite = (Button) getView().findViewById(R.id.BtWrite);
|
||||
cb_QT_W = (CheckBox) getView().findViewById(R.id.cb_QT_W);
|
||||
cb_filter_wt = (CheckBox) getView().findViewById(R.id.cb_filter_wt);
|
||||
|
||||
rbEPC_filter_wt = (RadioButton) getView().findViewById(R.id.rbEPC_filter_wt);
|
||||
rbTID_filter_wt = (RadioButton) getView().findViewById(R.id.rbTID_filter_wt);
|
||||
rbUser_filter_wt = (RadioButton) getView().findViewById(R.id.rbUser_filter_wt);
|
||||
|
||||
rbEPC_filter_wt.setOnClickListener(this);
|
||||
rbTID_filter_wt.setOnClickListener(this);
|
||||
rbUser_filter_wt.setOnClickListener(this);
|
||||
BtWrite.setOnClickListener(this);
|
||||
|
||||
cb_filter_wt.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
String data = etData_filter_wt.getText().toString().trim();
|
||||
String rex = "[\\da-fA-F]*"; //匹配正则表达式,数据为十六进制格式
|
||||
if (data == null || data.isEmpty() || !data.matches(rex)) {
|
||||
UIHelper.ToastMessage(mContext, "过滤的数据必须是十六进制数据");
|
||||
cb_filter_wt.setChecked(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
SpinnerBank_Write.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
String element = adapterView.getItemAtPosition(i).toString();// 得到spanner的值
|
||||
if (element.equals("EPC")) {
|
||||
EtPtr_Write.setText("2");
|
||||
} else {
|
||||
EtPtr_Write.setText("0");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.rbEPC_filter_wt:
|
||||
etPtr_filter_wt.setText("32");
|
||||
break;
|
||||
case R.id.rbTID_filter_wt:
|
||||
etPtr_filter_wt.setText("0");
|
||||
break;
|
||||
case R.id.rbUser_filter_wt:
|
||||
etPtr_filter_wt.setText("0");
|
||||
break;
|
||||
case R.id.BtWrite:
|
||||
write();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void write() {
|
||||
String strPtr = EtPtr_Write.getText().toString().trim();
|
||||
if (StringUtils.isEmpty(strPtr)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_addr_not_null);
|
||||
return;
|
||||
} else if (!StringUtility.isDecimal(strPtr)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_addr_must_decimal);
|
||||
return;
|
||||
}
|
||||
|
||||
String strPWD = EtAccessPwd_Write.getText().toString().trim();// 访问密码
|
||||
if (StringUtils.isNotEmpty(strPWD)) {
|
||||
if (strPWD.length() != 8) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_addr_must_len8);
|
||||
return;
|
||||
} else if (!mContext.vailHexInput(strPWD)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nohex);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
strPWD = "00000000";
|
||||
}
|
||||
|
||||
String strData = EtData_Write.getText().toString().trim();// 要写入的内容
|
||||
if (StringUtils.isEmpty(strData)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_write_must_not_null);
|
||||
return;
|
||||
} else if (!mContext.vailHexInput(strData)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nohex);
|
||||
return;
|
||||
}
|
||||
|
||||
// 多字单次
|
||||
String cntStr = EtLen_Write.getText().toString().trim();
|
||||
if (StringUtils.isEmpty(cntStr)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_len_not_null);
|
||||
return;
|
||||
} else if (!StringUtility.isDecimal(cntStr)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_len_must_decimal);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((strData.length()) % 4 != 0) {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_write_must_len4x);
|
||||
|
||||
return;
|
||||
} else if (!mContext.vailHexInput(strData)) {
|
||||
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nohex);
|
||||
return;
|
||||
}
|
||||
|
||||
boolean result = false;
|
||||
int Bank = 0;
|
||||
|
||||
if (SpinnerBank_Write.getSelectedItemPosition() == 0) {
|
||||
Bank = IUHF.Bank_RESERVED;
|
||||
} else if (SpinnerBank_Write.getSelectedItemPosition() == 1) {
|
||||
Bank = IUHF.Bank_EPC;
|
||||
} else if (SpinnerBank_Write.getSelectedItemPosition() == 2) {
|
||||
Bank = IUHF.Bank_TID;
|
||||
} else if (SpinnerBank_Write.getSelectedItemPosition() == 3) {
|
||||
Bank = IUHF.Bank_USER;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (cb_filter_wt.isChecked())// 指定标签
|
||||
{
|
||||
if (etPtr_filter_wt.getText().toString() == null || etPtr_filter_wt.getText().toString().isEmpty()) {
|
||||
etPtr_filter_wt.setText("0");
|
||||
}
|
||||
if (etLen_filter_wt.getText().toString() == null || etLen_filter_wt.getText().toString().isEmpty()) {
|
||||
UIHelper.ToastMessage(mContext, "过滤数据长度不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
int filterPtr = Integer.parseInt(etPtr_filter_wt.getText().toString());
|
||||
String filterData = etData_filter_wt.getText().toString();
|
||||
int filterCnt = Integer.parseInt(etLen_filter_wt.getText().toString());
|
||||
int filterBank = 0;
|
||||
if (rbEPC_filter_wt.isChecked()) {
|
||||
filterBank = IUHF.Bank_EPC;
|
||||
} else if (rbTID_filter_wt.isChecked()) {
|
||||
filterBank = IUHF.Bank_TID;
|
||||
} else if (rbUser_filter_wt.isChecked()) {
|
||||
filterBank = IUHF.Bank_USER;
|
||||
}
|
||||
boolean r = false;
|
||||
if (cb_QT_W.isChecked()) {
|
||||
r = mContext.mReader.writeData(strPWD,
|
||||
filterBank,
|
||||
filterPtr,
|
||||
filterCnt,
|
||||
filterData,
|
||||
Bank,
|
||||
Integer.parseInt(strPtr),
|
||||
Integer.parseInt(cntStr),
|
||||
strData
|
||||
);
|
||||
} else {
|
||||
r = mContext.mReader.writeData(strPWD,
|
||||
filterBank,
|
||||
filterPtr,
|
||||
filterCnt,
|
||||
filterData,
|
||||
Bank,
|
||||
Integer.parseInt(strPtr),
|
||||
Integer.parseInt(cntStr),
|
||||
strData
|
||||
);
|
||||
}
|
||||
|
||||
if (r) {
|
||||
result = true;
|
||||
} else {
|
||||
result = false;
|
||||
}
|
||||
|
||||
} else {
|
||||
boolean r = false;
|
||||
if (cb_QT_W.isChecked()) {
|
||||
r = mContext.mReader.writeData(strPWD,
|
||||
Bank,
|
||||
Integer.parseInt(strPtr),
|
||||
Integer.valueOf(cntStr), strData);
|
||||
} else {
|
||||
r = mContext.mReader.writeData(strPWD,
|
||||
Bank,
|
||||
Integer.parseInt(strPtr),
|
||||
Integer.valueOf(cntStr), strData);// 返回的UII
|
||||
}
|
||||
|
||||
if (r) {
|
||||
result = true;
|
||||
UIHelper.ToastMessage(mContext, getString(R.string.uhf_msg_write_succ));
|
||||
} else {
|
||||
UIHelper.ToastMessage(mContext, R.string.uhf_msg_write_fail);
|
||||
}
|
||||
}
|
||||
if (!result) {
|
||||
mContext.playSound(2);
|
||||
} else {
|
||||
mContext.playSound(1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.example.uhf.tools;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.uhf.R;
|
||||
|
||||
public class UIHelper {
|
||||
|
||||
/**
|
||||
* 弹出Toast消息
|
||||
*
|
||||
* @param msg
|
||||
*/
|
||||
public static void ToastMessage(Context cont, String msg) {
|
||||
Toast.makeText(cont, msg, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
public static void ToastMessage(Context cont, int msg) {
|
||||
Toast.makeText(cont, msg, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
public static void ToastMessage(Context cont, String msg, int time) {
|
||||
Toast.makeText(cont, msg, time).show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示弹出框消息
|
||||
*
|
||||
* @param act
|
||||
* @param titleInt
|
||||
* @param messageInt
|
||||
* @param iconInt
|
||||
*/
|
||||
public static void alert(Activity act, int titleInt, int messageInt,
|
||||
int iconInt) {
|
||||
try {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(act);
|
||||
builder.setTitle(titleInt);
|
||||
builder.setMessage(messageInt);
|
||||
builder.setIcon(iconInt);
|
||||
|
||||
builder.setNegativeButton(R.string.close, new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
builder.create().show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示弹出框消息
|
||||
*
|
||||
* @param act
|
||||
* @param titleInt
|
||||
* @param message
|
||||
* @param iconInt
|
||||
*/
|
||||
public static void alert(Activity act, int titleInt, String message,
|
||||
int iconInt) {
|
||||
try {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(act);
|
||||
builder.setTitle(titleInt);
|
||||
builder.setMessage(message);
|
||||
builder.setIcon(iconInt);
|
||||
|
||||
builder.setNegativeButton(R.string.close, new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
builder.create().show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,58 @@
|
||||
package com.example.uhf.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2021/6/22.
|
||||
*/
|
||||
public class NoScrollViewPager extends LazyViewPager {
|
||||
private boolean noScroll = true;
|
||||
|
||||
public NoScrollViewPager(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public NoScrollViewPager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public void setNoScroll(boolean noScroll) {
|
||||
this.noScroll = noScroll;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scrollTo(int x, int y) {
|
||||
super.scrollTo(x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent arg0) {
|
||||
/* return false;//super.onTouchEvent(arg0); */
|
||||
if (noScroll)
|
||||
return false;
|
||||
else
|
||||
return super.onTouchEvent(arg0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent arg0) {
|
||||
if (noScroll)
|
||||
return false;
|
||||
else
|
||||
return super.onInterceptTouchEvent(arg0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentItem(int item, boolean smoothScroll) {
|
||||
super.setCurrentItem(item, smoothScroll);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentItem(int item) {
|
||||
super.setCurrentItem(item);
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<scale
|
||||
android:fromXScale="0.3"
|
||||
android:toXScale="1.0"
|
||||
android:fromYScale="0.3"
|
||||
android:toYScale="1.0"
|
||||
android:pivotX="0%"
|
||||
android:pivotY="0%"
|
||||
android:duration="@android:integer/config_shortAnimTime" />
|
||||
<alpha
|
||||
android:interpolator="@android:anim/decelerate_interpolator"
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
android:duration="@android:integer/config_shortAnimTime" />
|
||||
</set>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="-100.0%p"
|
||||
android:toXDelta="0.0" />
|
||||
</set>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="0.0"
|
||||
android:toXDelta="-100.0%p" />
|
||||
</set>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="100.0%p"
|
||||
android:toXDelta="0.0" />
|
||||
</set>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="0.0"
|
||||
android:toXDelta="100.0%p" />
|
||||
</set>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<size android:width="10dp"
|
||||
android:height="10dp" />
|
||||
|
||||
<solid android:color="@android:color/transparent" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@android:color/transparent" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:state_pressed="true" android:drawable="@drawable/button_bg_down"></item>
|
||||
<item android:drawable="@drawable/button_bg_up"></item>
|
||||
|
||||
</selector>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:state_pressed="true" android:drawable="@drawable/button_bg_down2"></item>
|
||||
<item android:drawable="@drawable/button_bg_up2"></item>
|
||||
|
||||
</selector>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:state_pressed="true" android:drawable="@drawable/button_bg_down3"></item>
|
||||
<item android:drawable="@drawable/button_bg_up3"></item>
|
||||
|
||||
</selector>
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
|
||||
<padding
|
||||
android:bottom="10dip"
|
||||
android:left="5dip"
|
||||
android:right="5dip"
|
||||
android:top="10dip" />
|
||||
|
||||
<solid android:color="@color/blue2" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/blue2" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
|
||||
<padding
|
||||
android:bottom="10dip"
|
||||
android:left="5dip"
|
||||
android:right="5dip"
|
||||
android:top="10dip" />
|
||||
|
||||
<solid android:color="@color/red5" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/red5" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
|
||||
<padding
|
||||
android:bottom="10dip"
|
||||
android:left="5dip"
|
||||
android:right="5dip"
|
||||
android:top="10dip" />
|
||||
|
||||
<solid android:color="@color/green3" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/green3" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
|
||||
<padding
|
||||
android:bottom="10dip"
|
||||
android:left="5dip"
|
||||
android:right="5dip"
|
||||
android:top="10dip" />
|
||||
|
||||
<solid android:color="@color/gray2" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/gray2" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
|
||||
<padding
|
||||
android:bottom="10dip"
|
||||
android:left="5dip"
|
||||
android:right="5dip"
|
||||
android:top="10dip" />
|
||||
|
||||
<solid android:color="@color/blue1" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/blue1" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
|
||||
<padding
|
||||
android:bottom="10dip"
|
||||
android:left="5dip"
|
||||
android:right="5dip"
|
||||
android:top="10dip" />
|
||||
|
||||
<solid android:color="@color/red4" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/red4" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dip"
|
||||
android:bottomRightRadius="5dip"
|
||||
android:topLeftRadius="5dip"
|
||||
android:topRightRadius="5dip" />
|
||||
|
||||
<padding
|
||||
android:bottom="10dip"
|
||||
android:left="5dip"
|
||||
android:right="5dip"
|
||||
android:top="10dip" />
|
||||
|
||||
<solid android:color="@color/green2" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/green2" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- 设置边框的大小和颜色 -->
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@android:color/darker_gray" />
|
||||
|
||||
<!-- 设置图形内的颜色,此处为透明色 -->
|
||||
<solid android:color="@android:color/transparent" />
|
||||
|
||||
<!-- 定义圆角弧度 圆的话就是半径 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:bottomRightRadius="10dp"
|
||||
android:topLeftRadius="10dp"
|
||||
android:topRightRadius="10dp" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- 设置边框的大小和颜色 -->
|
||||
<stroke
|
||||
android:width="3dip"
|
||||
android:color="@android:color/holo_blue_dark" />
|
||||
|
||||
<!-- 设置图形内的颜色,此处为透明色 -->
|
||||
<solid android:color="@android:color/transparent" />
|
||||
|
||||
<!-- 定义圆角弧度 圆的话就是半径 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:bottomRightRadius="10dp"
|
||||
android:topLeftRadius="10dp"
|
||||
android:topRightRadius="10dp" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:state_focused="true" android:color="@color/blue1"></item>
|
||||
<item android:state_selected="true" android:color="@color/blue1"></item>
|
||||
<item android:state_pressed="true" android:color="@color/blue1"></item>
|
||||
<item android:state_checked="true" android:color="@color/blue1"></item>
|
||||
<item android:color="@color/black1"></item>
|
||||
|
||||
</selector>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:state_focused="true" android:color="@color/blue1"></item>
|
||||
<item android:state_selected="true" android:color="@color/blue1"></item>
|
||||
<item android:state_pressed="true" android:color="@color/blue1"></item>
|
||||
<item android:state_checked="true" android:color="@color/blue1"></item>
|
||||
<item android:color="@color/black"></item>
|
||||
|
||||
</selector>
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="false" android:drawable="@drawable/card_normal" />
|
||||
<item android:state_checked="true" android:drawable="@drawable/card_press" />
|
||||
</selector>
|
||||
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="5dp"
|
||||
android:bottomRightRadius="5dp"/>
|
||||
|
||||
<solid android:color="@color/lightblue2" />
|
||||
|
||||
<padding
|
||||
android:bottom="3dp"
|
||||
android:left="3dp"
|
||||
android:right="3dp"
|
||||
android:top="3dp" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/blue2" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<corners android:radius="5dp" />
|
||||
|
||||
<padding
|
||||
android:bottom="3dip"
|
||||
android:left="3dip"
|
||||
android:right="3dip"
|
||||
android:top="3dip" />
|
||||
|
||||
<solid android:color="@color/white" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/green" />
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:clipToPadding="false"
|
||||
android:fitsSystemWindows="true" >
|
||||
|
||||
<com.example.uhf.widget.NoScrollViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
</com.example.uhf.widget.NoScrollViewPager>
|
||||
<!--
|
||||
<LinearLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"></LinearLayout>
|
||||
-->
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,617 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:background="@drawable/rectangle_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_normal_set"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/blue1"
|
||||
android:padding="5dp"
|
||||
android:text="@string/normal_set"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/gray1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvMode"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/SpinnerMode"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/arrayMode"
|
||||
android:gravity="center_horizontal" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/BtSetFre"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/btSetFre"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/BtGetFre"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/btGetFre"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="3dp"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_power"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spPower"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:entries="@array/arrayPower"
|
||||
android:gravity="center_horizontal" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_dbm" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetPower"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/uhf_btn_setpower"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGetPower"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/uhf_btn_getpower"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_freHop"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/gray1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/freHopType"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_china"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/China"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_Europe"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="@string/Europe"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_America"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:checked="true"
|
||||
android:text="@string/America"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
android:textSize="15sp"
|
||||
android:onClick="onClick_rbAmerica"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_Others"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="@string/Others"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
android:textSize="15sp"
|
||||
android:onClick="onClick_rbOthers" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvFreHop"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spFreHop"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/arrayFreHop_us"
|
||||
android:gravity="center_horizontal" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetFreHop"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/btSetFreHop"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:background="@drawable/rectangle_bg2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/green2"
|
||||
android:padding="5dp"
|
||||
android:text="@string/R2000_set"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/gray1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/title_work_time"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_worktime"
|
||||
android:layout_width="80dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:hint="0"
|
||||
android:inputType="number"
|
||||
android:singleLine="true"
|
||||
android:text="10"
|
||||
android:textColor="@color/red1"
|
||||
android:textSize="15sp"></EditText>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ms"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="@string/title_wait_time"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_waittime"
|
||||
android:layout_width="80dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:hint="0"
|
||||
android:inputType="number"
|
||||
android:singleLine="true"
|
||||
android:text="10"
|
||||
android:textColor="@color/red1"
|
||||
android:textSize="15sp"></EditText>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ms"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnWorkWait"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/uhf_btn_workwait"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGetWait"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/uhf_btn_get_workwait"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvProtocol"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/SpinnerAgreement"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/arrayProtocol" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetAgreement"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/btSetProtocol"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/gray1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_link"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/splinkParams"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:entries="@array/arrayLink" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetLinkParams"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/uhf_btn_setLinkParams"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGetLinkParams"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/uhf_btn_getLinkParams"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbQT"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvQTPublic"
|
||||
android:textColor="@drawable/check_text_color2" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSetQTParams"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/btSetPrar"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGetQTParams"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/btGetPrar"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/gray1"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbTagFocus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/tagFocus"
|
||||
android:textColor="@drawable/check_text_color2" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbFastID"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/fastID"
|
||||
android:textColor="@drawable/check_text_color2" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbEPC_TID"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/EPC_TID"
|
||||
android:textColor="@drawable/check_text_color2" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@color/gray1"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_session"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spsession"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:entries="@array/arraysession" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_inv"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:entries="@array/arrayinv" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
<Button
|
||||
android:id="@+id/btnGetSession"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/btGetSession"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
<Button
|
||||
android:id="@+id/btnSetSession"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg3"
|
||||
android:text="@string/btSetSession"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@ -0,0 +1,13 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.example.uhf.activity.BlankFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
|
||||
</FrameLayout>
|
||||
@ -0,0 +1,197 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:scrollbars="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
<TextView
|
||||
android:background="#AAAAAA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_filter" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/rectangle_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cb_filter_deact"
|
||||
android:text="@string/button_enable"
|
||||
android:textSize="19sp"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPtr_filter_deact"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="32" />
|
||||
<TextView
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长度:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etLen_filter_deact"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="0" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvData_Read" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etData_filter_deact"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=""
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbEPC_filter_deact"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="EPC"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbTID_filter_deact"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="TID"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbUser_filter_deact"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="USER"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Kill Pwd:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtAccessPwd_deactivate"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="00000000"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="命令"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Etcmd"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=""
|
||||
android:text="E003"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_deactivate"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Deactivate /re-activation"
|
||||
android:background="@drawable/button_bg"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@ -0,0 +1,16 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/hello_world" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textSize="16sp" />
|
||||
@ -0,0 +1,39 @@
|
||||
<?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"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="2dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TvTagUii"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingBottom="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TvTagLen"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TvTagCount"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingBottom="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TvTagRssi"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingBottom="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,179 @@
|
||||
<?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="wrap_content"
|
||||
android:background="@drawable/rectangle_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPtr"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="32" />
|
||||
<TextView
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长度" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etLen"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="0" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvData_Read" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etData"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=""
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbEPC"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="EPC"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbTID"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="TID"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbUser"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="USER"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
<RadioButton
|
||||
android:visibility="gone"
|
||||
android:id="@+id/rbRESERVED"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="RESERVED"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:gravity="right"
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_msg_r2000_tip" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDisable"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/button_disable"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnOk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/button_bg"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/button_enable"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<CheckBox
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cb_filter"
|
||||
android:text="@string/button_enable"
|
||||
android:textSize="19sp"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="10dp"/>
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设置"
|
||||
android:id="@+id/btSet"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,39 @@
|
||||
<?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"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="20dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btSetFre"
|
||||
android:textColor="@color/blue1"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_dismissDialog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/close" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/blue1" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listView_frequency"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
</ListView>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,66 @@
|
||||
<?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"
|
||||
android:gravity="left"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/rgFileType"
|
||||
android:gravity="left"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbOpen"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/uhf_title_open" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbLock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_lock" />
|
||||
<CheckBox
|
||||
android:id="@+id/cbPerm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_perm" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_kill"
|
||||
android:id="@+id/cbKill" />
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_access"
|
||||
android:id="@+id/cbAccess" />
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="EPC:"
|
||||
android:id="@+id/cbEPC" />
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_tid"
|
||||
android:id="@+id/cbTid" />
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_user"
|
||||
android:id="@+id/cbUser" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:scrollbars="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/rectangle_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/CkWithUii_Kill"
|
||||
android:text="@string/button_enable"
|
||||
android:textSize="19sp"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPtr_filterK"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="32" />
|
||||
<TextView
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长度:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etLen_filterK"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="0" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvData_Read" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etData_filterK"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=""
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbEPC_filterK"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="EPC"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbTID_filterK"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="TID"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbUser_filterK"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="USER"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/gray1"
|
||||
android:layout_marginTop="5dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvAccessPwd"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtAccessPwd_Kill"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/rfid_mgs_killpwdtip"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnKill"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_msg_tab_kill"
|
||||
android:background="@drawable/button_bg"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:scrollbars="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp" >
|
||||
<TextView
|
||||
android:background="#AAAAAA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_filter" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/rectangle_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cb_filter_lock"
|
||||
android:text="@string/button_enable"
|
||||
android:textSize="19sp"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPtr_filter_lock"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="32" />
|
||||
<TextView
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长度:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etLen_filter_lock"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="0" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvData_Read" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etData_filter_lock"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=""
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbEPC_filter_lock"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="EPC"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbTID_filter_lock"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="TID"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbUser_filter_lock"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="USER"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/tvAccessPwd"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtAccessPwd_Lock"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/rfid_mgs_lockpwdtip"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/tvLockCode"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etLockCode"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="true"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnLock"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_msg_tab_lock"
|
||||
android:background="@drawable/button_bg"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="left"
|
||||
android:text="@string/rfid_mgs_locktip"
|
||||
android:textColor="@color/green"
|
||||
android:padding="5dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@ -0,0 +1,329 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:scrollbars="vertical"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:background="#AAAAAA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_filter" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/rectangle_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cb_filter"
|
||||
android:text="@string/button_enable"
|
||||
android:textSize="19sp"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPtr_filter"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="32" />
|
||||
<TextView
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长度:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etLen_filter"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="0" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvData_Read" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etData_filter"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=""
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbEPC_filter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="EPC"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbTID_filter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="TID"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbUser_filter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="USER"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvBank"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/SpinnerBank_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/arrayBank" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr"
|
||||
android:textSize="16sp" />
|
||||
<EditText
|
||||
android:id="@+id/EtPtr_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="0"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/red1" />
|
||||
<TextView
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(word)" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvLen"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtLen_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="4"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/red1" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(word)" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvAccessPwd"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtAccessPwd_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="00000000" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvOption_Read" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/SpinnerOption_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/arrayOption_Read" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvBank2_Read" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/SpinnerBank2_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/arrayBank" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr2_Read" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtPtr2_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:hint="" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvLen2_Read" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtLen2_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:hint="" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvData_Read"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtData_Read"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=""
|
||||
android:inputType="textMultiLine"
|
||||
android:singleLine="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<CheckBox
|
||||
android:text="QT"
|
||||
android:id="@+id/cb_QT_R"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button
|
||||
android:id="@+id/BtRead"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/btRead"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@ -0,0 +1,212 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/RgInventory"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp" >
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/RbInventorySingle"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/rbInventorySingle"
|
||||
android:textColor="@drawable/check_text_color2"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/RbInventoryLoop"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:checked="true"
|
||||
android:text="@string/rbInventoryLoop"
|
||||
android:textColor="@drawable/check_text_color2"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/gray1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout2"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llContinuous"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnFilter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="@string/uhf_title_filter"
|
||||
android:background="@drawable/button_bg"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="5dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout12"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/BtInventory"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/btInventory"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/BtClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/btClear"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
<Button
|
||||
android:id="@+id/BtImport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/btImport"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!--
|
||||
<LinearLayout
|
||||
android:id="@+id/layout0"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvCountOfTags"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/BtClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/btClear"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:background="@drawable/button_bg"
|
||||
android:layout_marginRight="5dp" />
|
||||
</LinearLayout>
|
||||
-->
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/gray1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout4"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/white"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/tvTagUii"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:text="0"
|
||||
android:textColor="@color/red1"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/tvTagLen"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/tvTagCount"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="RSSI"
|
||||
android:textSize="15sp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/gray1" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/LvTags"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,264 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:scrollbars="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:background="#AAAAAA"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/uhf_title_filter" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/rectangle_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/cb_filter_wt"
|
||||
android:text="@string/button_enable"
|
||||
android:textSize="19sp"
|
||||
android:textColor="@drawable/check_text_color"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPtr_filter_wt"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberSigned"
|
||||
android:text="32" />
|
||||
<TextView
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长度" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etLen_filter_wt"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberSigned"
|
||||
android:text="0" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(bit)" />
|
||||
</LinearLayout>
|
||||
<!--dd-->
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvData_Read" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etData_filter_wt"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=""
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbEPC_filter_wt"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="EPC"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbTID_filter_wt"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="TID"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbUser_filter_wt"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rb_bg"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:gravity="center"
|
||||
android:text="USER"
|
||||
android:textColor="@drawable/check_text_color" />
|
||||
|
||||
</RadioGroup>
|
||||
<!---->
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvBank"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/SpinnerBank_Write"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/arrayBank" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvPtr"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtPtr_Write"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="0"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/red1"
|
||||
android:gravity="center_horizontal" />
|
||||
<TextView
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(word)" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvLen"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtLen_Write"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberSigned"
|
||||
android:text="4"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/red1"
|
||||
android:gravity="center_horizontal" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="(word)" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvAccessPwd"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EtAccessPwd_Write"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="00000000"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tvData_Write"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<!-- text="59428BF857CE66F95BB657615F204E092020433246206E633535202020202020674E56DB2020674E4E94516D674E4E03516B34303030323031353036313031B7" -->
|
||||
<EditText
|
||||
android:id="@+id/EtData_Write"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/inputData"
|
||||
android:text=""
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
<CheckBox
|
||||
android:text="QT"
|
||||
android:id="@+id/cb_QT_W"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<Button
|
||||
android:id="@+id/BtWrite"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/button_bg"
|
||||
android:text="@string/btWrite"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
@ -0,0 +1,42 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.caredemo.MainActivity" >
|
||||
|
||||
<!--
|
||||
<item
|
||||
android:id="@+id/action_scan"
|
||||
android:actionViewClass="android.widget.Tab"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="always"
|
||||
android:title="@string/uhf_msg_tab_scan"/>
|
||||
<item
|
||||
android:id="@+id/action_read"
|
||||
android:orderInCategory="100"
|
||||
android:actionViewClass="android.widget.Tab"
|
||||
android:showAsAction="always"
|
||||
android:title="@string/uhf_msg_tab_read"/>
|
||||
<item
|
||||
android:id="@+id/action_write"
|
||||
android:orderInCategory="100"
|
||||
android:actionViewClass="android.widget.Tab"
|
||||
android:showAsAction="always"
|
||||
android:title="@string/uhf_msg_tab_write"/>
|
||||
-->
|
||||
<item
|
||||
android:id="@+id/action_kill"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/uhf_msg_tab_kill"/>
|
||||
<item
|
||||
android:id="@+id/action_lock"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/uhf_msg_tab_lock"/>
|
||||
<item
|
||||
android:id="@+id/action_set"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/uhf_msg_tab_set"/>
|
||||
<item
|
||||
android:id="@+id/UHF_ver"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/action_about"/>
|
||||
|
||||
</menu>
|
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,10 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
|
||||
-->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
|
||||
</resources>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="arrayTagType">
|
||||
<item>S50</item>
|
||||
<item>S70</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="arrayKeyType">
|
||||
<item>A</item>
|
||||
<item>B</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
</resources>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources translatable="false">
|
||||
<string-array name="country_codes" translatable="false">
|
||||
<item>-</item>
|
||||
<item>AR</item>
|
||||
<item>AU</item>
|
||||
<item>BR</item>
|
||||
<item>BG</item>
|
||||
<item>CA</item>
|
||||
<item>CN</item>
|
||||
<item>CZ</item>
|
||||
<item>DE</item>
|
||||
<item>DK</item>
|
||||
<item>ES</item>
|
||||
<item>FI</item>
|
||||
<item>FR</item>
|
||||
<item>GB</item>
|
||||
<item>GR</item>
|
||||
<item>HU</item>
|
||||
<item>ID</item>
|
||||
<item>IT</item>
|
||||
<item>JP</item>
|
||||
<item>KR</item>
|
||||
<item>NL</item>
|
||||
<item>PL</item>
|
||||
<item>PT</item>
|
||||
<item>RU</item>
|
||||
<item>SE</item>
|
||||
<item>SK</item>
|
||||
<item>SI</item>
|
||||
<item>TR</item>
|
||||
<item>TW</item>
|
||||
<item>US</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@ -0,0 +1,8 @@
|
||||
<resources>
|
||||
<declare-styleable name="CardView">
|
||||
<attr name="exampleString" format="string"/>
|
||||
<attr name="exampleDimension" format="dimension"/>
|
||||
<attr name="exampleColor" format="color"/>
|
||||
<attr name="exampleDrawable" format="color|reference"/>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="white1">#eeeeee</color>
|
||||
<color name="black">#000000</color>
|
||||
<color name="black1">#313a4d</color>
|
||||
<color name="gray">#808080</color>
|
||||
<color name="gray1">#dbdbdb</color>
|
||||
<color name="gray2">#ababab</color>
|
||||
<color name="gray3">#ededed</color>
|
||||
<color name="red">#FF0000</color>
|
||||
<color name="red1">#db2627</color>
|
||||
<color name="red2">#db2829</color>
|
||||
<color name="red3">#22FF0000</color>
|
||||
<color name="red4">#88FF0000</color>
|
||||
<color name="red5">#aaFF0000</color>
|
||||
<color name="gold">#FFD700</color>
|
||||
<color name="yellow">#FFFF00</color>
|
||||
<color name="green">#008000</color>
|
||||
<color name="green1">#22008000</color>
|
||||
<color name="green2">#88008000</color>
|
||||
<color name="green3">#aa008000</color>
|
||||
<color name="blue">#0000FF</color>
|
||||
<color name="blue1">#2095ac</color>
|
||||
<color name="blue2">#2398bc</color>
|
||||
<color name="purple">#800080</color>
|
||||
<color name="pink">#FFC0CB</color>
|
||||
<color name="orange">#FFA500</color>
|
||||
<color name="lemonyellow">#FFFACD</color>
|
||||
<color name="graywhite">#F5F5F5</color>
|
||||
<color name="grayslate">#708090</color>
|
||||
<color name="lightblue">#0083FF</color>
|
||||
<color name="lightblue2">#CCCCCC</color>
|
||||
<color name="full_transparent">#00000000</color>
|
||||
<color name="half_transparent">#aa000000</color>
|
||||
|
||||
<color name="listitem_black">#ff000000</color>
|
||||
<color name="listitem_gray">#ff9da19e</color>
|
||||
|
||||
<color name="deep_gray">#ff3f3f3f</color>
|
||||
<color name="text_gray">#ff999999</color>
|
||||
|
||||
|
||||
<color name="sliding_menu_back">#ff2c2c2e</color>
|
||||
<color name="sliding_menu_title_text_color">#ff999999</color>
|
||||
<color name="sliding_menu_item_text_color">#ffb1b1b1</color>
|
||||
<color name="sliding_menu_item_text_color_pressed">#ffffffff</color>
|
||||
<color name="sliding_menu_item_pressed">#ff39393b</color>
|
||||
<color name="sliding_menu_item">#00000000</color>
|
||||
|
||||
<!--zxing start-->
|
||||
<color name="contents_text">#ff000000</color>
|
||||
<color name="encode_view">#ffffffff</color>
|
||||
<color name="help_button_view">#ffcccccc</color>
|
||||
<color name="help_view">#ff404040</color>
|
||||
<color name="possible_result_points">#c0ffff00</color>
|
||||
<color name="result_image_border">#ffffffff</color>
|
||||
<color name="result_minor_text">#ffc0c0c0</color>
|
||||
<color name="result_points">#c000ff00</color>
|
||||
<color name="result_text">#ffffffff</color>
|
||||
<color name="result_view">#b0000000</color>
|
||||
<color name="sbc_header_text">#ff808080</color>
|
||||
<color name="sbc_header_view">#ffffffff</color>
|
||||
<color name="sbc_list_item">#fffff0e0</color>
|
||||
<color name="sbc_layout_view">#ffffffff</color>
|
||||
<color name="sbc_page_number_text">#ff000000</color>
|
||||
<color name="sbc_snippet_text">#ff4b4b4b</color>
|
||||
<color name="share_text">#ff000000</color>
|
||||
<color name="status_text">#ffffffff</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="viewfinder_frame">#ff000000</color>
|
||||
<color name="viewfinder_laser">#ffff0000</color>
|
||||
<color name="viewfinder_mask">#60000000</color>
|
||||
|
||||
<!--zxing end-->
|
||||
|
||||
<string-array name="colors" translatable="false">
|
||||
<item>#99cc00</item>
|
||||
<item>#33b5e5</item>
|
||||
<item>#0099cc</item>
|
||||
<item>#547bca</item>
|
||||
<item>#aa66cc</item>
|
||||
<item>#9933cc</item>
|
||||
<item>#669900</item>
|
||||
<item>#aeb857</item>
|
||||
<item>#cc0000</item>
|
||||
<item>#df5948</item>
|
||||
<item>#ff4444</item>
|
||||
<item>#ae6b23</item>
|
||||
<item>#ff8800</item>
|
||||
<item>#e5ae4f</item>
|
||||
<item>#ffbb33</item>
|
||||
<item>#cccccc</item>
|
||||
<item>#888888</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
</resources>
|
||||
@ -0,0 +1,58 @@
|
||||
<resources>
|
||||
|
||||
<dimen name="standard_padding">8dip</dimen>
|
||||
<dimen name="half_padding">4dip</dimen>
|
||||
|
||||
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
|
||||
<dimen name="text_size_32">32.0dip</dimen>
|
||||
<dimen name="text_size_31">31.0dip</dimen>
|
||||
<dimen name="text_size_30">30.0dip</dimen>
|
||||
<dimen name="text_size_29">29.0dip</dimen>
|
||||
<dimen name="text_size_28">28.0dip</dimen>
|
||||
<dimen name="text_size_27">27.0dip</dimen>
|
||||
<dimen name="text_size_26">26.0dip</dimen>
|
||||
<dimen name="text_size_25">25.0dip</dimen>
|
||||
<dimen name="text_size_24">24.0dip</dimen>
|
||||
<dimen name="text_size_23">23.0dip</dimen>
|
||||
<dimen name="text_size_22">22.0dip</dimen>
|
||||
<dimen name="text_size_21">21.0dip</dimen>
|
||||
<dimen name="text_size_20">20.0dip</dimen>
|
||||
<dimen name="text_size_19">19.0dip</dimen>
|
||||
<dimen name="text_size_18">18.0dip</dimen>
|
||||
<dimen name="text_size_17">17.0dip</dimen>
|
||||
<dimen name="text_size_16">16.0dip</dimen>
|
||||
<dimen name="text_size_15">15.0dip</dimen>
|
||||
<dimen name="text_size_14">14.0dip</dimen>
|
||||
<dimen name="text_size_13">13.0dip</dimen>
|
||||
<dimen name="text_size_12">12.0dip</dimen>
|
||||
<dimen name="text_size_11">11.0dip</dimen>
|
||||
<dimen name="text_size_10">10.0dip</dimen>
|
||||
<dimen name="text_size_9">9.0dip</dimen>
|
||||
<dimen name="text_size_8">8.0dip</dimen>
|
||||
<dimen name="text_size_7">7.0dip</dimen>
|
||||
|
||||
|
||||
<dimen name="slidingmenu_offset">60dp</dimen>
|
||||
<dimen name="list_padding">10dp</dimen>
|
||||
<dimen name="shadow_width">0dp</dimen>
|
||||
|
||||
<integer name="num_cols">1</integer>
|
||||
<dimen name="key_height">50.0dip</dimen>
|
||||
|
||||
|
||||
<dimen name="network_list_address_size">14.0sp</dimen>
|
||||
<dimen name="network_list_channel_width">42.0dip</dimen>
|
||||
<dimen name="network_list_default_size">14.0sp</dimen>
|
||||
<dimen name="network_list_description_size">14.0sp</dimen>
|
||||
<dimen name="network_list_features_size">12.0sp</dimen>
|
||||
<dimen name="network_list_proxy_size">14.0sp</dimen>
|
||||
<dimen name="network_list_small_padding">2.0dip</dimen>
|
||||
<dimen name="network_list_ssid_size">18.0sp</dimen>
|
||||
<dimen name="network_list_state_width">44.0dip</dimen>
|
||||
|
||||
|
||||
</resources>
|
||||
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<array name="fileEndingImage">
|
||||
<item>.png</item>
|
||||
<item>.gif</item>
|
||||
<item>.jpg</item>
|
||||
<item>.jpeg</item>
|
||||
<item>.bmp</item>
|
||||
</array>
|
||||
<array name="fileEndingAudio">
|
||||
<item>.mp3</item>
|
||||
<item>.wav</item>
|
||||
<item>.ogg</item>
|
||||
<item>.midi</item>
|
||||
<item>.wma</item>
|
||||
</array>
|
||||
<array name="fileEndingPackage">
|
||||
<item>.jar</item>
|
||||
<item>.zip</item>
|
||||
<item>.rar</item>
|
||||
<item>.gz</item>
|
||||
</array>
|
||||
<array name="fileEndingWebText">
|
||||
<item>.htm</item>
|
||||
<item>.html</item>
|
||||
<item>.php</item>
|
||||
</array>
|
||||
<array name="fileEndingVideo">
|
||||
<item>.mp4</item>
|
||||
<item>.rm</item>
|
||||
<item>.mpg</item>
|
||||
<item>.avi</item>
|
||||
<item>.mpeg</item>
|
||||
</array>
|
||||
|
||||
</resources>
|
||||
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright (C) 2008 ZXing authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<resources>
|
||||
<item type="id" name="decode"/>
|
||||
<item type="id" name="decode_failed"/>
|
||||
<item type="id" name="decode_succeeded"/>
|
||||
<item type="id" name="launch_product_query"/>
|
||||
<item type="id" name="quit"/>
|
||||
<item type="id" name="restart_preview"/>
|
||||
<item type="id" name="return_scan_result"/>
|
||||
</resources>
|
||||
@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string-array name="defaultname" translatable="false">
|
||||
<item>@string/title_Ping</item>
|
||||
<item>@string/title_Upload</item>
|
||||
<item>@string/title_Download</item>
|
||||
<item>@string/title_activity_bluetooth_print</item>
|
||||
<item>@string/title_activity_network_status</item>
|
||||
<item>@string/title_activity_gps</item>
|
||||
<item>@string/title_activity_battery_monitor</item>
|
||||
</string-array>
|
||||
<string-array name="defaulticon" translatable="false">
|
||||
<item>ping</item>
|
||||
<item>updown</item>
|
||||
<item>updown</item>
|
||||
<item>bluetooth</item>
|
||||
<item>network</item>
|
||||
<item>gps</item>
|
||||
<item>battery</item>
|
||||
</string-array>
|
||||
<string-array name="defaultcls" translatable="false">
|
||||
<item>PingActivity</item>
|
||||
<item>UploadActivity</item>
|
||||
<item>DownloadActivity</item>
|
||||
<item>BluetoothPrintActivity</item>
|
||||
<item>NetworkStatusActivity</item>
|
||||
<item>GpsActivity</item>
|
||||
<item>BatteryMonitorActivity</item>
|
||||
</string-array>
|
||||
<string-array name="i760name">
|
||||
<item>@string/title_Ping</item>
|
||||
<item>@string/title_Upload</item>
|
||||
<item>@string/title_Download</item>
|
||||
<item>@string/title_activity_yi_d</item>
|
||||
<item>@string/title_activity_bluetooth_print</item>
|
||||
<item>@string/title_activity_key_test</item>
|
||||
<item>@string/title_activity_network_status</item>
|
||||
<item>@string/title_activity_gps</item>
|
||||
<item>@string/title_activity_uhfmain</item>
|
||||
<item>@string/title_activity_a1443</item>
|
||||
<item>@string/title_activity_iso15693</item>
|
||||
<item>@string/title_activity_lf</item>
|
||||
<item>@string/title_activity_battery_monitor</item>
|
||||
<item>@string/title_activity_fingerprint</item>
|
||||
<item>@string/title_activity_volum</item>
|
||||
<item>@string/title_activity_light_and_psensor</item>
|
||||
</string-array>
|
||||
<string-array name="i760cls" translatable="false">
|
||||
<item>PingActivity</item>
|
||||
<item>UploadActivity</item>
|
||||
<item>DownloadActivity</item>
|
||||
<item>YiDActivity</item>
|
||||
<item>BluetoothPrintActivity</item>
|
||||
<item>KeyTestActivity</item>
|
||||
<item>NetworkStatusActivity</item>
|
||||
<item>GpsActivity</item>
|
||||
<item>UHFMainActivity</item>
|
||||
<item>A14443Activity</item>
|
||||
<item>ISO15693Activity</item>
|
||||
<item>LFActivity</item>
|
||||
<item>BatteryMonitorActivity</item>
|
||||
<item>FingerprintActivity</item>
|
||||
<item>VolumActivity</item>
|
||||
<item>LightAndPSensorActivity</item>
|
||||
</string-array>
|
||||
<string-array name="i760icon" translatable="false">
|
||||
<item>ping</item>
|
||||
<item>updown</item>
|
||||
<item>updown</item>
|
||||
<item>d11</item>
|
||||
<item>bluetooth</item>
|
||||
<item>keyboard</item>
|
||||
<item>network</item>
|
||||
<item>gps</item>
|
||||
<item>uhf</item>
|
||||
<item>rfid</item>
|
||||
<item>rfid</item>
|
||||
<item>rfid</item>
|
||||
<item>battery</item>
|
||||
<item>fingerprint</item>
|
||||
<item>volum</item>
|
||||
<item>sensor</item>
|
||||
</string-array>
|
||||
<string-array name="allname" translatable="false">
|
||||
<item>@string/title_activity_auto_run_network</item>
|
||||
<item>@string/title_Ping</item>
|
||||
<item>@string/title_Upload</item>
|
||||
<item>@string/title_Download</item>
|
||||
<item>@string/title_activity_yi_d</item>
|
||||
<item>@string/title_activity_er_d</item>
|
||||
<item>@string/title_activity_bluetooth_print</item>
|
||||
<item>@string/title_activity_key_test</item>
|
||||
<item>@string/title_activity_network_status</item>
|
||||
<item>@string/title_activity_gps</item>
|
||||
<item>@string/title_activity_analog_call</item>
|
||||
<item>@string/title_activity_uhfmain</item>
|
||||
<item>@string/title_activity_a1443</item>
|
||||
<item>@string/title_activity_iso14443_a4_cpu</item>
|
||||
<item>@string/title_activity_iso14443b</item>
|
||||
<item>@string/title_activity_iso15693</item>
|
||||
<item>@string/title_activity_lf</item>
|
||||
<item>@string/title_activity_battery_monitor</item>
|
||||
<item>@string/title_activity_fingerprint</item>
|
||||
<item>@string/title_activity_volum</item>
|
||||
<item>@string/title_activity_light_and_psensor</item>
|
||||
<item>@string/title_activity_bdnav</item>
|
||||
<item>@string/title_activity_psam</item>
|
||||
<item>@string/title_activity_camera</item>
|
||||
<item>@string/zxing_app_name</item>
|
||||
</string-array>
|
||||
<string-array name="allcls" translatable="false">
|
||||
<item>AutoRunNetworkActivity</item>
|
||||
<item>PingActivity</item>
|
||||
<item>UploadActivity</item>
|
||||
<item>DownloadActivity</item>
|
||||
<item>YiDActivity</item>
|
||||
<item>ErDActivity</item>
|
||||
<item>BluetoothPrintActivity</item>
|
||||
<item>KeyTestActivity</item>
|
||||
<item>NetworkStatusActivity</item>
|
||||
<item>GpsActivity</item>
|
||||
<item>AnalogCallActivity</item>
|
||||
<item>UHFMainActivity</item>
|
||||
<item>A14443Activity</item>
|
||||
<item>ISO14443A4CPUActivity</item>
|
||||
<item>ISO14443BActivity</item>
|
||||
<item>ISO15693Activity</item>
|
||||
<item>LFActivity</item>
|
||||
<item>BatteryMonitorActivity</item>
|
||||
<item>FingerprintActivity</item>
|
||||
<item>VolumActivity</item>
|
||||
<item>LightAndPSensorActivity</item>
|
||||
<item>BDNavActivity</item>
|
||||
<item>PSAMActivity</item>
|
||||
<item>CameraActivity</item>
|
||||
<item>CaptureActivity</item>
|
||||
</string-array>
|
||||
<string-array name="allicon" translatable="false">
|
||||
<item>n_autorun</item>
|
||||
<item>n_ping</item>
|
||||
<item>n_upload</item>
|
||||
<item>n_download</item>
|
||||
<item>n_d11</item>
|
||||
<item>n_d22</item>
|
||||
<item>n_bluetooth</item>
|
||||
<item>n_keyboard</item>
|
||||
<item>n_network</item>
|
||||
<item>n_gps</item>
|
||||
<item>n_call</item>
|
||||
<item>n_rfid</item>
|
||||
<item>n_rfid</item>
|
||||
<item>n_rfid</item>
|
||||
<item>n_rfid</item>
|
||||
<item>n_rfid</item>
|
||||
<item>n_rfid</item>
|
||||
<item>n_battery</item>
|
||||
<item>n_fingerprint</item>
|
||||
<item>n_volum</item>
|
||||
<item>n_sensor</item>
|
||||
<item>n_beidou</item>
|
||||
<item>n_psam</item>
|
||||
<item>n_camera</item>
|
||||
<item>n_qr</item>
|
||||
</string-array>
|
||||
<string-array name="c4000name">
|
||||
<item>@string/title_Ping</item>
|
||||
<item>@string/title_Upload</item>
|
||||
<item>@string/title_Download</item>
|
||||
<item>@string/title_activity_yi_d</item>
|
||||
<item>@string/title_activity_bluetooth_print</item>
|
||||
<item>@string/title_activity_uhfmain</item>
|
||||
<item>@string/title_activity_network_status</item>
|
||||
<item>@string/title_activity_gps</item>
|
||||
<item>@string/title_activity_a1443</item>
|
||||
<item>@string/title_activity_iso15693</item>
|
||||
<item>@string/title_activity_lf</item>
|
||||
<item>@string/title_activity_battery_monitor</item>
|
||||
<item>@string/title_activity_fingerprint</item>
|
||||
<item>@string/title_activity_volum</item>
|
||||
<item>@string/title_activity_light_and_psensor</item>
|
||||
<item>@string/title_activity_psam</item>
|
||||
</string-array>
|
||||
<string-array name="c4000cls" translatable="false">
|
||||
<item>PingActivity</item>
|
||||
<item>UploadActivity</item>
|
||||
<item>DownloadActivity</item>
|
||||
<item>YiDActivity</item>
|
||||
<item>BluetoothPrintActivity</item>
|
||||
<item>UHFMainActivity</item>
|
||||
<item>NetworkStatusActivity</item>
|
||||
<item>GpsActivity</item>
|
||||
<item>A14443Activity</item>
|
||||
<item>ISO15693Activity</item>
|
||||
<item>LFActivity</item>
|
||||
<item>BatteryMonitorActivity</item>
|
||||
<item>FingerprintActivity</item>
|
||||
<item>VolumActivity</item>
|
||||
<item>LightAndPSensorActivity</item>
|
||||
<item>PSAMActivity</item>
|
||||
</string-array>
|
||||
<string-array name="c4000icon" translatable="false">
|
||||
<item>ping</item>
|
||||
<item>updown</item>
|
||||
<item>updown</item>
|
||||
<item>d11</item>
|
||||
<item>bluetooth</item>
|
||||
<item>uhf</item>
|
||||
<item>network</item>
|
||||
<item>gps</item>
|
||||
<item>rfid</item>
|
||||
<item>rfid</item>
|
||||
<item>rfid</item>
|
||||
<item>battery</item>
|
||||
<item>fingerprint</item>
|
||||
<item>volum</item>
|
||||
<item>sensor</item>
|
||||
<item>psam</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="arrayTagType">
|
||||
<item>S50</item>
|
||||
<item>S70</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="arrayKeyType">
|
||||
<item>A</item>
|
||||
<item>B</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
</resources>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url 'https://jitpack.io' }
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.2'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenLocal()
|
||||
maven { url 'https://dl.google.com/dl/android/maven2' }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue