Commit 8cf2d821 authored by YONG-LIN SU's avatar YONG-LIN SU

移植車牌輸入功能

parent be9849d8
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_main.xml" value="0.34375" /> <entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_main.xml" value="0.34375" />
<entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t01_bulletin_board.xml" value="0.34375" /> <entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t01_bulletin_board.xml" value="0.34375" />
<entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t01_import_db.xml" value="0.34375" /> <entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t01_import_db.xml" value="0.34375" />
<entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t02_key_in_plate_number.xml" value="0.34375" />
<entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t02_select_road.xml" value="0.34375" /> <entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t02_select_road.xml" value="0.34375" />
<entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t02_select_space.xml" value="0.34375" /> <entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t02_select_space.xml" value="0.34375" />
<entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t02_select_vehicle_type.xml" value="0.34375" /> <entry key="..\:/Users/pp931/Desktop/RD/Projects/NewParkApp/app/src/main/res/layout/activity_t02_select_vehicle_type.xml" value="0.34375" />
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" android:theme="@style/Theme.AppCompat.Light.NoActionBar"
tools:targetApi="31"> tools:targetApi="31">
<activity
android:name=".view.T02KeyInPlateNumberActivity"
android:exported="false" />
<activity <activity
android:name=".view.T02SelectRoadActivity" android:name=".view.T02SelectRoadActivity"
android:exported="false" /> android:exported="false" />
......
...@@ -586,4 +586,76 @@ public class Common { ...@@ -586,4 +586,76 @@ public class Common {
img = Bitmap.createBitmap(img, 0, 0, width, height, matrix, true); img = Bitmap.createBitmap(img, 0, 0, width, height, matrix, true);
return img; return img;
} }
public static boolean plateRuleCheck(String plateNumber) {
boolean isLegal = true;
// 空字串處理
if (plateNumber == null || plateNumber.length() == 0 || plateNumber.trim().isEmpty() || plateNumber.length() > 7){
isLegal = false;
}
return isLegal;
}
public static String plateModifyByRule(String plateNumber){
if (plateNumber.length() <= 7 ){
int dashIndex = plateNumber.indexOf("-");
if (dashIndex == -1){
return plateNumber;
}
boolean flag = false;
int asciiA = 'A';
int asciiZ = 'Z';
if (dashIndex == 2 || dashIndex == 3){
for (int i = 0 ; i < dashIndex; i++){
int c = plateNumber.charAt(i);
if (c >= asciiA && c <= asciiZ ){
flag = true;
break;
}
}
if (flag){
for (int i = 0; i < dashIndex; i ++){
if (plateNumber.charAt(i) == '1'){
String newPlateNumber = plateNumber.substring(0, i) + "I" + plateNumber.substring(i+1);
plateNumber = newPlateNumber;
}
if (plateNumber.charAt(i) == '0'){
String newPlateNumber = plateNumber.substring(0, i) + "O" + plateNumber.substring(i+1);
plateNumber = newPlateNumber;
}
}
}
}
if (dashIndex > 3){
for (int i = dashIndex +1 ; i < plateNumber.length(); i++){
int c = plateNumber.charAt(i);
if (c >= asciiA && c <= asciiZ ){
flag = true;
break;
}
}
if (flag){
for (int i = dashIndex +1 ; i < plateNumber.length(); i++){
if (plateNumber.charAt(i) == '1'){
String newPlateNumber = plateNumber.substring(0, i) + "I" + plateNumber.substring(i+1);
plateNumber = newPlateNumber;
}
if (plateNumber.charAt(i) == '0'){
String newPlateNumber = plateNumber.substring(0, i) + "O" + plateNumber.substring(i+1);
plateNumber = newPlateNumber;
}
}
}
}
}else {
String newPlateNumber = plateNumber.substring(0,7);
return plateModifyByRule(newPlateNumber);
}
return plateNumber;
}
} }
package ecom.android.newparkapp.view;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.content.Intent;
import android.os.Bundle;
import ecom.android.newparkapp.Common;
import ecom.android.newparkapp.R;
import ecom.android.newparkapp.databinding.ActivityT02KeyInPlateNumberBinding;
public class T02KeyInPlateNumberActivity extends AppCompatActivity {
private ActivityT02KeyInPlateNumberBinding dataBinding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
dataBinding = DataBindingUtil.setContentView(this, R.layout.activity_t02_key_in_plate_number);
eventBinding();
}
private void eventBinding() {
dataBinding.btn0.setOnClickListener(view -> keyIn("0"));
dataBinding.btn1.setOnClickListener(view -> keyIn("1"));
dataBinding.btn2.setOnClickListener(view -> keyIn("2"));
dataBinding.btn3.setOnClickListener(view -> keyIn("3"));
dataBinding.btn4.setOnClickListener(view -> keyIn("4"));
dataBinding.btn5.setOnClickListener(view -> keyIn("5"));
dataBinding.btn6.setOnClickListener(view -> keyIn("6"));
dataBinding.btn7.setOnClickListener(view -> keyIn("7"));
dataBinding.btn8.setOnClickListener(view -> keyIn("8"));
dataBinding.btn9.setOnClickListener(view -> keyIn("9"));
dataBinding.btnA.setOnClickListener(view -> keyIn("A"));
dataBinding.btnB.setOnClickListener(view -> keyIn("B"));
dataBinding.btnC.setOnClickListener(view -> keyIn("C"));
dataBinding.btnD.setOnClickListener(view -> keyIn("D"));
dataBinding.btnE.setOnClickListener(view -> keyIn("E"));
dataBinding.btnF.setOnClickListener(view -> keyIn("F"));
dataBinding.btnG.setOnClickListener(view -> keyIn("G"));
dataBinding.btnH.setOnClickListener(view -> keyIn("H"));
dataBinding.btnI.setOnClickListener(view -> keyIn("I"));
dataBinding.btnJ.setOnClickListener(view -> keyIn("J"));
dataBinding.btnK.setOnClickListener(view -> keyIn("K"));
dataBinding.btnL.setOnClickListener(view -> keyIn("L"));
dataBinding.btnM.setOnClickListener(view -> keyIn("M"));
dataBinding.btnN.setOnClickListener(view -> keyIn("N"));
dataBinding.btnO.setOnClickListener(view -> keyIn("O"));
dataBinding.btnP.setOnClickListener(view -> keyIn("P"));
dataBinding.btnQ.setOnClickListener(view -> keyIn("Q"));
dataBinding.btnR.setOnClickListener(view -> keyIn("R"));
dataBinding.btnS.setOnClickListener(view -> keyIn("S"));
dataBinding.btnT.setOnClickListener(view -> keyIn("T"));
dataBinding.btnU.setOnClickListener(view -> keyIn("U"));
dataBinding.btnV.setOnClickListener(view -> keyIn("V"));
dataBinding.btnW.setOnClickListener(view -> keyIn("W"));
dataBinding.btnX.setOnClickListener(view -> keyIn("X"));
dataBinding.btnY.setOnClickListener(view -> keyIn("Y"));
dataBinding.btnZ.setOnClickListener(view -> keyIn("Z"));
dataBinding.btnDash.setOnClickListener(view -> keyIn("-"));
dataBinding.btnArmyPltno.setOnClickListener(view -> KeyInSpecial("軍"));
dataBinding.btnTempPltno.setOnClickListener(view -> KeyInSpecial("臨"));
dataBinding.btnDelete.setOnClickListener(view -> backSpace());
dataBinding.btnInputConfirm.setOnClickListener(view -> confirm());
}
private void keyIn(String word){
String newPlateNumber = dataBinding.editText.getText().toString() + word;
if (Common.plateRuleCheck(newPlateNumber)){
dataBinding.editText.setText(newPlateNumber);
}
}
private void KeyInSpecial(String word){
String currentSpecialString = dataBinding.isSpecial.getText().toString();
switch (word){
case "軍":
if (currentSpecialString.equals("軍")){
dataBinding.isSpecial.setText("");
}else {
dataBinding.isSpecial.setText("軍");
}
break;
case "臨":
if (currentSpecialString.equals("臨")){
dataBinding.isSpecial.setText("");
}else {
dataBinding.isSpecial.setText("臨");
}
break;
default:
break;
}
}
private void backSpace(){
String currentPlateNumber = dataBinding.editText.getText().toString();
if (currentPlateNumber.length() > 0){
String newPlateNumber = currentPlateNumber.substring(0, currentPlateNumber.length() - 1);
dataBinding.editText.setText(newPlateNumber);
}
}
private void confirm(){
Intent intent = getIntent();
intent.putExtra("PlateNumber", dataBinding.editText.getText().toString());
setResult(RESULT_OK, intent);
finish();
}
}
\ No newline at end of file
...@@ -34,6 +34,7 @@ public class T02StartActivity extends AppCompatActivity { ...@@ -34,6 +34,7 @@ public class T02StartActivity extends AppCompatActivity {
private ActivityResultLauncher vehicleTypeResultLauncher; private ActivityResultLauncher vehicleTypeResultLauncher;
private ActivityResultLauncher spaceResultLauncher; private ActivityResultLauncher spaceResultLauncher;
private ActivityResultLauncher plateNumberResultLauncher;
private User currentUser; private User currentUser;
@Override @Override
...@@ -60,6 +61,8 @@ public class T02StartActivity extends AppCompatActivity { ...@@ -60,6 +61,8 @@ public class T02StartActivity extends AppCompatActivity {
dataBinding.btnParkingSpace.setOnClickListener(v -> btnParkingSpaceOnClicked()); dataBinding.btnParkingSpace.setOnClickListener(v -> btnParkingSpaceOnClicked());
dataBinding.btnVehicleType.setOnClickListener(v -> btnVehicleTypeOnClicked()); dataBinding.btnVehicleType.setOnClickListener(v -> btnVehicleTypeOnClicked());
dataBinding.btnTimeNow.setOnClickListener(v -> btnTimeNowOnClicked()); dataBinding.btnTimeNow.setOnClickListener(v -> btnTimeNowOnClicked());
dataBinding.btnPlateNumber.setOnClickListener(v-> btnPlateNumberOnClicked());
dataBinding.btnStartBack.setOnClickListener(v -> {finish();});
} }
private void resultLauncherRegister(){ private void resultLauncherRegister(){
...@@ -80,13 +83,19 @@ public class T02StartActivity extends AppCompatActivity { ...@@ -80,13 +83,19 @@ public class T02StartActivity extends AppCompatActivity {
t02StartViewModel.setSpace(selectedSpace); t02StartViewModel.setSpace(selectedSpace);
} }
}); });
plateNumberResultLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
if (result.getResultCode() == RESULT_OK && result.getData() != null){
String plateNumber = result.getData().getStringExtra("PlateNumber");
t02StartViewModel.setPlateNumber(plateNumber);
}
});
} }
private void observeBinding(){ private void observeBinding(){
} }
private void btnParkingSpaceOnClicked(){ private void btnParkingSpaceOnClicked(){
Intent intent = new Intent(); Intent intent = new Intent();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
...@@ -118,4 +127,10 @@ public class T02StartActivity extends AppCompatActivity { ...@@ -118,4 +127,10 @@ public class T02StartActivity extends AppCompatActivity {
builder.create().show(); builder.create().show();
} }
private void btnPlateNumberOnClicked(){
Intent intent = new Intent();
intent.setClass(this, T02KeyInPlateNumberActivity.class);
plateNumberResultLauncher.launch(intent);
}
} }
\ No newline at end of file
...@@ -72,6 +72,12 @@ public class T02StartViewModel extends AndroidViewModel { ...@@ -72,6 +72,12 @@ public class T02StartViewModel extends AndroidViewModel {
currentCase.setValue(tempCase); currentCase.setValue(tempCase);
} }
public void setPlateNumber(String plateNumber) {
Case tempCase = currentCase.getValue();
tempCase.plateNumber = plateNumber;
currentCase.setValue(tempCase);
}
public void initCurrentCase(){ public void initCurrentCase(){
currentCase.setValue(newCase()); currentCase.setValue(newCase());
} }
...@@ -170,4 +176,6 @@ public class T02StartViewModel extends AndroidViewModel { ...@@ -170,4 +176,6 @@ public class T02StartViewModel extends AndroidViewModel {
++nIdx; ++nIdx;
Common.updateTXT(getApplication(), szPath, "00", String.valueOf(nIdx)); Common.updateTXT(getApplication(), szPath, "00", String.valueOf(nIdx));
} }
} }
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="10dp"
android:paddingTop="10dp"
android:paddingEnd="10dp"
android:paddingBottom="50dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/enterTitle_txv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.333"
android:gravity="center"
android:textAlignment="inherit"
android:textSize="32sp"
tools:ignore="NestedWeights" />
<Button
android:id="@+id/btn_input_confirm"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.67"
android:text="確認"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/isSpecial"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.42"
android:gravity="center"
android:textAlignment="inherit"
android:textSize="32sp"
tools:ignore="NestedWeights" />
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.26"
android:ems="10"
android:inputType="textPersonName"
android:textSize="32sp"
tools:ignore="Autofill,LabelFor" />
<Button
android:id="@+id/btn_delete"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.34"
android:paddingLeft="0dp"
android:paddingTop="0dp"
android:paddingRight="0dp"
android:paddingBottom="0dp"
android:text="←"
android:textAlignment="center"
android:textSize="32sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="@+id/btn_army_pltno"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.33"
android:text="軍用"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText,NestedWeights" />
<Button
android:id="@+id/btn_temp_pltno"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.33"
android:text="臨時"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_dash"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.33"
android:paddingLeft="0dp"
android:paddingTop="0dp"
android:paddingRight="0dp"
android:paddingBottom="0dp"
android:text="-"
android:textAlignment="center"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="@+id/btn_A"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="A"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText,NestedWeights" />
<Button
android:id="@+id/btn_B"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="B"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_C"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="C"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="7"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_8"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="8"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_9"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="9"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="@+id/btn_D"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="D"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText,NestedWeights" />
<Button
android:id="@+id/btn_E"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="E"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_F"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="F"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="4"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="5"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_6"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="6"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="@+id/btn_G"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="G"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText,NestedWeights" />
<Button
android:id="@+id/btn_H"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="H"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_I"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="I"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="1"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="2"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="3"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="@+id/btn_J"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="J"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText,NestedWeights" />
<Button
android:id="@+id/btn_K"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="K"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_L"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="L"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_M"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="M"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_0"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="0"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_N"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="N"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="@+id/btn_O"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="O"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText,NestedWeights" />
<Button
android:id="@+id/btn_P"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="P"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_Q"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="Q"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_R"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="R"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_S"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="S"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_T"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="T"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="@+id/btn_U"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="U"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText,NestedWeights" />
<Button
android:id="@+id/btn_V"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="V"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_W"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="W"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_X"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="X"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_Y"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="Y"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
<Button
android:id="@+id/btn_Z"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="Z"
android:textSize="32sp"
tools:ignore="ButtonStyle,HardcodedText" />
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
...@@ -126,7 +126,6 @@ tools:layout_editor_absoluteY="25dp"> ...@@ -126,7 +126,6 @@ tools:layout_editor_absoluteY="25dp">
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.87" android:layout_weight="0.87"
android:onClick="startBackOnck"
android:text="@string/label_back" android:text="@string/label_back"
android:textSize="20sp" /> android:textSize="20sp" />
</LinearLayout> </LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment