first commit: upload android project

main
杨万里 2 months ago
commit 779c2393e5

14
.gitignore vendored

@ -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>

1
app/.gitignore vendored

@ -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.

@ -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,288 @@
package com.example.uhf.activity;
import android.app.ActionBar;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.widget.Toast;
import com.example.uhf.R;
import com.example.uhf.adapter.ViewPagerAdapter;
import com.example.uhf.fragment.KeyDwonFragment;
import com.example.uhf.tools.UIHelper;
import com.example.uhf.widget.NoScrollViewPager;
import com.rscja.deviceapi.RFIDWithUHFUART;
import com.rscja.utility.StringUtility;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.FragmentActivity;
/**
* Created by wskyo on 2021-06-18.
*/
public class BaseTabFragmentActivity extends FragmentActivity {
private final int offscreenPage = 2;
protected ActionBar mActionBar;
protected NoScrollViewPager mViewPager;
protected ViewPagerAdapter mViewPagerAdapter;
protected List<KeyDwonFragment> lstFrg = new ArrayList<KeyDwonFragment>();
protected List<String> lstTitles = new ArrayList<String>();
// public Reader mReader;
public RFIDWithUHFUART mReader;
private int index = 0;
private ActionBar.Tab tab_kill, tab_lock, tab_set;
private DisplayMetrics metrics;
private AlertDialog dialog;
private long[] timeArr;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
public void initUHF() {
mActionBar = getActionBar();
mActionBar.setDisplayShowTitleEnabled(true);
mActionBar.setDisplayShowHomeEnabled(true);
mActionBar.setDisplayHomeAsUpEnabled(true);
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
try {
mReader = RFIDWithUHFUART.getInstance();
} catch (Exception ex) {
toastMessage(ex.getMessage());
return;
}
if (mReader != null) {
new InitTask().execute();
}
}
protected void initViewPageData() {
}
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ActionBar
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// TODO Auto-generated method stub
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main, menu);
return true;
// return super.onCreateOptionsMenu(menu);
}
protected void initViewPager() {
mViewPagerAdapter = new ViewPagerAdapter(getSupportFragmentManager(), lstFrg, lstTitles);
mViewPager = (NoScrollViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mViewPagerAdapter);
mViewPager.setOffscreenPageLimit(offscreenPage);
}
protected void initTabs() {
for (int i = 0; i < mViewPagerAdapter.getCount() - 3; ++i) {
mActionBar.addTab(mActionBar.newTab().setText(mViewPagerAdapter.getPageTitle(i)).setTabListener(mTabListener));
}
tab_kill = mActionBar.newTab().setText(mViewPagerAdapter.getPageTitle(3)).setTabListener(mTabListener);
tab_lock = mActionBar.newTab().setText(mViewPagerAdapter.getPageTitle(4)).setTabListener(mTabListener);
tab_set = mActionBar.newTab().setText(mViewPagerAdapter.getPageTitle(5)).setTabListener(mTabListener);
//<2F><>Ӳ˵<D3B2>
// mActionBar.addTab(mActionBar.newTab().setText(getString(R.string.myMenu)).setTabListener(mTabListener));
}
protected ActionBar.TabListener mTabListener = new ActionBar.TabListener() {
@Override
public void onTabSelected(ActionBar.Tab tab, android.app.FragmentTransaction fragmentTransaction) {
if (mActionBar.getTabCount() > 3 && tab.getPosition() != 3) {
mActionBar.removeTabAt(3);
}
if (tab.getPosition() == 3) {
mViewPager.setCurrentItem(index, false);
} else {
mViewPager.setCurrentItem(tab.getPosition());
}
}
@Override
public void onTabUnselected(ActionBar.Tab tab, android.app.FragmentTransaction fragmentTransaction) {
}
@Override
public void onTabReselected(ActionBar.Tab tab, android.app.FragmentTransaction fragmentTransaction) {
}
};
public boolean onOptionsItemSelected(android.view.MenuItem item) {
//
if (mActionBar.getSelectedTab().getText().equals(item.getTitle())) {
return true;
}
if (mActionBar.getTabCount() > 3 && item.getItemId() != android.R.id.home && item.getItemId() != R.id.UHF_ver) {
mActionBar.removeTabAt(3);
}
switch (item.getItemId()) {
case android.R.id.home:
finish();
break;
case R.id.action_kill:
index = 3;
mActionBar.addTab(tab_kill, true);
break;
case R.id.action_lock:
index = 4;
mActionBar.addTab(tab_lock, true);
break;
case R.id.action_set:
index = 5;
mActionBar.addTab(tab_set, true);
break;
case R.id.UHF_ver:
getUHFVersion();
break;
default:
break;
}
return true;
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == 139 || keyCode == 280 || keyCode == 293) {
Log.e("TAG", "onKeyDown: "+ keyCode);
if (event.getRepeatCount() == 0) {
if (mViewPager != null) {
KeyDwonFragment sf = (KeyDwonFragment) mViewPagerAdapter.getItem(mViewPager.getCurrentItem());
sf.myOnKeyDwon();
}
}
return true;
}
return super.onKeyDown(keyCode, event);
}
public void gotoActivity(Intent it) {
startActivity(it);
}
public void gotoActivity(Class<? extends BaseTabFragmentActivity> clz) {
Intent it = new Intent(this, clz);
gotoActivity(it);
}
public void toastMessage(String msg) {
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
}
public void toastMessage(int resId) {
Toast.makeText(this, resId, Toast.LENGTH_SHORT).show();
}
/**
* <EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*
* @author liuruifeng
*/
public class InitTask extends AsyncTask<String, Integer, Boolean> {
ProgressDialog mypDialog;
@Override
protected Boolean doInBackground(String... params) {
// TODO Auto-generated method stub
return mReader.init();
}
@Override
protected void onPostExecute(Boolean result) {
super.onPostExecute(result);
mypDialog.cancel();
if (!result) {
Toast.makeText(BaseTabFragmentActivity.this, "init fail", Toast.LENGTH_SHORT).show();
}
}
@Override
protected void onPreExecute() {
// TODO Auto-generated method stub
super.onPreExecute();
mypDialog = new ProgressDialog(BaseTabFragmentActivity.this);
mypDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mypDialog.setMessage("init...");
mypDialog.setCanceledOnTouchOutside(false);
mypDialog.show();
}
}
@Override
protected void onDestroy() {
if (mReader != null) {
mReader.free();
}
super.onDestroy();
}
/**
* <EFBFBD><EFBFBD>֤ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>ȷ
*
* @param str
* @return
*/
public boolean vailHexInput(String str) {
if (str == null || str.length() == 0) {
return false;
}
// <20><><EFBFBD>ȱ<EFBFBD><C8B1><EFBFBD><EFBFBD><EFBFBD>ż<EFBFBD><C5BC>
if (str.length() % 2 == 0) {
return StringUtility.isHexNumberRex(str);
}
return false;
}
public void getUHFVersion() {
if (mReader != null) {
String rfidVer = mReader.getVersion();//.getHardwareType();
UIHelper.alert(this, R.string.action_uhf_ver, rfidVer, R.drawable.webtext);
}
}
}

