liuzhenxing 3 anni fa
parent
commit
86088e2b57

+ 5 - 0
.idea/misc.xml

@@ -39,6 +39,11 @@
         <entry key="app/src/main/res/layout/item_title_subtitle.xml" value="0.1" />
         <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.20199275362318841" />
+        <entry key="app/src/main/res/layout/view_cancel_sure.xml" value="0.1" />
+        <entry key="app/src/main/res/layout/view_content.xml" value="0.19300911854103345" />
+        <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_textview.xml" value="0.1" />
       </map>
     </option>
   </component>

+ 5 - 4
app/src/main/java/com/xplora/xpsettings/Activity/DisplayActivity.java

@@ -52,14 +52,15 @@ public class DisplayActivity extends BaseActivity {
             }
             mDataList.add(model);
         }
+
+        IconProgressModel model = new IconProgressModel();
+        model.cellType = Constant.CellType.MESSAGE;
+        model.subTitle = getResources().getString(R.string.app_name_status_hint);
+        mDataList.add(model);
     }
 
     private void initView() {
         ListView listView = findViewById(R.id.activity_listview);
-        TextView textView = findViewById(R.id.bottom_text);
-        textView.setVisibility(View.VISIBLE);
-        textView.setText(R.string.app_name_status_hint);
-
         mAdapter = new BaseListAdapter(this, R.layout.item_xpstyle, mDataList, mHandler);
         listView.setAdapter(mAdapter);
         listView.setOnItemClickListener((adapterView, view, i, l) -> {

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

@@ -76,6 +76,8 @@ public class BaseListAdapter extends ArrayAdapter<BaseModel> {
             view = LayoutInflater.from(getContext()).inflate(R.layout.item_refresh, null);
         } else if (model.cellType == Constant.CellType.CANCEL_SURE) {
             view = LayoutInflater.from(getContext()).inflate(R.layout.view_cancel_sure, null);
+        } else if (model.cellType == Constant.CellType.MESSAGE) {
+            view = LayoutInflater.from(getContext()).inflate(R.layout.view_message_text, null);
         }
 
         assert view != null;

+ 1 - 0
app/src/main/java/com/xplora/xpsettings/Utils/Constant.java

@@ -35,6 +35,7 @@ public class Constant {
         CHECKBOX,
         REFRESH,
         CANCEL_SURE,
+        MESSAGE,
     }
 
     public enum E_SEEKBAR_TYPE {

+ 28 - 0
app/src/main/res/layout/view_message_text.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="50dp">
+
+        <TextView
+            android:id="@+id/item_subtitle"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_centerHorizontal="true"
+            android:layout_alignParentBottom="true"
+            android:layout_marginBottom="25dp"
+            android:layout_marginStart="8dp"
+            android:layout_marginEnd="8dp"
+            android:textSize="10dp"
+            android:textColor="#FFFFFFFF"
+            android:fontFamily="Roboto"
+            android:textFontWeight="400"
+            android:textAlignment="center"
+            />
+    </RelativeLayout>
+
+</RelativeLayout>

+ 1 - 1
app/src/main/res/layout/view_sure.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="wrap_content"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content">
 
     <RelativeLayout