liuzhenxing1118 3 年之前
父節點
當前提交
7aaa340227

+ 2 - 2
.idea/misc.xml

@@ -47,11 +47,11 @@
         <entry key="app/src/main/res/layout/item_wifi_switch.xml" value="0.1" />
         <entry key="app/src/main/res/layout/item_xpstyle.xml" value="0.16055045871559634" />
         <entry key="app/src/main/res/layout/software_version_activity.xml" value="0.20199275362318841" />
-        <entry key="app/src/main/res/layout/view_cancel_sure.xml" value="0.1" />
+        <entry key="app/src/main/res/layout/view_cancel_sure.xml" value="0.34054107666015626" />
         <entry key="app/src/main/res/layout/view_content.xml" value="0.19300911854103345" />
         <entry key="app/src/main/res/layout/view_empty.xml" value="0.1" />
         <entry key="app/src/main/res/layout/view_message_text.xml" value="0.1" />
-        <entry key="app/src/main/res/layout/view_sure.xml" value="0.1" />
+        <entry key="app/src/main/res/layout/view_sure.xml" value="0.33498922857490865" />
         <entry key="app/src/main/res/layout/view_textview.xml" value="0.1" />
         <entry key="app/src/main/res/layout/wifi_connected_activity.xml" value="0.14311043566362716" />
       </map>

+ 10 - 3
app/src/main/java/com/xplora/xpsettings/Activity/ApnEditActivity.java

@@ -48,6 +48,14 @@ public class ApnEditActivity extends BaseActivity {
         BaseModel model1 = new BaseModel();
         model1.cellType = Constant.CellType.EMPTY;
         mDataList.add(model1);
+
+        BaseModel model2 = new BaseModel();
+        model2.cellType = Constant.CellType.EMPTY;
+        mDataList.add(model2);
+
+        BaseModel model3 = new BaseModel();
+        model3.cellType = Constant.CellType.EMPTY;
+        mDataList.add(model3);
     }
 
     private void initView() {
@@ -99,12 +107,11 @@ public class ApnEditActivity extends BaseActivity {
     };
 
     @Override
-    public void onBackPressed() {
+    protected void onStop() {
+        super.onStop();
         boolean isKeyboard = mAdapter.isKeyboardVisible();
         if (isKeyboard) {
             mAdapter.closeKeyboard();
-        } else {
-            super.onBackPressed();
         }
     }
 }

+ 13 - 7
app/src/main/java/com/xplora/xpsettings/Adapter/BaseListAdapter.java

@@ -88,6 +88,7 @@ public class BaseListAdapter extends ArrayAdapter<BaseModel> {
         TextView itemTitle = view.findViewById(R.id.item_title);
         TextView itemSubTitle = view.findViewById(R.id.item_subtitle);
         EditText itemEdit = view.findViewById(R.id.item_edit);
+        Button itemEditButton = view.findViewById(R.id.item_edit_button);
         ImageView itembackground = view.findViewById(R.id.item_background);
         ImageView itemIcon = view.findViewById(R.id.item_icon);
         ImageView itemArrow = view.findViewById(R.id.item_arrow);
@@ -177,6 +178,10 @@ public class BaseListAdapter extends ArrayAdapter<BaseModel> {
         }
 
         if (itemEdit != null) {
+            itemEdit.setEnabled(false);
+            itemEdit.setFocusableInTouchMode(false);
+            itemEdit.setFocusable(false);
+            itemEdit.setClickable(false);
             itemEdit.setText(model.value);
             itemEdit.addTextChangedListener(new TextWatcher() {
                 @Override
@@ -200,13 +205,14 @@ public class BaseListAdapter extends ArrayAdapter<BaseModel> {
                     mHandler.sendMessage(message);
                 }
             });
-
-            view.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    mKeyUtils = new KeyUtils(getContext(), itemEdit);
-                }
-            });
+            if (itemEditButton != null) {
+                itemEditButton.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        mKeyUtils = new KeyUtils(getContext(), itemEdit);
+                    }
+                });
+            }
         }
 
         return view;

+ 13 - 5
app/src/main/res/layout/item_title_edit.xml

@@ -13,7 +13,7 @@
             android:id="@+id/item_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="20dp"
+            android:layout_marginStart="15dp"
             android:layout_centerVertical="true"
             android:fontFamily="Roboto"
             android:textColor="@color/white"
@@ -22,10 +22,10 @@
         <EditText
             android:id="@+id/item_edit"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
+            android:layout_height="match_parent"
             android:layout_toEndOf="@id/item_title"
             android:layout_marginStart="8dp"
-            android:layout_marginEnd="20dp"
+            android:layout_marginEnd="15dp"
             android:layout_centerVertical="true"
             android:layout_alignParentEnd="true"
             android:fontFamily="Roboto"
@@ -35,11 +35,19 @@
             android:layout_gravity="center|end"
             android:background="@null"
             android:maxLines="1"
-            android:lines="1"
             android:inputType="none"
             android:imeOptions="actionDone"
-            tools:ignore="TextFields"
             android:enabled="false"
+            android:clickable="false"
+            tools:ignore="TextFields"
+            android:ellipsize="end"
+            />
+
+        <Button
+            android:id="@+id/item_edit_button"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@null"
             />
 
     </RelativeLayout>

+ 2 - 3
app/src/main/res/values/arrays.xml

@@ -79,7 +79,6 @@
 
     <string-array name="camero_titls_array">
         <item>Photo resolution</item>
-        <item>Video resolution</item>
     </string-array>
 
     <string-array name="apn_titls_array">
@@ -106,9 +105,9 @@
     </array>
 
     <array name="photo_resolution_set_array">
-        <item>2560 x 1944</item>
-        <item>1920 x 1080</item>
+        <item>2048 x 1536</item>
         <item>1280 x 720</item>
+        <item>800 x 600</item>
     </array>
 
     <array name="video_resolution_set_array">