@ -0,0 +1,205 @@
package com.example.uhf.activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.AsyncTask;
import android.os.Bundle;
import android.widget.Toast;
import com.example.uhf.R;
import com.example.uhf.fragment.UHFKillFragment;
import com.example.uhf.fragment.UHFLockFragment;
import com.example.uhf.fragment.UHFReadFragment;
import com.example.uhf.fragment.UHFReadTagFragment;
import com.example.uhf.fragment.UHFSetFragment;
import com.example.uhf.fragment.UHFWriteFragment;
import com.rscja.utility.StringUtility;
import java.util.HashMap;
/**
* UHF使demo
*
* 1使
* 2使\libs\armeabi\libDeviceAPI.so\libs\DeviceAPI_ver20210618.aar
* 3 init()使 free()
*
*
* 使API
*
* @author
* 2021621
*/
public class UHFMainActivity extends BaseTabFragmentActivity {
public final static String TAG = "MainActivity";
// public AppContext appContext;// ȫ<><C8AB>Context
//
// public Reader mReader;
//public RFIDWithUHF mReader;
// public void playSound(int id) {
// appContext.playSound(id);
// }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// if (Build.VERSION.SDK_INT > 21) {
//
//
// //读写内存权限
// if (ContextCompat.checkSelfPermission(this,
// Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// // 请求权限
// ActivityCompat
// .requestPermissions(
// this,
// new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},
// 1);
// }
//
// int checkCallPhonePermission = ContextCompat.checkSelfPermission(
// this, Manifest.permission.READ_EXTERNAL_STORAGE);
// if (checkCallPhonePermission != PackageManager.PERMISSION_GRANTED) {
// ActivityCompat.requestPermissions(this, new String[]{
// Manifest.permission.WRITE_EXTERNAL_STORAGE,
// Manifest.permission.READ_EXTERNAL_STORAGE,}, 1);
// return;
// } else {
// // 已申请权限直接跳转到下一个界面
//
//
// }
// }
// appContext = (AppContext) getApplication();
initSound();
initUHF(); //
initViewPageData();
initViewPager();
initTabs();
}
@Override
protected void initViewPageData() {
lstFrg.add(new UHFReadTagFragment());
lstFrg.add(new UHFReadFragment());
lstFrg.add(new UHFWriteFragment());
lstFrg.add(new UHFKillFragment());
lstFrg.add(new UHFLockFragment());
lstFrg.add(new UHFSetFragment());
lstTitles.add(getString(R.string.uhf_msg_tab_scan));
lstTitles.add(getString(R.string.uhf_msg_tab_read));
lstTitles.add(getString(R.string.uhf_msg_tab_write));
lstTitles.add(getString(R.string.uhf_msg_tab_kill));
lstTitles.add(getString(R.string.uhf_msg_tab_lock));
lstTitles.add(getString(R.string.uhf_msg_tab_set));
}
@Override
protected void onDestroy() {
if (mReader != null) {
mReader.free();
}
super.onDestroy();
}
/**
* <EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*
* @author liuruifeng
*/
public class InitTask extends AsyncTask<String, Integer, Boolean> {
ProgressDialog mypDialog;
@Override
protected Boolean doInBackground(String... params) {
// TODO Auto-generated method stub
return mReader.init();
}
@Override
protected void onPostExecute(Boolean result) {
super.onPostExecute(result);
mypDialog.cancel();
if (!result) {
Toast.makeText(UHFMainActivity.this, "init fail", Toast.LENGTH_SHORT).show();
}
}
@Override
protected void onPreExecute() {
// TODO Auto-generated method stub
super.onPreExecute();
mypDialog = new ProgressDialog(UHFMainActivity.this);
mypDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mypDialog.setMessage("init...");
mypDialog.setCanceledOnTouchOutside(false);
mypDialog.show();
}
}
/**
* <EFBFBD><EFBFBD>֤ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>ȷ
*
* @param str
* @return
*/
public boolean vailHexInput(String str) {
if (str == null || str.length() == 0) {
return false;
}
// <20><><EFBFBD>ȱ<EFBFBD><C8B1><EFBFBD><EFBFBD><EFBFBD>ż<EFBFBD><C5BC>
if (str.length() % 2 == 0) {
return StringUtility.isHexNumberRex(str);
}
return false;
}
private HashMap<Integer, Integer> soundMap = new HashMap<Integer, Integer>();
private SoundPool soundPool;
private float volumnRatio;
private AudioManager am;
private void initSound() {
soundPool = new SoundPool(10, AudioManager.STREAM_MUSIC, 5);
soundMap.put(1, soundPool.load(this, R.raw.barcodebeep, 1));
soundMap.put(2, soundPool.load(this, R.raw.serror, 1));
am = (AudioManager) this.getSystemService(AUDIO_SERVICE);// 实例化AudioManager对象
}
/**
*
*
* @param id 12
*/
public void playSound(int id) {
float audioMaxVolumn = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC); // 返回当前AudioManager对象的最大音量值
float audioCurrentVolumn = am.getStreamVolume(AudioManager.STREAM_MUSIC);// 返回当前AudioManager对象的音量值
volumnRatio = audioCurrentVolumn / audioMaxVolumn;
try {
soundPool.play(soundMap.get(id), volumnRatio, // 左声道音量
volumnRatio, // 右声道音量
1, // 优先级0为最低
0, // 循环次数0无不循环-1无永远循环
1 // 回放速度 该值在0.5-2.0之间1为正常速度
);
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -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,277 @@
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.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.UIHelper;
import com.rscja.deviceapi.interfaces.IUHF;
public class UHFReadFragment extends KeyDwonFragment implements OnClickListener {
private UHFMainActivity mContext;
private Spinner SpinnerBank_Read;
private Spinner SpinnerOption_Read;
private EditText EtPtr_Read;
private EditText EtLen_Read;
private EditText EtAccessPwd_Read;
private EditText EtPtr2_Read;
private EditText EtLen2_Read;
private EditText EtData_Read;
private EditText etPtr_filter;
private EditText etData_filter;
private EditText etLen_filter;
private Button BtRead;
private CheckBox cb_filter;
private CheckBox cb_QT_R;
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_read_fragment, container, false);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mContext = (UHFMainActivity) getActivity();
SpinnerBank_Read = (Spinner) getView().findViewById(R.id.SpinnerBank_Read);
SpinnerOption_Read = (Spinner) getView().findViewById(R.id.SpinnerOption_Read);
EtPtr_Read = (EditText) getView().findViewById(R.id.EtPtr_Read);
EtLen_Read = (EditText) getView().findViewById(R.id.EtLen_Read);
EtAccessPwd_Read = (EditText) getView().findViewById(R.id.EtAccessPwd_Read);
EtPtr2_Read = (EditText) getView().findViewById(R.id.EtPtr2_Read);
EtLen2_Read = (EditText) getView().findViewById(R.id.EtLen2_Read);
EtData_Read = (EditText) getView().findViewById(R.id.EtData_Read);
etLen_filter = (EditText) getView().findViewById(R.id.etLen_filter);
etPtr_filter = (EditText) getView().findViewById(R.id.etPtr_filter);
etData_filter = (EditText) getView().findViewById(R.id.etData_filter);
BtRead = (Button) getView().findViewById(R.id.BtRead);
cb_QT_R = (CheckBox) getView().findViewById(R.id.cb_QT_R);
cb_filter = (CheckBox) getView().findViewById(R.id.cb_filter);
rbEPC_filter = (RadioButton) getView().findViewById(R.id.rbEPC_filter);
rbTID_filter = (RadioButton) getView().findViewById(R.id.rbTID_filter);
rbUser_filter = (RadioButton) getView().findViewById(R.id.rbUser_filter);
rbEPC_filter.setOnClickListener(this);
rbTID_filter.setOnClickListener(this);
rbUser_filter.setOnClickListener(this);
BtRead.setOnClickListener(this);
EtData_Read.setKeyListener(null);
EtPtr2_Read.setEnabled(false);
EtLen2_Read.setEnabled(false);
EtData_Read.setText("");
cb_filter.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
String data = etData_filter.getText().toString().trim();
String rex = "[\\da-fA-F]*"; //匹配正则表达式,数据为十六进制格式
if (data == null || data.isEmpty() || !data.matches(rex)) {
UIHelper.ToastMessage(mContext, "过滤的数据必须是十六进制数据");
cb_filter.setChecked(false);
return;
}
}
}
});
SpinnerBank_Read.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_Read.setText("2");
} else {
EtPtr_Read.setText("0");
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.rbEPC_filter:
if (rbEPC_filter.isChecked()) {
etPtr_filter.setText("32");
}
break;
case R.id.rbTID_filter:
if (rbTID_filter.isChecked()) {
etPtr_filter.setText("0");
}
break;
case R.id.rbUser_filter:
if (rbUser_filter.isChecked()) {
etPtr_filter.setText("0");
}
break;
case R.id.BtRead:
read();
break;
}
}
private void read() {
String ptrStr = EtPtr_Read.getText().toString().trim();
if (ptrStr.equals("")) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_addr_not_null);
return;
} else if (!TextUtils.isDigitsOnly(ptrStr)) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_addr_must_decimal);
return;
}
String cntStr = EtLen_Read.getText().toString().trim();
if (cntStr.equals("")) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_len_not_null);
return;
} else if (!TextUtils.isDigitsOnly(cntStr)) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_len_must_decimal);
return;
}
String pwdStr = EtAccessPwd_Read.getText().toString().trim();
if (!TextUtils.isEmpty(pwdStr)) {
if (pwdStr.length() != 8) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_addr_must_len8);
return;
} else if (!mContext.vailHexInput(pwdStr)) {
UIHelper.ToastMessage(mContext, R.string.rfid_mgs_error_nohex);
return;
}
} else {
pwdStr = "00000000";
}
boolean result = false;
int Bank = 0;
if (SpinnerBank_Read.getSelectedItemPosition() == 0) {
Bank = IUHF.Bank_RESERVED;
} else if (SpinnerBank_Read.getSelectedItemPosition() == 1) {
Bank = IUHF.Bank_EPC;
} else if (SpinnerBank_Read.getSelectedItemPosition() == 2) {
Bank = IUHF.Bank_TID;
} else if (SpinnerBank_Read.getSelectedItemPosition() == 3) {
Bank = IUHF.Bank_USER;
}
if (cb_filter.isChecked())// 过滤
{
if (etPtr_filter.getText().toString() == null || etPtr_filter.getText().toString().isEmpty()) {
UIHelper.ToastMessage(mContext, "过滤数据的起始地址不能为空");
return;
}
if (etData_filter.getText().toString() == null || etData_filter.getText().toString().isEmpty()) {
UIHelper.ToastMessage(mContext, "过滤数据不能为空");
return;
}
if (etLen_filter.getText().toString() == null || etLen_filter.getText().toString().isEmpty()) {
UIHelper.ToastMessage(mContext, "过滤数据长度不能为空");
return;
}
int filterPtr = Integer.parseInt(etPtr_filter.getText().toString());
String filterData = etData_filter.getText().toString();
int filterCnt = Integer.parseInt(etLen_filter.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 data = "";
if (cb_QT_R.isChecked()) {
data = mContext.mReader.readData(pwdStr,
filterBank,
filterPtr,
filterCnt,
filterData,
Bank,
Integer.parseInt(ptrStr),
Integer.parseInt(cntStr)
);
} else {
data = mContext.mReader.readData(pwdStr,
filterBank,
filterPtr,
filterCnt,
filterData,
Bank,
Integer.parseInt(ptrStr),
Integer.parseInt(cntStr)
);
}
if (data != null && data.length() > 0) {
result = true;
} else {
result = false;
}
EtData_Read.setText("data" + data);
} else {
String entity = "";
if (cb_QT_R.isChecked()) {
entity = mContext.mReader.readData(pwdStr,
Bank,
Integer.parseInt(ptrStr),
Integer.parseInt(cntStr));
} else {
entity = mContext.mReader.readData(pwdStr,
Bank,
Integer.parseInt(ptrStr),
Integer.parseInt(cntStr));
}
if (entity != null) {
result = true;
EtData_Read.setText("data" + entity);
} else {
result = false;
UIHelper.ToastMessage(mContext, R.string.uhf_msg_read_data_fail);
EtData_Read.setText("");
}
}
if (!result) {
mContext.playSound(2);
} else {
mContext.playSound(1);
}
}
public void myOnKeyDwon() {
read();
}
}

@ -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,705 @@
package com.example.uhf.fragment;
import android.app.AlertDialog;
import android.os.Bundle;
import android.os.Handler;
import android.util.DisplayMetrics;
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.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioButton;
import android.widget.Spinner;
import android.widget.TextView;
import com.example.uhf.R;
import com.example.uhf.activity.UHFMainActivity;
import com.example.uhf.tools.UIHelper;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;
import com.rscja.utility.StringUtility;
import static android.content.ContentValues.TAG;
public class UHFSetFragment extends KeyDwonFragment implements OnClickListener {
private UHFMainActivity mContext;
private Button btnSetFre;
private Button btnGetFre;
private Spinner spMode;
@ViewInject(R.id.ll_freHop)
private LinearLayout ll_freHop;
@ViewInject(R.id.btnSetPower)
private Button btnSetPower;
@ViewInject(R.id.btnGetPower)
private Button btnGetPower;
@ViewInject(R.id.spPower)
private Spinner spPower;
@ViewInject(R.id.et_worktime)
private EditText et_worktime;
@ViewInject(R.id.et_waittime)
private EditText et_waittime;
@ViewInject(R.id.btnWorkWait)
private Button btnWorkWait;
@ViewInject(R.id.spFreHop)
private Spinner spFreHop; //频点列表
@ViewInject(R.id.btnSetFreHop)
private Button btnSetFreHop; //设置频点设置
@ViewInject(R.id.tv_normal_set)
private TextView tv_normal_set; //普通设置(点击5次设置频点设置)
@ViewInject(R.id.btnGetWait)
private Button btnGetWait; //获取空占比
@ViewInject(R.id.btnSetAgreement)
private Button btnSetAgreement; //设置协议
@ViewInject(R.id.SpinnerAgreement)
private Spinner SpinnerAgreement; //协议列表
@ViewInject(R.id.btnSetLinkParams)
private Button btnSetLinkParams; //设置链路参数
@ViewInject(R.id.btnGetLinkParams)
private Button btnGetLinkParams; //获取链路参数
@ViewInject(R.id.splinkParams)
private Spinner splinkParams; //链路参数列表
@ViewInject(R.id.btnSetQTParams)
private Button btnSetQTParams; //设置QT参数
@ViewInject(R.id.btnGetQTParams)
private Button btnGetQTParams; //获取QT参数
@ViewInject(R.id.cbQT)
private CheckBox cbQt; //打开QT
@ViewInject(R.id.cbTagFocus)
private CheckBox cbTagFocus; //打开tagFocus
@ViewInject(R.id.cbFastID)
private CheckBox cbFastID; //打开FastID
@ViewInject(R.id.cbEPC_TID)
private CheckBox cbEPC_TID; //打开EPC+TID
@ViewInject(R.id.rb_America)
private RadioButton rb_America; //美国频点
@ViewInject(R.id.rb_Others)
private RadioButton rb_Others; //其他频点
private ArrayAdapter adapter; //频点列表适配器
@ViewInject(R.id.spsession)//session
private Spinner SpSession;
@ViewInject(R.id.spinv)//
private Spinner SpInv;
@ViewInject(R.id.btnGetSession)
private Button btnGetSession;
@ViewInject(R.id.btnSetSession)
private Button btnSetSession;
private DisplayMetrics metrics;
private AlertDialog dialog;
private long[] timeArr;
private Handler mHandler = new Handler();
private int arrPow; //输出功率
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.activity_uhfset, container, false);
ViewUtils.inject(this, root);
return root;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mContext = (UHFMainActivity) getActivity();
btnSetFre = (Button) getView().findViewById(R.id.BtSetFre);
btnGetFre = (Button) getView().findViewById(R.id.BtGetFre);
spMode = (Spinner) getView().findViewById(R.id.SpinnerMode);
SpSession = (Spinner) getView().findViewById(R.id.spsession);
SpInv = (Spinner) getView().findViewById(R.id.spinv);
spMode.setOnItemSelectedListener(new MyOnTouchListener());
btnSetFre.setOnClickListener(new SetFreOnclickListener());
btnGetFre.setOnClickListener(new GetFreOnclickListener());
btnWorkWait.setOnClickListener(new SetPWMOnclickListener());
btnGetWait.setOnClickListener(this);
btnSetSession.setOnClickListener(this);
btnGetSession.setOnClickListener(this);
btnSetFreHop.setOnClickListener(this);
tv_normal_set.setOnClickListener(this);
btnSetAgreement.setOnClickListener(this);
btnSetQTParams.setOnClickListener(this);
btnGetQTParams.setOnClickListener(this);
btnSetLinkParams.setOnClickListener(this);
btnGetLinkParams.setOnClickListener(this);
cbTagFocus.setOnCheckedChangeListener(new OnMyCheckedChangedListener());
cbFastID.setOnCheckedChangeListener(new OnMyCheckedChangedListener());
cbEPC_TID.setOnCheckedChangeListener(new OnMyCheckedChangedListener());
SpSession.setSelection(1);
SpInv.setSelection(0);
String ver = mContext.mReader.getVersion();//.getHardwareType();
arrPow = R.array.arrayPower;
if (ver != null && ver.contains("RLM")) {
arrPow = R.array.arrayPower2;
}
ArrayAdapter adapter = ArrayAdapter.createFromResource(mContext, arrPow, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spPower.setAdapter(adapter);
}
@Override
public void onResume() {
super.onResume();
/*
线HandlerUI,fragment
*/
mHandler.post(new Runnable() {
@Override
public void run() {
getFre();
getPwm();
getLinkParams();
OnClick_GetPower(null);
}
});
}
/**
* item
*/
public class MyOnTouchListener implements AdapterView.OnItemSelectedListener {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if (position == 3) {
ll_freHop.setVisibility(View.VISIBLE);
rb_America.setChecked(true); //默认美国频点
} else if (position != 3) {
ll_freHop.setVisibility(View.GONE);
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
}
public class SetFreOnclickListener implements OnClickListener {
@Override
public void onClick(View v) {
// byte[] bBaseFre = new byte[2];
//
// if (mContext.mReader.setFrequency(
// (byte) spMode.getSelectedItemPosition(), (byte) 0,
// bBaseFre, (byte) 0, (byte) 0, (byte) 0)) {
// UIHelper.ToastMessage(mContext,
// R.string.uhf_msg_set_frequency_succ);
// } else {
// UIHelper.ToastMessage(mContext,
// R.string.uhf_msg_set_frequency_fail);
// }
if (mContext.mReader.setFrequencyMode((byte) spMode.getSelectedItemPosition())) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_frequency_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_frequency_fail);
// mContext.playSound(2);
}
}
}
public void getFre() {
int idx = mContext.mReader.getFrequencyMode();
if (idx != -1) {
int count = spMode.getCount();
spMode.setSelection(idx > count - 1 ? count - 1 : idx);
// UIHelper.ToastMessage(mContext,
// R.string.uhf_msg_read_frequency_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_read_frequency_fail);
}
}
public void getPwm() {
int[] pwm = mContext.mReader.getPwm();
if (pwm == null || pwm.length < 2) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_read_pwm_fail);
return;
}
et_worktime.setText(pwm[0] + "");
et_waittime.setText(pwm[1] + "");
et_worktime.setSelection(et_worktime.getText().toString().length());
et_waittime.setSelection(et_waittime.getText().toString().length());
}
/**
*
*/
public void getLinkParams() {
int idx = mContext.mReader.getRFLink();
if (idx != -1) {
splinkParams.setSelection(idx);
// UIHelper.ToastMessage(mContext,
// R.string.uhf_msg_get_para_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_get_para_fail);
}
}
public class SetPWMOnclickListener implements OnClickListener {
@Override
public void onClick(View v) {
if (mContext.mReader.setPwm(StringUtility.string2Int(et_worktime.getText().toString(), 0),
StringUtility.string2Int(et_waittime.getText().toString(), 0))) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_pwm_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_pwm_fail);
// mContext.playSound(2);
}
}
}
public class GetFreOnclickListener implements OnClickListener {
@Override
public void onClick(View v) {
// String strFrequency = mContext.mReader.getFrequency();
//
// if (StringUtils.isNotEmpty(strFrequency)) {
//
// etFreRange.setText(strFrequency);
//
// UIHelper.ToastMessage(mContext,
// R.string.uhf_msg_read_frequency_succ);
//
// } else {
// UIHelper.ToastMessage(mContext,
// R.string.uhf_msg_read_frequency_fail);
// }
getFre();
}
}
public class OnMyCheckedChangedListener implements CompoundButton.OnCheckedChangeListener {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
switch (buttonView.getId()) {
case R.id.cbTagFocus:
if (mContext.mReader.setTagFocus(isChecked)) {
if (isChecked) {
cbTagFocus.setText(R.string.tagFocus_off);
} else {
cbTagFocus.setText(R.string.tagFocus);
}
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_fail);
// mContext.playSound(2);
}
break;
case R.id.cbFastID:
if (mContext.mReader.setFastID(isChecked)) {
if (isChecked) {
cbFastID.setText(R.string.fastID_off);
} else {
cbFastID.setText(R.string.fastID);
}
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_fail);
// mContext.playSound(2);
}
break;
case R.id.cbEPC_TID:
if (mContext.mReader.setEPCAndTIDMode()) {
if (isChecked) {
cbEPC_TID.setText(R.string.EPC_TID_off);
} else {
cbEPC_TID.setText(R.string.EPC_TID);
}
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_fail);
// mContext.playSound(2);
}
break;
}
}
}
@OnClick(R.id.btnGetPower)
public void OnClick_GetPower(View view) {
int iPower = mContext.mReader.getPower();
Log.i(UHFMainActivity.TAG, "OnClick_GetPower() iPower=" + iPower);
if (iPower > -1) {
int position = iPower - 5;
int count = spPower.getCount();
spPower.setSelection(position > count - 1 ? count - 1 : position);
// UIHelper.ToastMessage(mContext,
// R.string.uhf_msg_read_power_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_read_power_fail);
}
}
@OnClick(R.id.btnSetPower)
public void OnClick_SetPower(View view) {
int iPower = spPower.getSelectedItemPosition() + 5;
Log.i(UHFMainActivity.TAG, "OnClick_SetPower() iPower=" + iPower);
if (mContext.mReader.setPower(iPower)) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_power_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_power_fail);
// mContext.playSound(2);
}
}
/**
*
*
* @param value
* @return
*/
private boolean setFreHop(float value) {
boolean result = mContext.mReader.setFreHop(value);
if (result) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_frehop_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_frehop_fail);
// mContext.playSound(2);
}
return result;
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.btnSetFreHop: //设置频点
// showFrequencyDialog();
View view = spFreHop.getSelectedView();
if (view instanceof TextView) {
String freHop = ((TextView) view).getText().toString().trim();
setFreHop(Float.valueOf(freHop)); //设置频点
}
break;
case R.id.btnGetWait: //获取空占比
getPwm();
break;
case R.id.btnSetAgreement: //设置协议
if (mContext.mReader.setProtocol(SpinnerAgreement.getSelectedItemPosition())) {
UIHelper.ToastMessage(mContext, R.string.setAgreement_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.setAgreement_fail);
// mContext.playSound(2);
}
break;
case R.id.btnSetQTParams: //设置QT参数
if (!cbQt.isChecked()) {
UIHelper.ToastMessage(mContext, R.string.please_on);
// mContext.playSound(2);
return;
}
if (mContext.mReader.setQTPara(cbQt.isChecked())) {
UIHelper.ToastMessage(mContext, R.string.setQTParams_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.setQTParams_fail);
// mContext.playSound(2);
}
break;
case R.id.btnGetQTParams: //获取QT参数
int[] QTParams = mContext.mReader.getQTPara();
if (QTParams[0] == 1) {
cbQt.setChecked(QTParams[1] == 1);
UIHelper.ToastMessage(mContext, R.string.getQTParams_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.getQTParams_fail);
}
break;
case R.id.btnSetLinkParams: //设置链路参数
if (mContext.mReader.setRFLink(splinkParams.getSelectedItemPosition())) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_fail);
// mContext.playSound(2);
}
break;
case R.id.btnGetLinkParams: //获取链路参数
getLinkParams();
break;
case R.id.btnSetSession:
// //设置SESSION只针对盘点EPC有效对返回EPC+TID,EPC+TID+USER无效
int seesionid = SpSession.getSelectedItemPosition();
int inventoried = SpInv.getSelectedItemPosition();
if (seesionid < 0 || inventoried < 0) {
return;
}
char[] p = mContext.mReader.getGen2();
if (p != null && p.length >= 14) {
int target = p[0];
int action = p[1];
int t = p[2];
int q = p[3];
int startQ = p[4];
int minQ = p[5];
int maxQ = p[6];
int dr = p[7];
int coding = p[8];
int p1 = p[9];
int Sel = p[10];
int Session = p[11];
int g = p[12];
int linkFrequency = p[13];
StringBuilder sb = new StringBuilder();
sb.append("target=");
sb.append(target);
sb.append(" ,action=");
sb.append(action);
sb.append(" ,t=");
sb.append(t);
sb.append(" ,q=");
sb.append(q);
sb.append(" startQ=");
sb.append(startQ);
sb.append(" minQ=");
sb.append(minQ);
sb.append(" maxQ=");
sb.append(maxQ);
sb.append(" dr=");
sb.append(dr);
sb.append(" coding=");
sb.append(coding);
sb.append(" p=");
sb.append(p1);
sb.append(" Sel=");
sb.append(Sel);
sb.append(" Session=");
sb.append(Session);
sb.append(" g=");
sb.append(g);
sb.append(" linkFrequency=");
sb.append(linkFrequency);
sb.append("seesionid=");
sb.append(seesionid);
sb.append(" inventoried=");
sb.append(inventoried);
Log.i(UHFMainActivity.TAG, sb.toString());
if (mContext.mReader.setGen2(target, action, t, q, startQ, minQ, maxQ, dr, coding, p1, Sel, seesionid, inventoried, linkFrequency)) {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_succ);
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_fail);
}
} else {
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_fail);
}
break;
case R.id.btnGetSession:
char[] pp = mContext.mReader.getGen2();
if (pp != null && pp.length >= 14) {
int target = pp[0];
int action = pp[1];
int t = pp[2];
int q = pp[3];
int startQ = pp[4];
int minQ = pp[5];
int maxQ = pp[6];
int dr = pp[7];
int coding = pp[8];
int p1 = pp[9];
int Sel = pp[10];
int Session = pp[11];
int g = pp[12];
int linkFrequency = pp[13];
StringBuilder sb = new StringBuilder();
sb.append("target=");
sb.append(target);
sb.append(" ,action=");
sb.append(action);
sb.append(" ,t=");
sb.append(t);
sb.append(" ,q=");
sb.append(q);
sb.append(" startQ=");
sb.append(startQ);
sb.append(" minQ=");
sb.append(minQ);
sb.append(" maxQ=");
sb.append(maxQ);
sb.append(" dr=");
sb.append(dr);
sb.append(" coding=");
sb.append(coding);
sb.append(" p=");
sb.append(p1);
sb.append(" Sel=");
sb.append(Sel);
sb.append(" Session=");
sb.append(Session);
sb.append(" g=");
sb.append(g);
sb.append(" linkFrequency=");
sb.append(linkFrequency);
Log.i(UHFMainActivity.TAG, sb.toString());
SpSession.setSelection(Session);
SpInv.setSelection(g);
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_succ);
} else
UIHelper.ToastMessage(mContext, R.string.uhf_msg_set_fail);
break;
default:
break;
}
}
/**
*
*/
private void showFrequencyDialog() {
if (dialog == null) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
// builder.setTitle(R.string.btSetFrequency);
View view = getActivity().getLayoutInflater().inflate(R.layout.uhf_dialog_frequency, null);
ListView listView = (ListView) view.findViewById(R.id.listView_frequency);
ImageView iv = (ImageView) view.findViewById(R.id.iv_dismissDialog);
iv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
dialog.dismiss();
}
});
String[] strArr = getResources().getStringArray(R.array.arrayFreHop);
listView.setAdapter(new ArrayAdapter<String>(getActivity(), R.layout.item_text1, strArr));
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// TODO Auto-generated method stub
if (view instanceof TextView) {
TextView tv = (TextView) view;
float value = Float.valueOf(tv.getText().toString().trim());
setFreHop(value); //设置频点
dialog.dismiss();
}
}
});
builder.setView(view);
dialog = builder.create();
dialog.show();
dialog.setCanceledOnTouchOutside(false);
WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
params.width = getWindowWidth() - 100;
params.height = getWindowHeight() - 200;
dialog.getWindow().setAttributes(params);
} else {
dialog.show();
}
}
/**
* 51600
*
* @return
*/
private boolean isFiveClick() {
if (timeArr == null) {
timeArr = new long[5];
}
System.arraycopy(timeArr, 1, timeArr, 0, timeArr.length - 1);
timeArr[timeArr.length - 1] = System.currentTimeMillis();
return System.currentTimeMillis() - timeArr[0] < 1600;
}
/**
*
*
* @return
*/
public int getWindowWidth() {
if (metrics == null) {
metrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
}
return metrics.widthPixels;
}
/**
*
*
* @return
*/
public int getWindowHeight() {
if (metrics == null) {
metrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
}
return metrics.heightPixels;
}
@OnClick(R.id.rb_America)
public void onClick_rbAmerica(View view) {
adapter = ArrayAdapter.createFromResource(mContext, R.array.arrayFreHop_us, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spFreHop.setAdapter(adapter);
}
@OnClick(R.id.rb_Others)
public void onClick_rbOthers(View view) {
adapter = ArrayAdapter.createFromResource(mContext, R.array.arrayFreHop, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spFreHop.setAdapter(adapter);
}
}

@ -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,211 @@
package com.example.uhf.tools;
import java.text.SimpleDateFormat;
import java.util.Date;
public class StringUtils {
public static String replaceUrlWithPlus(String url) {
// 1. 处理特殊字符
// 2. 去除后缀名带来的文件浏览器的视图凌乱(特别是图片更<E78987>?<3F><>如此类似处理否则有的手机打<E69CBA>?<3F><>全是我们的缓存图<E5AD98>?
if (url != null) {
return url.replaceAll("http://(.)*?/", "")
.replaceAll("[.:/,%?&=]", "+").replaceAll("[+]+", "+");
}
return null;
}
/**
* ip
*
* @param text ip
* @return
*/
public static Boolean isIP(String text) {
if (text != null && !text.isEmpty()) {
// 定义正则表达式
String regex = "^((25[0-5])|(2[0-4]\\d)|(1\\d\\d)|([1-9]\\d)|\\d)(\\.((25[0-5])|(2[0-4]\\d)|(1\\d\\d)|([1-9]\\d)|\\d)){3}$";
// 判断ip地址是否与正则表达式匹配
if (text.matches(regex)) {
// 返回判断信息
return true;
} else {
// 返回判断信息
return false;
}
}
// 返回判断信息
return false;
}
/**
*
*
* @param text
* @return
*/
public static Boolean isDomain(String text) {
if (text != null && !text.isEmpty()) {
// 定义正则表达式
String regex = "^([a-zA-Z0-9\\.\\-]+(\\:[a-zA-Z0-9\\.&amp;%\\$\\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))$";
// 判断域名是否与正则表达式匹配
if (text.matches(regex)) {
// 返回判断信息
return true;
} else {
// 返回判断信息
return false;
}
}
// 返回判断信息
return false;
}
public static boolean isEmpty(CharSequence cs) {
return cs == null || cs.length() == 0;
}
public static boolean isNotEmpty(CharSequence cs) {
return !StringUtils.isEmpty(cs);
}
public static String trim(String str) {
return str == null ? null : str.trim();
}
/**
*
*
* @param str
* @param defValue
* @return
*/
public static int toInt(String str, int defValue) {
try {
return Integer.parseInt(str);
} catch (Exception e) {
}
return defValue;
}
/**
*
*
* @param obj
* @return 0
*/
public static int toInt(Object obj) {
if (obj == null)
return 0;
return toInt(obj.toString(), 0);
}
/**
*
*
* @param obj
* @return 0
*/
public static long toLong(String obj) {
try {
return Long.parseLong(obj);
} catch (Exception e) {
}
return 0;
}
/**
* double
*
* @param obj
* @return 0
*/
public static double toDouble(String obj) {
try {
return Double.parseDouble(obj);
} catch (Exception e) {
}
return 0;
}
/**
*
*
* @param b
* @return false
*/
public static boolean toBool(String b) {
try {
return Boolean.parseBoolean(b);
} catch (Exception e) {
}
return false;
}
/**
* INT
*
* @param val
* @return
*/
public static Boolean isInt(String val) {
try {
Integer.parseInt(val);
return true;
} catch (Exception e) {
return false;
}
}
public static String getTimeString() {
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
Date curDate = new Date(System.currentTimeMillis());// 获取当前时间
return formatter.format(curDate);
}
public static String getTimeFormat(long time) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy MM dd HH:mm:ss");
Date curDate = new Date(time);// 获取当前时间
return formatter.format(curDate);
}
/**
*
*
* @param str
* @return
*/
public static boolean isHexNumber(String str) {
boolean flag = false;
for (int i = 0; i < str.length(); i++) {
char cc = str.charAt(i);
if (cc == '0' || cc == '1' || cc == '2' || cc == '3' || cc == '4'
|| cc == '5' || cc == '6' || cc == '7' || cc == '8'
|| cc == '9' || cc == 'A' || cc == 'B' || cc == 'C'
|| cc == 'D' || cc == 'E' || cc == 'F' || cc == 'a'
|| cc == 'b' || cc == 'c' || cc == 'c' || cc == 'd'
|| cc == 'e' || cc == 'f') {
flag = true;
}
}
return flag;
}
/**
* char
*
* @param s
* @return
*/
public static char[] HexStringToChars(String s) {
char[] bytes;
bytes = new char[s.length() / 2];
for (int i = 0; i < bytes.length; i++) {
bytes[i] = (char) Integer.parseInt(s.substring(2 * i, 2 * i + 2), 16);
}
return bytes;
}
}

