USB 연결
This commit is contained in:
17
.idea/deploymentTargetDropDown.xml
generated
17
.idea/deploymentTargetDropDown.xml
generated
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="d" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2022-08-17T19:22:50.025295100Z" />
|
||||
</component>
|
||||
</project>
|
||||
7
.idea/misc.xml
generated
7
.idea/misc.xml
generated
@@ -16,17 +16,24 @@
|
||||
<entry key="..\:/QTagger/QTagger4/app/src/main/res/layout/activity_account_modify.xml" value="0.5390625" />
|
||||
<entry key="..\:/QTagger/QTagger4/app/src/main/res/layout/activity_test.xml" value="0.4082792207792208" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/drawable/button_normal_background.xml" value="0.316" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/drawable/spinner_background.xml" value="0.316" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/drawable/tablelayout_background.xml" value="0.316" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/font/font.xml" value="0.34322916666666664" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/activity_account_add.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/activity_account_modify.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/activity_main.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/activity_navigation.xml" value="0.2984375" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/activity_photography.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/activity_photography2.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/fragment_filling_per.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/fragment_search.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/fragment_select.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/fragment_setting.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/fragment_shot.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/fragment_surface_radiation.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/layout/fragment_test.xml" value="0.31302083333333336" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/menu/bottom_nav_menu.xml" value="0.25598290598290596" />
|
||||
<entry key="..\:/QTagger/QTagger_Android2/app/src/main/res/xml/usb_device_filter.xml" value="0.31302083333333336" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@@ -33,7 +33,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'com.github.mik3y:usb-serial-for-android:3.3.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.0'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
@@ -43,4 +43,5 @@ dependencies {
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
annotationProcessor 'androidx.room:room-compiler:2.4.3'
|
||||
implementation fileTree(dir: 'C:\\lib\\libs-wsmr', include: ['*.aar', '*.jar'], exclude: [])
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
@@ -32,11 +33,19 @@
|
||||
android:theme="@style/Theme.QTagger"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".PhotographyActivity"
|
||||
android:name=".Activity.PhotographyActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".Activity.NavigationActivity"
|
||||
android:exported="false" />
|
||||
android:exported="false">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
|
||||
android:resource="@xml/usb_device_filter" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".Activity.AccountModify"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.qtagger.Activity.NaviFragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import com.qtagger.Activity.NavigationActivity;
|
||||
import com.qtagger.R;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link ShotFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class ShotFragment extends Fragment {
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
private Spinner spinner;
|
||||
|
||||
public ShotFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment ShotFragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static ShotFragment newInstance(String param1, String param2) {
|
||||
ShotFragment fragment = new ShotFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View mainView = inflater.inflate(R.layout.fragment_shot, container, false);
|
||||
spinner = (Spinner)mainView.findViewById(R.id.spinner_shotType);
|
||||
|
||||
mainView.findViewById(R.id.button_start).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mainView.findViewById(R.id.button_reader).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(spinner.getSelectedItemId() == 0)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
//RFID
|
||||
if (position == 0) {
|
||||
mainView.findViewById(R.id.imageView2).setVisibility(View.VISIBLE);
|
||||
mainView.findViewById(R.id.seekbar_reader_type).setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
//Barcode
|
||||
else
|
||||
{
|
||||
mainView.findViewById(R.id.imageView2).setVisibility(View.INVISIBLE);
|
||||
mainView.findViewById(R.id.seekbar_reader_type).setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// Inflate the layout for this fragment
|
||||
return mainView;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -79,7 +79,8 @@ public class TestFragment extends Fragment {
|
||||
view.findViewById(R.id.button_표면).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
//changeFragmentShot
|
||||
((NavigationActivity) getActivity()).changeFragmentShot();
|
||||
}
|
||||
});
|
||||
view.findViewById(R.id.button_1m).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@@ -5,6 +5,10 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.hardware.usb.UsbDevice;
|
||||
import android.hardware.usb.UsbManager;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MenuItem;
|
||||
@@ -12,11 +16,17 @@ import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
import com.google.android.material.internal.NavigationMenu;
|
||||
import com.hoho.android.usbserial.driver.UsbSerialDriver;
|
||||
import com.hoho.android.usbserial.driver.UsbSerialProber;
|
||||
import com.qtagger.Activity.NaviFragment.FillingPerFragment;
|
||||
import com.qtagger.Activity.NaviFragment.SearchFragment;
|
||||
import com.qtagger.Activity.NaviFragment.SelectFragment;
|
||||
import com.qtagger.Activity.NaviFragment.SettingFragment;
|
||||
import com.qtagger.Activity.NaviFragment.ShotFragment;
|
||||
import com.qtagger.Activity.NaviFragment.TestFragment;
|
||||
import com.qtagger.Data.CustomProber;
|
||||
import com.qtagger.Data.TestEnum;
|
||||
import com.qtagger.Data.UsbItem;
|
||||
import com.qtagger.R;
|
||||
import com.qtagger.databinding.ActivityMainBinding;
|
||||
import com.qtagger.util.DataManager;
|
||||
@@ -28,9 +38,17 @@ public class NavigationActivity extends AppCompatActivity {
|
||||
private SearchFragment searchFragment = new SearchFragment();
|
||||
private SettingFragment settingFragment = new SettingFragment();
|
||||
private SelectFragment selectFragment = new SelectFragment();
|
||||
private FillingPerFragment fillingPerFragment = new FillingPerFragment();
|
||||
private ShotFragment shotFragment = new ShotFragment();
|
||||
private DataManager dataManager = DataManager.getInstance();
|
||||
public BottomNavigationView bottomNavigationView;
|
||||
|
||||
//방사선량 장비 제품
|
||||
//private static String M_PRODUCT_NAME = "TTL232R";
|
||||
private static String M_PRODUCT_NAME = "FT232R USB UART";
|
||||
private int baudRate = 9600;
|
||||
private UsbItem item;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -52,8 +70,6 @@ public class NavigationActivity extends AppCompatActivity {
|
||||
class ItemSelectedListener implements BottomNavigationView.OnNavigationItemSelectedListener {
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
|
||||
FragmentTransaction transaction = dataManager.fragmentManager.beginTransaction();
|
||||
|
||||
changeFragment(menuItem.getItemId());
|
||||
return true;
|
||||
}
|
||||
@@ -123,7 +139,51 @@ public class NavigationActivity extends AppCompatActivity {
|
||||
FragmentTransaction transaction = dataManager.fragmentManager.beginTransaction();
|
||||
transaction.replace(R.id.frame, searchFragment).commitAllowingStateLoss();
|
||||
}
|
||||
public void changeFragmentShot()
|
||||
{
|
||||
FragmentTransaction transaction = dataManager.fragmentManager.beginTransaction();
|
||||
transaction.replace(R.id.frame, shotFragment).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
void refresh() {
|
||||
UsbManager usbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
|
||||
UsbSerialProber usbDefaultProber = UsbSerialProber.getDefaultProber();
|
||||
UsbSerialProber usbCustomProber = CustomProber.getCustomProber();
|
||||
|
||||
item = null;
|
||||
for(UsbDevice device : usbManager.getDeviceList().values()) {
|
||||
UsbSerialDriver driver = usbDefaultProber.probeDevice(device);
|
||||
if(driver == null) {
|
||||
driver = usbCustomProber.probeDevice(device);
|
||||
}
|
||||
if(driver != null) {
|
||||
for(int port = 0; port < driver.getPorts().size(); port++)
|
||||
{
|
||||
//Toast.makeText(getActivity(), device+":" + port + ":"+driver, Toast.LENGTH_SHORT).show();
|
||||
if(device.getProductName().equals(M_PRODUCT_NAME))
|
||||
{
|
||||
item = new UsbItem(device, port, driver);
|
||||
Toast.makeText(this, "connecting success!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
Toast.makeText(this, "Not find " + M_PRODUCT_NAME, Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// item = new UsbItem(device, 0, driver);
|
||||
Toast.makeText(this, "driver null", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
15
app/src/main/java/com/qtagger/Data/CustomProber.java
Normal file
15
app/src/main/java/com/qtagger/Data/CustomProber.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package com.qtagger.Data;
|
||||
|
||||
import com.hoho.android.usbserial.driver.CdcAcmSerialDriver;
|
||||
import com.hoho.android.usbserial.driver.ProbeTable;
|
||||
import com.hoho.android.usbserial.driver.UsbSerialProber;
|
||||
|
||||
public class CustomProber {
|
||||
|
||||
public static UsbSerialProber getCustomProber() {
|
||||
ProbeTable customTable = new ProbeTable();
|
||||
customTable.addProduct(0x16d0, 0x087e, CdcAcmSerialDriver.class); // e.g. Digispark CDC
|
||||
return new UsbSerialProber(customTable);
|
||||
}
|
||||
|
||||
}
|
||||
5
app/src/main/java/com/qtagger/Data/FragmentEnum.java
Normal file
5
app/src/main/java/com/qtagger/Data/FragmentEnum.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package com.qtagger.Data;
|
||||
|
||||
public enum FragmentEnum {
|
||||
|
||||
}
|
||||
23
app/src/main/java/com/qtagger/Data/UsbItem.java
Normal file
23
app/src/main/java/com/qtagger/Data/UsbItem.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.qtagger.Data;
|
||||
|
||||
|
||||
import android.hardware.usb.UsbDevice;
|
||||
|
||||
import com.hoho.android.usbserial.driver.CdcAcmSerialDriver;
|
||||
import com.hoho.android.usbserial.driver.ProbeTable;
|
||||
import com.hoho.android.usbserial.driver.UsbSerialDriver;
|
||||
import com.hoho.android.usbserial.driver.UsbSerialProber;
|
||||
|
||||
|
||||
public class UsbItem {
|
||||
UsbDevice device;
|
||||
int port;
|
||||
UsbSerialDriver driver;
|
||||
|
||||
public UsbItem(UsbDevice device, int port, UsbSerialDriver driver) {
|
||||
this.device = device;
|
||||
this.port = port;
|
||||
this.driver = driver;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
app/src/main/res/drawable/rfid_icon_32.png
Normal file
BIN
app/src/main/res/drawable/rfid_icon_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -10,6 +10,9 @@
|
||||
android:bottomRightRadius="6dp"
|
||||
android:topLeftRadius="6dp"
|
||||
android:topRightRadius="6dp" />
|
||||
<padding
|
||||
android:left="10dp"
|
||||
/>
|
||||
<!-- 1dp 크기의 #000000 색 테두리 -->
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Activity.NaviFragment.PhotographyActivity">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
124
app/src/main/res/layout/fragment_shot.xml
Normal file
124
app/src/main/res/layout/fragment_shot.xml
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".Activity.NaviFragment.ShotFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
android:id="@+id/imageFilterButton_Back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFF"
|
||||
android:minWidth="48dp"
|
||||
android:minHeight="48dp"
|
||||
android:src="@drawable/back_arrow_5821"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewAccountAccTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="검사"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="#000000"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textViewAccountAccTitle" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_shotType"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/spinner_background"
|
||||
android:entries="@array/shotType"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view2"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:src="@drawable/rfid_icon_32"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/spinner_shotType"
|
||||
/>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_reader_type"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_weight="0.2"
|
||||
android:max="300"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/spinner_shotType"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_start"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@color/black"
|
||||
android:backgroundTint="#000000"
|
||||
android:text="측정 시작"
|
||||
android:textColor="#FFFFFF"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/button_reader"
|
||||
app:layout_constraintTop_toBottomOf="@+id/seekbar_reader_type" />
|
||||
|
||||
<android.widget.Button
|
||||
android:id="@+id/button_reader"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:background="@color/black"
|
||||
android:backgroundTint="#000000"
|
||||
android:text="촬영"
|
||||
android:textColor="#FFFFFF"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/button_start"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -3,12 +3,62 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".Activity.NaviFragment.SurfaceRadiationFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
android:id="@+id/imageFilterButton_Back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFF"
|
||||
android:minWidth="48dp"
|
||||
android:minHeight="48dp"
|
||||
android:src="@drawable/back_arrow_5821"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewAccountAccTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="검사"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="#000000"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textViewAccountAccTitle" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_account"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/spinner_background"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view2"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
8
app/src/main/res/values/arrays.xml
Normal file
8
app/src/main/res/values/arrays.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="shotType">
|
||||
<item>RFID</item>
|
||||
<item>Barcode</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
35
app/src/main/res/xml/usb_device_filter.xml
Normal file
35
app/src/main/res/xml/usb_device_filter.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- - - - default prober - - - -->
|
||||
|
||||
<!-- 0x0403 / 0x60??: FTDI -->
|
||||
<usb-device vendor-id="1027" product-id="24577" /> <!-- 0x6001: FT232R -->
|
||||
<usb-device vendor-id="1027" product-id="24592" /> <!-- 0x6010: FT2232H -->
|
||||
<usb-device vendor-id="1027" product-id="24593" /> <!-- 0x6011: FT4232H -->
|
||||
<usb-device vendor-id="1027" product-id="24596" /> <!-- 0x6014: FT232H -->
|
||||
<usb-device vendor-id="1027" product-id="24597" /> <!-- 0x6015: FT230X, FT231X, FT234XD -->
|
||||
|
||||
<!-- 0x10C4 / 0xEA??: Silabs CP210x -->
|
||||
<usb-device vendor-id="4292" product-id="60000" /> <!-- 0xea60: CP2102 and other CP210x single port devices -->
|
||||
<usb-device vendor-id="4292" product-id="60016" /> <!-- 0xea70: CP2105 -->
|
||||
<usb-device vendor-id="4292" product-id="60017" /> <!-- 0xea71: CP2108 -->
|
||||
|
||||
<!-- 0x067B / 0x2303: Prolific PL2303 -->
|
||||
<usb-device vendor-id="1659" product-id="8963" />
|
||||
|
||||
<!-- 0x1a86 / 0x?523: Qinheng CH34x -->
|
||||
<usb-device vendor-id="6790" product-id="21795" /> <!-- 0x5523: CH341A -->
|
||||
<usb-device vendor-id="6790" product-id="29987" /> <!-- 0x7523: CH340 -->
|
||||
|
||||
<!-- CDC driver -->
|
||||
<usb-device vendor-id="9025" /> <!-- 0x2341 / ......: Arduino -->
|
||||
<usb-device vendor-id="5824" product-id="1155" /> <!-- 0x16C0 / 0x0483: Teensyduino -->
|
||||
<usb-device vendor-id="1003" product-id="8260" /> <!-- 0x03EB / 0x2044: Atmel Lufa -->
|
||||
<usb-device vendor-id="7855" product-id="4" /> <!-- 0x1eaf / 0x0004: Leaflabs Maple -->
|
||||
<usb-device vendor-id="3368" product-id="516" /> <!-- 0x0d28 / 0x0204: ARM mbed -->
|
||||
|
||||
<!-- - - - custom prober - - - -->
|
||||
|
||||
<!-- CDC driver -->
|
||||
<usb-device vendor-id="5840" product-id="2174" /> <!-- 0x16d0 / 0x087e: Digispark -->
|
||||
</resources>
|
||||
@@ -10,6 +10,7 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
rootProject.name = "QTagger"
|
||||
|
||||
Reference in New Issue
Block a user