liuzhenxing 3 роки тому
батько
коміт
7ebeb4c4f3

+ 1 - 0
.idea/misc.xml

@@ -14,6 +14,7 @@
         <entry key="app/src/main/res/layout/item_checkbox.xml" value="0.20199275362318841" />
         <entry key="app/src/main/res/layout/item_connections.xml" value="0.19300911854103345" />
         <entry key="app/src/main/res/layout/item_icon.xml" value="0.25" />
+        <entry key="app/src/main/res/layout/item_icon_progress.xml" value="0.15865384615384615" />
         <entry key="app/src/main/res/layout/item_icon_title.xml" value="0.19300911854103345" />
         <entry key="app/src/main/res/layout/item_icon_title_right.xml" value="0.1" />
         <entry key="app/src/main/res/layout/item_icon_title_subtitle.xml" value="0.1" />

+ 5 - 0
app/src/main/java/com/xplora/xpsettings/Adapter/BaseListAdapter.java

@@ -15,6 +15,7 @@ import android.widget.TextView;
 
 import com.xplora.xpsettings.Activity.TestToolsActivity;
 import com.xplora.xpsettings.Activity.WiFiActivity;
+import com.xplora.xpsettings.IconProgressView;
 import com.xplora.xpsettings.Model.BaseModel;
 import com.xplora.xpsettings.R;
 import com.xplora.xpsettings.Utils.Constant;
@@ -72,6 +73,7 @@ public class BaseListAdapter extends ArrayAdapter<BaseModel> {
         ImageView itemArrow = view.findViewById(R.id.item_arrow);
         Switch itemSwitch = view.findViewById(R.id.item_switch);
         CheckBox itemCheckbox = view.findViewById(R.id.item_checkbox);
+        IconProgressView iconProgressView = view.findViewById(R.id.item_icon_progress);
 
 
         if (itemTitle != null) {
@@ -115,6 +117,9 @@ public class BaseListAdapter extends ArrayAdapter<BaseModel> {
                     mHandler.sendMessage(message);
                 }
             );
+        }
+        if (iconProgressView != null) {
+
         }
         return view;
     }

+ 21 - 0
app/src/main/java/com/xplora/xpsettings/IconProgressView.java

@@ -0,0 +1,21 @@
+package com.xplora.xpsettings;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+
+import androidx.annotation.Nullable;
+
+public class IconProgressView extends FrameLayout {
+
+    public IconProgressView(Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+
+        View view = LayoutInflater.from(context).inflate(R.layout.item_icon_progress, this);
+        ImageView itemIcon = view.findViewById(R.id.item_icon);
+        itemIcon.setImageDrawable(getResources().getDrawable(R.drawable.bright_small));
+    }
+}

+ 22 - 0
app/src/main/res/layout/item_icon_progress.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="29dp"
+    android:layout_height="29dp">
+
+    <ImageView
+        android:id="@+id/item_progress"
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:layout_centerInParent="true"
+        android:background="@color/xp_red"
+        />
+
+    <ImageView
+        android:id="@+id/item_icon"
+        android:layout_width="17dp"
+        android:layout_height="17dp"
+        android:layout_centerInParent="true"
+        android:src="@drawable/settings_pulse"
+        />
+
+</RelativeLayout>

+ 5 - 5
app/src/main/res/layout/item_icon_title_right.xml

@@ -9,10 +9,10 @@
         android:layout_height="40dp"
         >
 
-        <ImageView
-            android:id="@+id/item_icon"
-            android:layout_width="24dp"
-            android:layout_height="24dp"
+        <com.xplora.xpsettings.IconProgressView
+            android:id="@+id/item_icon_progress"
+            android:layout_width="29dp"
+            android:layout_height="29dp"
             android:layout_centerVertical="true"
             android:layout_marginStart="20dp"
             />
@@ -21,7 +21,7 @@
             android:id="@+id/item_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_toEndOf="@id/item_icon"
+            android:layout_toEndOf="@id/item_icon_progress"
             android:layout_marginStart="0dp"
             android:layout_centerVertical="true"
             android:layout_alignParentEnd="true"