liuzhenxing1118 vor 3 Jahren
Ursprung
Commit
42d4fbc91f

+ 2 - 2
.idea/deploymentTargetDropDown.xml

@@ -7,11 +7,11 @@
         <deviceKey>
           <Key>
             <type value="VIRTUAL_DEVICE_PATH" />
-            <value value="$USER_HOME$/.android/avd/xplora_watch_400.avd" />
+            <value value="$USER_HOME$/.android/avd/xp_360x400_API_33.avd" />
           </Key>
         </deviceKey>
       </Target>
     </targetSelectedWithDropDown>
-    <timeTargetWasSelectedWithDropDown value="2022-07-06T06:24:54.766335Z" />
+    <timeTargetWasSelectedWithDropDown value="2022-07-29T07:41:04.928051Z" />
   </component>
 </project>

+ 1 - 1
.idea/misc.xml

@@ -6,7 +6,7 @@
         <entry key="app/src/main/res/layout-v28/activity_pin.xml" value="0.3374094202898551" />
         <entry key="app/src/main/res/layout/activity_congratulation.xml" value="0.1" />
         <entry key="app/src/main/res/layout/activity_esim_activation.xml" value="0.1" />
-        <entry key="app/src/main/res/layout/activity_input_pin.xml" value="0.1" />
+        <entry key="app/src/main/res/layout/activity_input_pin.xml" value="0.335" />
         <entry key="app/src/main/res/layout/activity_install_sim.xml" value="0.1" />
         <entry key="app/src/main/res/layout/activity_list.xml" value="0.14387031408308004" />
         <entry key="app/src/main/res/layout/activity_main.xml" value="0.1" />

+ 73 - 17
app/src/main/java/com/xplora/xponboarding/Activity/InputPinActivity.java

@@ -2,33 +2,89 @@ package com.xplora.xponboarding.Activity;
 
 import android.content.Intent;
 import android.os.Bundle;
-import android.widget.EditText;
-import android.widget.FrameLayout;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageButton;
+import android.widget.TextView;
 
 import com.xplora.xponboarding.R;
-import com.xplora.xponboarding.Utils.KeyUtils;
 
 public class InputPinActivity extends BaseActivity {
-    EditText password;
-    FrameLayout check;
+    public String mInput = "";
+    private TextView mTextView1 = null;
+    private TextView mTextView2 = null;
+    private TextView mTextView3 = null;
+    private TextView mTextView4 = null;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_input_pin);
-        password = findViewById(R.id.password);
-        check = findViewById(R.id.check);
-        check.setOnClickListener(view -> {
-            Intent intent = new Intent();
-            intent.putExtra("ssid", getIntent().getStringExtra("ssid"));
-            intent.putExtra("bssid", getIntent().getStringExtra("bssid"));
-            intent.putExtra("password", password.getText().toString());
-            setResult(-1, intent);
-            finish();
-        });
-        new KeyUtils(this, password);
+        mTextView1 = findViewById(R.id.text1);
+        mTextView2 = findViewById(R.id.text2);
+        mTextView3 = findViewById(R.id.text3);
+        mTextView4 = findViewById(R.id.text4);
+
+        Button button1 = findViewById(R.id.button1);
+        Button button2 = findViewById(R.id.button2);
+        Button button3 = findViewById(R.id.button3);
+        Button button4 = findViewById(R.id.button4);
+        Button button5 = findViewById(R.id.button5);
+        Button button6 = findViewById(R.id.button6);
+        Button button7 = findViewById(R.id.button7);
+        Button button8 = findViewById(R.id.button8);
+        Button button9 = findViewById(R.id.button9);
+        Button button0 = findViewById(R.id.button0);
+        Button buttonOK = findViewById(R.id.buttonOK);
+        ImageButton buttonBack = findViewById(R.id.buttonBack);
+
+        button1.setOnClickListener(mOnClickListener);
+        button2.setOnClickListener(mOnClickListener);
+        button3.setOnClickListener(mOnClickListener);
+        button4.setOnClickListener(mOnClickListener);
+        button5.setOnClickListener(mOnClickListener);
+        button6.setOnClickListener(mOnClickListener);
+        button7.setOnClickListener(mOnClickListener);
+        button8.setOnClickListener(mOnClickListener);
+        button9.setOnClickListener(mOnClickListener);
+        button0.setOnClickListener(mOnClickListener);
+        buttonOK.setOnClickListener(mOnClickListener);
+        buttonBack.setOnClickListener(mOnClickListener);
+    }
+
+    View.OnClickListener mOnClickListener = new View.OnClickListener() {
+        @Override
+        public void onClick(View v) {
+            String tagS = (String) v.getTag();
+            int tag = Integer.valueOf(tagS);
+            if (tag == 100) {
+                actionBack();
+            } else if (tag == 101) {
+                actionOK();
+            } else {
+                if (mInput.length() >= 4)
+                    return;
+                mInput += tag;
+                showPinCode();
+            }
+        }
+    };
+
+    private void actionBack() {
+        if (mInput.length() <= 0)
+            return;
+        mInput = mInput.substring(0, mInput.length() - 1);
+        showPinCode();
+    }
+
+    private void actionOK() {
+
     }
 