@ -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);
}
}

@ -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.

@ -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,71 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="network_not_connected">网络连接失败,请检查网络设置</string>
<string name="xml_parser_failed">数据解析异常</string>
<string name="io_exception_error">文件流异常</string>
<string name="http_status_code_error">网络异常,错误码:%d</string>
<string name="http_exception_error">网络异常,请求超时</string>
<string name="socket_exception_error">网络异常,读取数据超时</string>
<string name="app_run_code_error">应用程序运行时异常</string>
<string name="app_menu_surelogout">确定退出程序吗?</string>
<string name="sure">确定</string>
<string name="cancle">取消</string>
<string name="app_error">应用程序错误</string>
<string name="app_error_message">很抱歉,应用程序出现错误,即将退出。\n请提交错误报告我们会尽快修复这个问题</string>
<string name="submit_report">提交报告</string>
<string name="load_more">更多</string>
<string name="load_ing">加载中···</string>
<string name="load_full">已加载全部</string>
<string name="load_empty">暂无数据</string>
<string name="load_error">加载数据出错</string>
<string name="new_data_toast_message">有 %d 条更新</string>
<string name="new_data_toast_none">没有新更新</string>
<string name="select">选择</string>
<string name="share">分享</string>
<string name="sharing">分享中...</string>
<string name="publishing">发布中...</string>
<string name="choose_image">请选择图片文件!</string>
<string name="delete_image">确定删除该图片吗?</string>
<string name="delete_tweet">确定删除该动弹吗?</string>
<string name="delete_blog">确定删除该博客吗?</string>
<string name="republish_tweet">网络超时,是否重新发布动弹?</string>
<string name="clearwords">清除文字吗?</string>
<string name="msg_load_is_null">读取失败,可能已被删除</string>
<string name="msg_login_email_error">无效的邮箱地址</string>
<string name="msg_login_username_null">请输入用户名</string>
<string name="msg_login_pwd_null">请输入密码</string>
<string name="msg_login_success">登录成功</string>
<string name="msg_login_fail">登录失败</string>
<string name="msg_login_logout">退出成功</string>
<string name="msg_login_error">用户未登录 或 密码错误</string>
<string name="msg_load_userface_fail">用户头像加载失败</string>
<string name="msg_load_image_fail">图片加载失败</string>
<string name="msg_read_detail_fail">无法获取文章信息</string>
<string name="msg_noaccess_delete">您没有删除权限</string>
<!-- LoginSina -->
<string name="sinalogin_check_account">账号不能为空</string>
<string name="sinalogin_check_pass">密码不能为空</string>
<string name="sinalogin_check_server">服务器验证中...</string>
<!-- sina share message -->
<string name="OAUTH_ERROR">服务器验证失败</string>
<string name="OAUTH_RequestToken_ACCESS">第三方应用验证成功</string>
<string name="OAUTH_RequestToken_ERROR">第三方应用验证失败</string>
<string name="OAUTH_AccessToken_ACCESS">用户授权登录成功</string>
<string name="OAUTH_AccessToken_ERROR">用户授权登录失败</string>
<string name="OAUTH_AccessToken_SXPIRED">授权已过期,请重新授权登录</string>
<string name="Weibo_Message_NULL">分享数据不能为空</string>
<string name="Weibo_Message_LONG">已超出140个字</string>
<string name="Weibo_Share_Success">微博分享成功</string>
<string name="Weibo_Share_Error">微博分享失败</string>
<string name="Weibo_Share_Repeat">已经分享过了</string>
<string name="font_size">正文字体</string>
</resources>

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="rfid_mgs_error_config">设备配置错误</string>
<string name="rfid_mgs_error_init">初始化失败</string>
<string name="rfid_mgs_error_lessthan12">密钥长度应为12位</string>
<string name="rfid_mgs_error_nohex">内容请输入十六进制数</string>
<string name="rfid_mgs_error_nopwd">密码不能为空</string>
<string name="rfid_mgs_error_nolockcode">锁定码不能为空</string>
<string name="rfid_mgs_kill_fail">销毁失败</string>
<string name="rfid_mgs_kill_succ">销毁成功</string>
<string name="rfid_mgs_lock_succ">锁定成功</string>
<string name="rfid_mgs_lock_fail">锁定失败</string>
<string name="rfid_mgs_killpwdtip">不能使用默认密码销毁</string>
<string name="rfid_mgs_lockpwdtip">不能使用默认密码锁定</string>
<string name="rfid_mgs_locktip">提示:永久锁定之后,无法解锁;永久解锁后,无法锁定</string>
<string name="rfid_mgs_error_veri_fail">密钥验证失败</string>
<string name="rfid_mgs_error_not_found">寻卡失败</string>
<string name="rfid_msg_uid">\nUID</string>
<string name="rfid_msg_type">\n卡片类型</string>
<string name="rfid_msg_data">\n数据</string>
<string name="rfid_msg_read_fail">\n读卡失败</string>
<string name="rfid_msg_read_succ">\n读卡成功</string>
<string name="rfid_msg_write_fail">\n写卡失败</string>
<string name="rfid_msg_write_succ">\n写卡成功</string>
<string name="rfid_mgs_error_0not_write">0扇区的0数据块是不能写入</string>
<string name="rfid_mgs_error_not_write_null">写入内容不能为空</string>
<string name="rfid_mgs_error_not_supper_write">此程序不支持该数据块的写入操作,该数据块是密码控制块</string>
<string name="rfid_msg_1byte_fail">数据应该是一个字节</string>
<string name="rfid_msg_confirm_title">确定吗?</string>
<string name="rfid_msg_confirm_true">确定</string>
<string name="rfid_msg_confirm_flase">取消</string>
<string name="rfid_msg_confirm_afi">操作之后该标签的AFI将不能再次修改, 要锁住AFI吗?</string>
<string name="rfid_msg_confirm_dsfid">操作之后该标签的DSFID将不能再次修改, 要锁住AFI吗?</string>
<string name="rfid_msg_lock_fail">\n锁定失败</string>
<string name="rfid_msg_lock_succ">\n锁定成功</string>
<string name="uhf_msg_read_tag_fail">读取标签号失败</string>
<string name="uhf_msg_addr_not_null">地址不能为空</string>
<string name="uhf_msg_addr_must_decimal">地址必须为十进制数据</string>
<string name="uhf_msg_addr_must_len8">访问密码的长度必须为8位</string>
<string name="uhf_msg_write_must_not_null">写入数据不能为空</string>
<string name="uhf_msg_write_must_len4">写入数据的字符串长度必须为4位</string>
<string name="uhf_msg_tag_must_not_null">标签号不能为空</string>
<string name="uhf_msg_write_succ">写入数据成功</string>
<string name="uhf_msg_write_fail">写入数据失败</string>
<string name="uhf_msg_len_not_null">长度不能为空</string>
<string name="uhf_msg_len_must_decimal">长度必须为十进制数据</string>
<string name="uhf_msg_write_must_len4x">写入数据的字符串长度必须为4的倍数</string>
<string name="uhf_msg_read_data_fail">读取数据失败</string>
<string name="uhf_msg_inventory_fail">识别失败</string>
<string name="uhf_msg_inventory_stop_fail">停止识别标签失败</string>
<string name="uhf_msg_inventory_open_fail">开启识别标签失败</string>
<string name="uhf_msg_set_frequency_fail">设置频率失败</string>
<string name="uhf_msg_set_frequency_succ">设置频率成功</string>
<string name="uhf_msg_read_frequency_fail">读取频率失败</string>
<string name="uhf_msg_read_frequency_succ">读取频率成功</string>
</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,71 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="network_not_connected">Network connection failed, please check the network Settings</string>
<string name="xml_parser_failed">Abnormal data parsing</string>
<string name="io_exception_error">Document flow anomalies</string>
<string name="http_status_code_error">Network anomalies, error code%d</string>
<string name="http_exception_error">Network anomalies, request timeout</string>
<string name="socket_exception_error">Network anomalies, read data timeout</string>
<string name="app_run_code_error">Application runtime exception</string>
<string name="app_menu_surelogout">Determine the exit?</string>
<string name="sure">OK</string>
<string name="cancle">Cancel</string>
<string name="app_error">App Error</string>
<string name="app_error_message">I am very sorry, application error, the exit \n Please submit a bug report, we will fix the problem as soon as possible</string>
<string name="submit_report">提交报告</string>
<string name="load_more">更多</string>
<string name="load_ing">加载中···</string>
<string name="load_full">已加载全部</string>
<string name="load_empty">暂无数据</string>
<string name="load_error">加载数据出错</string>
<string name="new_data_toast_message">有 %d 条更新</string>
<string name="new_data_toast_none">没有新更新</string>
<string name="select">选择</string>
<string name="share">分享</string>
<string name="sharing">分享中...</string>
<string name="publishing">发布中...</string>
<string name="choose_image">请选择图片文件!</string>
<string name="delete_image">确定删除该图片吗?</string>
<string name="delete_tweet">确定删除该动弹吗?</string>
<string name="delete_blog">确定删除该博客吗?</string>
<string name="republish_tweet">网络超时,是否重新发布动弹?</string>
<string name="clearwords">清除文字吗?</string>
<string name="msg_load_is_null">读取失败,可能已被删除</string>
<string name="msg_login_email_error">无效的邮箱地址</string>
<string name="msg_login_username_null">请输入用户名</string>
<string name="msg_login_pwd_null">请输入密码</string>
<string name="msg_login_success">登录成功</string>
<string name="msg_login_fail">登录失败</string>
<string name="msg_login_logout">退出成功</string>
<string name="msg_login_error">用户未登录 或 密码错误</string>
<string name="msg_load_userface_fail">用户头像加载失败</string>
<string name="msg_load_image_fail">图片加载失败</string>
<string name="msg_read_detail_fail">无法获取文章信息</string>
<string name="msg_noaccess_delete">您没有删除权限</string>
<!-- LoginSina -->
<string name="sinalogin_check_account">账号不能为空</string>
<string name="sinalogin_check_pass">密码不能为空</string>
<string name="sinalogin_check_server">服务器验证中...</string>
<!-- sina share message -->
<string name="OAUTH_ERROR">服务器验证失败</string>
<string name="OAUTH_RequestToken_ACCESS">第三方应用验证成功</string>
<string name="OAUTH_RequestToken_ERROR">第三方应用验证失败</string>
<string name="OAUTH_AccessToken_ACCESS">用户授权登录成功</string>
<string name="OAUTH_AccessToken_ERROR">用户授权登录失败</string>
<string name="OAUTH_AccessToken_SXPIRED">授权已过期,请重新授权登录</string>
<string name="Weibo_Message_NULL">分享数据不能为空</string>
<string name="Weibo_Message_LONG">已超出140个字</string>
<string name="Weibo_Share_Success">微博分享成功</string>
<string name="Weibo_Share_Error">微博分享失败</string>
<string name="Weibo_Share_Repeat">已经分享过了</string>
<string name="font_size">正文字体</string>
</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,68 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="rfid_mgs_error_config">Device configuration error</string>
<string name="rfid_mgs_error_init">Device initialization failed</string>
<string name="rfid_mgs_error_lessthan12">The key length should be 12</string>
<string name="rfid_mgs_error_nohex">Please enter the hexadecimal number content</string>
<string name="rfid_mgs_error_nopwd">Password cannot be empty</string>
<string name="rfid_mgs_error_nolockcode">Lock code cannot be empty</string>
<string name="rfid_mgs_kill_fail">Kill failure</string>
<string name="rfid_mgs_kill_succ">Kill success</string>
<string name="rfid_mgs_lock_succ">Lock success</string>
<string name="rfid_mgs_lock_fail">Lock failure</string>
<string name="rfid_mgs_killpwdtip">Can\'t use the default password</string>
<string name="rfid_mgs_lockpwdtip">Can\'t use the default password</string>
<string name="rfid_mgs_locktip">TipsAfter permanent lock, unable to unlock;After permanent unlock, not locked</string>
<string name="rfid_mgs_error_veri_fail">The key validation fails</string>
<string name="rfid_mgs_error_not_found">Find card failure</string>
<string name="rfid_msg_uid">\nUID</string>
<string name="rfid_msg_type">\nTag type</string>
<string name="rfid_msg_data">\nData</string>
<string name="rfid_msg_read_fail">\nRead failure</string>
<string name="rfid_msg_read_succ">\nRead success</string>
<string name="rfid_msg_write_fail">\nWrite failure</string>
<string name="rfid_msg_write_succ">\nWrite success</string>
<string name="rfid_mgs_error_0not_write">Sector 0 of 0 data block is read-only</string>
<string name="rfid_mgs_error_not_write_null">Content to be written can not be empty</string>
<string name="rfid_mgs_error_not_supper_write">This program does not support the data block write operation, the data is password control block are not familiar with the tag structure please do not write to.</string>
<string name="rfid_msg_1byte_fail">Data should be a byte</string>
<string name="rfid_msg_confirm_title">Are You Sure</string>
<string name="rfid_msg_confirm_true">Confirm</string>
<string name="rfid_msg_confirm_flase">Cancel</string>
<string name="rfid_msg_confirm_afi">After the execution, the AFI of the tag will not be modified!\nlock AFI?</string>
<string name="rfid_msg_confirm_dsfid">After the execution, the DSFID of the tag will not be modified!\nlock DSFID?</string>
<string name="rfid_msg_lock_fail">\nLock AFI failed</string>
<string name="rfid_msg_lock_succ">\nLock AFI success</string>
<string name="uhf_msg_read_tag_fail">Read the Tag failed</string>
<string name="uhf_msg_addr_not_null">Address can\'t be empty</string>
<string name="uhf_msg_addr_must_decimal">Address must be a decimal data</string>
<string name="uhf_msg_addr_must_len8">The length of the access password must be 8</string>
<string name="uhf_msg_write_must_not_null">Write data can not be empty</string>
<string name="uhf_msg_write_must_len4">Write the length of the data string must be 4</string>
<string name="uhf_msg_tag_must_not_null">EPC cannot be empty</string>
<string name="uhf_msg_write_succ">Write data successfully</string>
<string name="uhf_msg_write_fail">Write data failure</string>
<string name="uhf_msg_len_not_null">Length cannot be empty</string>
<string name="uhf_msg_len_must_decimal">Length must be a decimal data</string>
<string name="uhf_msg_write_must_len4x">Write data of the length of the string must be in multiples of four</string>
<string name="uhf_msg_read_data_fail">Read failure</string>
<string name="uhf_msg_inventory_fail">Inventory failure</string>
<string name="uhf_msg_inventory_stop_fail">Stop failure</string>
<string name="uhf_msg_inventory_open_fail">Open failure</string>
<string name="uhf_msg_set_frequency_fail">Set the frequency failure</string>
<string name="uhf_msg_set_frequency_succ">Set the frequency success</string>
<string name="uhf_msg_read_frequency_fail">Read the frequency failure</string>
<string name="uhf_msg_set_pwm_succ">Set the PWM success</string>
<string name="uhf_msg_set_pwm_fail">Set the PWM failure</string>
<string name="uhf_msg_read_pwm_fail">Read the PWM failure</string>
<string name="uhf_msg_read_frequency_succ">Read the frequency success</string>
<string name="uhf_msg_set_power_fail">Set the power failure</string>
<string name="uhf_msg_set_power_succ">Set the power success</string>
<string name="uhf_msg_read_power_fail">Read the power failure</string>
<string name="uhf_msg_read_power_succ">Read the power success</string>
</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,69 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="@android:style/Theme.Holo">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="ActionBarBaseTheme" parent="android:style/Theme.Holo.Light"> </style>
<style name="ActionBarBaseTheme1" parent="android:style/Theme.Holo.Light">
<item name="android:background">@color/white1</item>
<item name="android:textColor">@drawable/check_text_color</item>
</style>
<!-- 将自定义的style取名为CustomTheme父类为Theme.Holo.Light也就是说默认背景是白底黑字如果是Theme.Holo则默认是黑底白字 -->
<style name="CustomTheme" parent="android:style/Theme.Holo.Light">
<!-- 这是item的背景修改不按时透明按时显示绿色 -->
<!-- <item name="android:selectableItemBackground">@color/white1</item> -->
<!-- <item name="android:actionDropDownStyle">@style/MyDropDownNav</item>
<item name="android:dropDownListViewStyle">@style/MyDropDownListView</item>
<item name="android:actionBarTabStyle">@style/MyActionBarTabStyle</item> -->
<item name="android:actionBarTabTextStyle">@style/MyActionBarTabTextStyle</item>
<item name="android:actionBarStyle">@style/MyActionBarStyle</item>
<item name="android:homeAsUpIndicator">@drawable/actionbar_back</item>
</style>
<style name="MyActionBarStyle" parent="@android:style/Widget.Holo.ActionBar">
<!-- <item name="android:background">@color/white</item>
<item name="android:titleTextStyle">@style/MainActivityActionBarTitleTextStyle</item> -->
</style>
<!-- Tab选项标签背景的样式 -->
<style name="MyActionBarTabStyle" parent="android:style/Widget.Holo.Light.ActionBar.TabView">
<!-- <item name="android:background">@color/white</item> -->
</style>
<!-- Tab选项标签字体的样式 -->
<style name="MyActionBarTabTextStyle" parent="android:style/Widget.Holo.Light.ActionBar.TabText">
<item name="android:textColor">@drawable/check_text_color</item>
<item name="android:textSize">16sp</item>
</style>
<!-- 下拉导航外部按钮的样式 -->
<style name="MyDropDownNav" parent="android:style/Widget.Holo.Light.Spinner">
<!-- <item name="android:background">@color/white1</item>
<item name="android:popupBackground">@color/white</item>
<item name="android:dropDownSelector">@color/white1</item> -->
</style>
<!-- 下拉导航内部按钮的样式 -->
<style name="MyDropDownListView" parent="android:style/Widget.Holo.ListView.DropDown">
<!-- <item name="android:listSelector">@color/blue2</item> -->
</style>
</resources>

@ -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…
Cancel
Save