-    private void clickButton() {
+    private void showPinCode() {
+        mTextView1.setText(mInput.length() >= 1 ? String.valueOf(mInput.charAt(0)) : "");
+        mTextView2.setText(mInput.length() >= 2 ? String.valueOf(mInput.charAt(1)) : "");
+        mTextView3.setText(mInput.length() >= 3 ? String.valueOf(mInput.charAt(2)) : "");
+        mTextView4.setText(mInput.length() >= 4 ? String.valueOf(mInput.charAt(3)) : "");
     }
 }

+ 0 - 8
app/src/main/java/com/xplora/xponboarding/Adapter/BaseListAdapter.java

@@ -4,23 +4,16 @@ import android.annotation.SuppressLint;
 import android.content.Context;
 import android.os.Handler;
 import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
-import android.widget.Button;
 import android.widget.CheckBox;
-import android.widget.EditText;
-import android.widget.ImageView;
-import android.widget.Switch;
 import android.widget.TextView;
 
 import com.xplora.xponboarding.Model.BaseModel;
 import com.xplora.xponboarding.R;
 import com.xplora.xponboarding.Utils.Constant;
-import com.xplora.xponboarding.Utils.KeyUtils;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -28,7 +21,6 @@ import java.util.List;
 public class BaseListAdapter extends ArrayAdapter<BaseModel> {
     private Handler mHandler = null;
     List<BaseModel> mBaseObjects = new ArrayList<>();
-    private KeyUtils mKeyUtils = null;
 
     public BaseListAdapter(Context context, int textViewResourceId, List objects) {
         super(context, textViewResourceId, objects);

+ 0 - 261
app/src/main/java/com/xplora/xponboarding/Utils/KeyUtils.java

@@ -1,261 +0,0 @@
-package com.xplora.xponboarding.Utils;
-
-import android.app.Activity;
-import android.content.Context;
-import android.inputmethodservice.Keyboard;
-import android.inputmethodservice.KeyboardView;
-import android.text.Editable;
-import android.util.Log;
-import android.view.View;
-import android.widget.EditText;
-
-import com.xplora.xponboarding.R;
-
-import java.util.Locale;
-import java.util.Objects;
-
-public class KeyUtils {
-
-    private KeyboardView mKeyboardView;
-    private final Keyboard mKeyboard;
-    private final Keyboard mKeyboardShifted;
-    private final Keyboard mKeyboardShiftLocked;
-    private final Keyboard mKeyboardSymbols;
-    private final Keyboard mKeyboardSymbolsShifted;
-    private final EditText mEditText;
-    private boolean isShiftLocked = false;
-
-    public KeyUtils(Context context, EditText editText) {
-        mEditText = editText;
-
-        mKeyboard = new Keyboard(context, R.xml.keyboard_abc);
-        mKeyboard.setShifted(false);
-        mKeyboardShifted = new Keyboard(context, R.xml.keyboard_abc_shifted);
-        mKeyboardShifted.setShifted(true);
-        mKeyboardShiftLocked = new Keyboard(context, R.xml.keyboard_abc_shift_locked);
-        mKeyboardShiftLocked.setShifted(true);
-        mKeyboardSymbols = new Keyboard(context, R.xml.keyboard_symbols);
-        mKeyboardSymbols.setShifted(false);
-        mKeyboardSymbolsShifted = new Keyboard(context, R.xml.keyboard_symbols_shifted);
-        mKeyboardSymbolsShifted.setShifted(true);
-
-        try {
-            mKeyboardView = ((Activity) context).findViewById(R.id.main_keyview);
-            mKeyboardView.setKeyboard(mKeyboard);
-            mKeyboardView.setPreviewEnabled(false);   //这个是,效果图按住是出来的预览图。
-            mKeyboardView.setEnabled(true);
-            mKeyboardView.setVisibility(View.VISIBLE);
-
-            KeyboardView.OnKeyboardActionListener mListener = new KeyboardView.OnKeyboardActionListener() {
-                @Override
-                public void onKey(int primaryCode, int[] keyCodes) {
-                    Log.d("wifikey", "onKey : " + primaryCode);
-                    if (primaryCode == KEY_CODES.KEY_SHIFT.CODES) {
-                        doShift();
-                    } else if (primaryCode == KEY_CODES.KEY_SWITCH.CODES) {
-                        doSwitch();
-                    } else {
-                        updateText(primaryCode);
-                    }
-                }
-
-                @Override
-                public void onPress(int primaryCode) { }
-                @Override
-                public void onRelease(int primaryCode) { }
-                @Override
-                public void onText(CharSequence charSequence) { }
-                @Override
-                public void swipeLeft() { }
-                @Override
-                public void swipeRight() { }
-                @Override
-                public void swipeDown() { }
-                @Override
-                public void swipeUp() { }
-
-            };
-            mKeyboardView.setOnKeyboardActionListener(mListener);
-        } catch (Exception ignored) {
-        }
-    }
-
-    private void doShift() {
-        Keyboard current = mKeyboardView.getKeyboard();
-        boolean shiftStatus = mKeyboardView.getKeyboard().isShifted();
-        if (current.equals(mKeyboard) || current.equals(mKeyboardShifted) || current.equals(mKeyboardShiftLocked)) {
-            if (!shiftStatus) {
-                mKeyboardView.setKeyboard(mKeyboardShifted);
-            } else if (!isShiftLocked) {
-                isShiftLocked = true;
-                mKeyboardView.setKeyboard(mKeyboardShiftLocked);
-            } else {
-                isShiftLocked = false;
-                mKeyboardView.setKeyboard(mKeyboard);
-            }
-        } else {
-            if(!shiftStatus) {
-                isShiftLocked = true;
-                mKeyboardView.setKeyboard(mKeyboardSymbolsShifted);
-            } else {
-                isShiftLocked = false;
-                mKeyboardView.setKeyboard(mKeyboardSymbols);
-            }
-        }
-    }
-
-    private void doSwitch() {
-        Keyboard current = mKeyboardView.getKeyboard();
-        if (current.equals(mKeyboard) || current.equals(mKeyboardShifted) || current.equals(mKeyboardShiftLocked)) {
-            isShiftLocked = false;
-            mKeyboardView.setKeyboard(mKeyboardSymbols);
-        } else {
-            isShiftLocked = false;
-            mKeyboardView.setKeyboard(mKeyboard);
-        }
-    }
-
-    private void updateText(int primaryCode) {
-        String content = KEY_CODES.getLabel(primaryCode);
-        boolean shiftStatus = mKeyboardView.getKeyboard().isShifted();
-        if (primaryCode != KEY_CODES.KEY_DEL.CODES
-                && primaryCode != KEY_CODES.KEY_SPACE.CODES
-                && shiftStatus) {
-            assert content != null;
-            content = content.toUpperCase(Locale.ROOT);
-            if (!isShiftLocked) {
-                mKeyboardView.setKeyboard(mKeyboard);
-            }
-        }
-
-        int index = mEditText.getSelectionStart();
-        Editable contentText = mEditText.getText();
-        switch (Objects.requireNonNull(content)) {
-            case "del":
-                if(index == 0) break;
-                contentText.delete(index - 1, index);
-                break;
-            case "space":
-                contentText.append(" ");
-                break;
-            default:
-                contentText.append(content);
-                break;
-
-        }
-        mEditText.setText(contentText);
-        mEditText.setSelection(contentText.length());
-    }
-
-    enum KEY_CODES {
-        KEY_0(48, "0"),
-        KEY_1(49, "1"),
-        KEY_2(50, "2"),
-        KEY_3(51, "3"),
-        KEY_4(52, "4"),
-        KEY_5(53, "5"),
-        KEY_6(54, "6"),
-        KEY_7(55, "7"),
-        KEY_8(56, "8"),
-        KEY_9(57, "9"),
-
-        KEY_SYMBOLS_AT(64, "@"),
-        KEY_SYMBOLS_POUND(35, "#"),
-        KEY_SYMBOLS_PERCENT(37, "%"),
-        KEY_SYMBOLS_AND(38, "&"),
-        KEY_SYMBOLS_STAR(42, "*"),
-        KEY_SYMBOLS_PLUS(43, "+"),
-        KEY_SYMBOLS_MINUS(45, "-"),
-        KEY_SYMBOLS_EQUALS(61, "="),
-        KEY_SYMBOLS_LEFT_PAREN(40, "("),
-        KEY_SYMBOLS_RIGHT_PAREN(41, ")"),
-        KEY_SYMBOLS_TILDE(126, "~"),
-        KEY_SYMBOLS_SEMI_COLON(34, "\""),
-        KEY_SYMBOLS_APOSTROPHE(39, "'"),
-        KEY_SYMBOLS_COLON(58, ":"),
-        KEY_SYMBOLS_SEMICOLON(59, ";"),
-        KEY_SYMBOLS_SLASH(47, "/"),
-        KEY_SYMBOLS_EXCLAMATION(33, "!"),
-
-        KEY_SYMBOLS_CARET(94, "^"),
-        KEY_SYMBOLS_YUAN(165, "¥"),
-        KEY_SYMBOLS_DOLLAR(36, "$"),
-        KEY_SYMBOLS_LEFT_BRACKET(91, "["),
-        KEY_SYMBOLS_RIGHT_BRACKET(93, "]"),
-        KEY_SYMBOLS_UNDERLINE(95, "_"),
-        KEY_SYMBOLS_LEFT_BRACES(123, "{"),
-        KEY_SYMBOLS_RIGHT_BRACES(125, "}"),
-
-        KEY_SYMBOLS_GRAVE(96, "`"),
-        KEY_SYMBOLS_LEFT_ANGLE_BRACKET(60, "<"),
-        KEY_SYMBOLS_RIGHT_ANGLE_BRACKET(62, ">"),
-        KEY_SYMBOLS_BACKSLASH(92, "\\"),
-        KEY_SYMBOLS_DELIMITER(124, "|"),
-
-        KEY_A(97, "a"),
-        KEY_B(98, "b"),
-        KEY_C(99, "c"),
-        KEY_D(100, "d"),
-        KEY_E(101, "e"),
-        KEY_F(102, "f"),
-        KEY_G(103, "g"),
-        KEY_H(104, "h"),
-        KEY_I(105, "i"),
-        KEY_J(106, "j"),
-        KEY_K(107, "k"),
-        KEY_L(108, "l"),
-        KEY_M(109, "m"),
-        KEY_N(110, "n"),
-        KEY_O(111, "o"),
-        KEY_P(112, "p"),
-        KEY_Q(113, "q"),
-        KEY_R(114, "r"),
-        KEY_S(115, "s"),
-        KEY_T(116, "t"),
-        KEY_U(117, "u"),
-        KEY_V(118, "v"),
-        KEY_W(119, "w"),
-        KEY_X(120, "x"),
-        KEY_Y(121, "y"),
-        KEY_Z(122, "z"),
-
-        KEY_SHIFT(-1, "shift"),
-        KEY_SPACE(32, "space"),
-        KEY_SWITCH(-114, "switch"),
-        KEY_DEL(-100, "del");
-
-        private final int CODES;
-        private final String LABEL;
-
-        private int CODES() {
-            return this.CODES;
-        }
-
-        private String LABEL() {
-            return this.LABEL;
-        }
-
-        public static String getLabel(int code) {
-            KEY_CODES[] keyCodes = values();
-            for (KEY_CODES keyCode : keyCodes) {
-                if (keyCode.CODES() == code) {
-                    return keyCode.LABEL();
-                }
-            }
-            return "UNKNOWN";
-        }
-
-        KEY_CODES(int CODES, String LABEL) {
-            this.CODES = CODES;
-            this.LABEL = LABEL;
-        }
-    }
-
-    public void closeKeyboard() {
-        mKeyboardView.setVisibility(View.GONE);
-    }
-
-    public boolean isKeyboardVisible() {
-        return mKeyboardView.getVisibility() == View.VISIBLE;
-    }
-}

+ 219 - 55
app/src/main/res/layout/activity_input_pin.xml

@@ -1,71 +1,235 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/black"
     android:orientation="vertical"
-    tools:context=".Activity.InputPinActivity">
+    android:background="@color/black"
+    android:layout_marginStart="20dp"
+    android:layout_marginEnd="20dp"
+    >
 
     <LinearLayout
-        android:layout_gravity="center"
-        android:layout_marginTop="20dp"
-        android:background="#292929"
+        android:id="@+id/mEditLayout"
         android:layout_width="match_parent"
-        android:layout_height="30dp">
-
-        <EditText
-            android:layout_marginStart="5dp"
-            android:layout_marginEnd="2dp"
-            android:id="@+id/password"
-            android:layout_gravity="center|start"
-            android:gravity="center_vertical"
-            android:layout_width="106dp"
-            android:background="@null"
+        android:layout_height="32dp"
+        android:layout_marginTop="34dp"
+        android:orientation="horizontal"
+        android:layout_marginStart="10dp"
+        android:layout_marginEnd="10dp"
+        >
+        <TextView
+            android:id="@+id/text1"
+            android:layout_width="30dp"
             android:layout_height="match_parent"
-            android:textSize="15sp"
-            android:maxLines="1"
-            android:lines="1"
-            android:inputType="text"
+            android:background="#262626"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:textFontWeight="600"
             android:textColor="@color/white"
-            tools:ignore="TextFields" />
-        <FrameLayout
-            android:id="@+id/check"
-            android:layout_gravity="center_vertical"
-            android:layout_marginEnd="2dp"
-            android:layout_width="25dp"
-            android:layout_height="25dp">
-
-            <ImageView
-                android:layout_width="25dp"
-                android:layout_height="25dp"
-                android:background="#3A3A3A" />
-
-            <ImageView
-                android:layout_width="16dp"
-                android:layout_height="9dp"
+            android:textSize="18sp"
+            />
+        <TextView
+            android:id="@+id/text2"
+            android:layout_width="30dp"
+            android:layout_height="match_parent"
+            android:layout_marginStart="2dp"
+            android:background="#262626"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:textFontWeight="600"
+            android:textColor="@color/white"
+            android:textSize="18sp"
+            />
+        <TextView
+            android:id="@+id/text3"
+            android:layout_width="30dp"
+            android:layout_height="match_parent"
+            android:layout_marginStart="2dp"
+            android:background="#262626"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:textFontWeight="600"
+            android:textColor="@color/white"
+            android:textSize="18sp"
+            />
+        <TextView
+            android:id="@+id/text4"
+            android:layout_width="30dp"
+            android:layout_height="match_parent"
+            android:layout_marginStart="2dp"
+            android:background="#262626"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:textFontWeight="600"
+            android:textColor="@color/white"
+            android:textSize="18sp"
+            />
+    </LinearLayout>
 
-                android:layout_gravity="center"
-                android:src="@drawable/ic_keyboard_check" />
+    <LinearLayout
+        android:id="@+id/mLine1Layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="5dp"
+        android:orientation="horizontal"
+        android:layout_weight="1"
+        >
+        <Button
+            android:id="@+id/button1"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="1"
+            android:tag="1" />
+        <Button
+            android:id="@+id/button2"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="2"
+            android:tag="2" />
+        <Button
+            android:id="@+id/button3"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="3"
+            android:tag="3" />
+    </LinearLayout>
 
-        </FrameLayout>
+    <LinearLayout
+        android:id="@+id/mLine2Layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:layout_weight="1"
+        >
+        <Button
+            android:id="@+id/button4"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="4"
+            android:tag="4" />
+        <Button
+            android:id="@+id/button5"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="5"
+            android:tag="5" />
+        <Button
+            android:id="@+id/button6"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="6"
+            android:tag="6" />
+    </LinearLayout>
 
+    <LinearLayout
+        android:id="@+id/mLine3Layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:layout_weight="1"
+        >
+        <Button
+            android:id="@+id/button7"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="7"
+            android:tag="7" />
+        <Button
+            android:id="@+id/button8"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="8"
+            android:tag="8" />
+        <Button
+            android:id="@+id/button9"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="9"
+            android:tag="9" />
     </LinearLayout>
 
-    <android.inputmethodservice.KeyboardView
-        android:id="@+id/main_keyview"
-        android:background="@color/black"
+    <LinearLayout
+        android:id="@+id/mLine4Layout"
         android:layout_width="match_parent"
-        android:layout_height="125dp"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:keyBackground="@color/black"
-        android:keyTextColor="@color/white"
-        android:layout_gravity="center"
-        android:keyTextSize="14sp"
-        android:labelTextSize="14sp"
-        android:layout_alignParentBottom="true"
-        android:layout_centerHorizontal="true"
-        />
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:layout_weight="1"
+        android:layout_marginBottom="10dp"
+        >
+        <ImageButton
+            android:id="@+id/buttonBack"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:backgroundTint="@color/transparent"
+            android:src="@drawable/pin_delete"
+            android:layout_weight="1"
+            android:tag="100" />
+        <Button
+            android:id="@+id/button0"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:textColor="#FBD460"
+            android:text="0"
+            android:tag="0" />
+        <Button
+            android:id="@+id/buttonOK"
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:background="@color/transparent"
+            android:layout_weight="1"
+            android:textFontWeight="800"
+            android:textSize="12sp"
+            android:text="OK"
+            android:tag="101" />
+    </LinearLayout>
 
-</RelativeLayout>
+</LinearLayout>

+ 0 - 208
app/src/main/res/layout/activity_pin.xml

@@ -1,208 +0,0 @@
-<?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"
-    android:background="@color/black"
-    android:layout_marginStart="20dp"
-    android:layout_marginEnd="20dp"
-    >
-
-    <LinearLayout
-        android:id="@+id/mEditLayout"
-        android:layout_width="match_parent"
-        android:layout_height="32dp"
-        android:layout_marginTop="34dp"
-        android:orientation="horizontal"
-        android:layout_marginStart="10dp"
-        android:layout_marginEnd="10dp"
-        >
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:background="#262626"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:textFontWeight="600"
-            android:textSize="18sp"
-            android:text="8"
-            />
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_marginStart="2dp"
-            android:background="#262626"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:textFontWeight="600"
-            android:textSize="18sp"
-            android:text="8"
-            />
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_marginStart="2dp"
-            android:background="#262626"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:textFontWeight="600"
-            android:textSize="18sp"
-            android:text="8"
-            />
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_marginStart="2dp"
-            android:background="#262626"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:textFontWeight="600"
-            android:textSize="18sp"
-            android:text="8"
-            />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/mLine1Layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="5dp"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="1" />
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="2" />
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="3" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/mLine2Layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="4" />
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="5" />
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="6" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/mLine3Layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        >
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="7" />
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="8" />
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="9" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/mLine4Layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:layout_weight="1"
-        android:layout_marginBottom="10dp"
-        >
-        <ImageButton
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:backgroundTint="@color/transparent"
-            android:src="@drawable/pin_delete"
-            android:layout_weight="1"
-            />
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:textColor="#FBD460"
-            android:text="0" />
-        <Button
-            android:layout_width="50dp"
-            android:layout_height="wrap_content"
-            android:background="@color/transparent"
-            android:layout_weight="1"
-            android:textFontWeight="800"
-            android:textSize="12sp"
-            android:text="OK" />
-    </LinearLayout>
-
-</LinearLayout>