liuzhenxing 3 gadi atpakaļ
vecāks
revīzija
722a4f5474

+ 1 - 0
.idea/misc.xml

@@ -12,6 +12,7 @@
         <entry key="app/src/main/res/layout/activity_display.xml" value="0.11610486891385768" />
         <entry key="app/src/main/res/layout/activity_list.xml" value="0.19300911854103345" />
         <entry key="app/src/main/res/layout/activity_list_edit.xml" value="0.12208713272543059" />
+        <entry key="app/src/main/res/layout/activity_list_title.xml" value="0.1" />
         <entry key="app/src/main/res/layout/activity_main.xml" value="0.3546195652173913" />
         <entry key="app/src/main/res/layout/activity_qr.xml" value="0.19300911854103345" />
         <entry key="app/src/main/res/layout/activity_wifi_login.xml" value="0.16236068895643363" />

+ 2 - 1
app/src/main/java/com/xplora/xpsettings/Activity/ApnListActivity.java

@@ -57,6 +57,7 @@ public class ApnListActivity extends BaseActivity {
         model.title = apnName;
         model.subTitle = mcc + "   " + mnc;
         model.isShowArrow = true;
+        model.subColor = R.color.xp_yellow;
         model.cellType = Constant.CellType.TITLE_SUBTITLE;
         mDataList.add(model);
     }
@@ -112,7 +113,7 @@ public class ApnListActivity extends BaseActivity {
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
-        if (data == null)
+        if (resultCode != RESULT_OK)
             return;
         if (data.getAction().equals(Constant.INENT_RESULT_ACTION)) {
             ApnModel apnModel = (ApnModel)data.getSerializableExtra(Constant.INENT_RESULT_VALUE);

+ 3 - 1
app/src/main/java/com/xplora/xpsettings/Activity/CameraActivity.java

@@ -25,7 +25,7 @@ public class CameraActivity extends BaseActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_list);
+        setContentView(R.layout.activity_list_title);
         setWatchTitle(getResources().getStringArray(R.array.settings_title_array)[11]);
         initData();
         initView();
@@ -64,6 +64,8 @@ public class CameraActivity extends BaseActivity {
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode != RESULT_OK)
+            return;
         if (data.getAction().equals(Constant.INENT_RESULT_ACTION)) {
             int viewType = data.getIntExtra(Constant.INENT_VIEW_TYPE, 0);
             String value = data.getStringExtra(Constant.INENT_RESULT_VALUE);

+ 1 - 1
app/src/main/java/com/xplora/xpsettings/Activity/CameraResolutionActivity.java

@@ -26,7 +26,7 @@ public class CameraResolutionActivity extends BaseActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_list);
+        setContentView(R.layout.activity_list_title);
 
         mViewType = getIntent().getIntExtra(Constant.INENT_VIEW_TYPE, 0);
         setWatchTitle(getResources().getStringArray(R.array.camero_titls_array)[mViewType]);

+ 2 - 1
app/src/main/java/com/xplora/xpsettings/Activity/SoundModeActivity.java

@@ -26,7 +26,8 @@ public class SoundModeActivity extends BaseActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_list);
+        setContentView(R.layout.activity_list_title);
+        setWatchTitle(getString(R.string.sound_mode));
         initData();
         initView();
     }

+ 1 - 1
app/src/main/java/com/xplora/xpsettings/Activity/VolumeActivity.java

@@ -36,7 +36,7 @@ public class VolumeActivity extends BaseActivity {
             model.icon = ResUtils.getImageId("volume_", i);
             model.progress = 60;
             model.isShowArrow = false;
-            model.cellType = Constant.CellType.PROGRESS_TITLE_SUBTITLE;
+            model.cellType = Constant.CellType.PROGRESS_TITLE;
             mDataList.add(model);
         }
     }

+ 2 - 1
app/src/main/java/com/xplora/xpsettings/Activity/WiFiActivity.java

@@ -80,7 +80,8 @@ public class WiFiActivity extends BaseActivity {
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
-        if (resultCode != -1) return;
+        if (resultCode != RESULT_OK)
+            return;
         switch (requestCode) {
             case REQUEST_LOGIN:
                 connect(data.getStringExtra("ssid"),

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

@@ -105,6 +105,9 @@ public class BaseListAdapter extends ArrayAdapter<BaseModel> {
         }
         if (itemSubTitle != null) {
             itemSubTitle.setText(model.subTitle);
+            if (model.subColor != 0) {
+                itemSubTitle.setTextColor(getContext().getColor(model.subColor));
+            }
         }
         if (itembackground != null) {
             itembackground.setImageResource(model.background);

+ 3 - 14
app/src/main/res/layout/activity_list.xml

@@ -5,24 +5,13 @@
     android:background="@color/black"
     >
 
-    <TextView
-        android:id="@+id/title"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="25dp"
-        android:textSize="11sp"
-        android:textFontWeight="500"
-        android:textColor="#FFFFFFFF"
-        android:fontFamily="Roboto"
-        android:visibility="gone"
-        />
-
     <ListView
         android:id="@+id/activity_listview"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="57dp"
+        android:layout_marginTop="30dp"
+        android:divider="#33FFFFFF"
+        android:dividerHeight="0.5dp"
         >
     </ListView>
 

+ 110 - 0
app/src/main/res/layout/activity_list_title.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/black"
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        >
+
+        <TextView
+            android:id="@+id/title"
+            android:layout_width="match_parent"
+            android:layout_height="18dp"
+            android:layout_marginTop="25dp"
+            android:textAlignment="center"
+            android:textSize="12sp"
+            android:textFontWeight="500"
+            android:textColor="#FFFFFFFF"
+            android:fontFamily="Roboto"
+            android:visibility="gone"
+            />
+
+        <ListView
+            android:id="@+id/activity_listview"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:divider="#33FFFFFF"
+            android:dividerHeight="0.5dp"
+            >
+        </ListView>
+
+    </LinearLayout>
+
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:id="@+id/empty_view"
+        android:visibility="gone">
+
+        <TextView
+            android:id="@+id/empty_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerHorizontal="true"
+            android:layout_marginTop="65dp"
+            android:textSize="12sp"
+            android:textFontWeight="400"
+            android:textColor="#FFFFFFFF"
+            android:fontFamily="Roboto"
+            android:textAlignment="center"
+            />
+
+        <Button
+            android:id="@+id/empty_button"
+            android:layout_width="80dp"
+            android:layout_height="28dp"
+            android:layout_centerHorizontal="true"
+            android:layout_alignParentBottom="true"
+            android:layout_marginBottom="25dp"
+            android:textSize="12sp"
+            android:textFontWeight="400"
+            android:textColor="#FFFFFFFF"
+            android:fontFamily="Roboto"
+            android:text="+"
+            android:backgroundTint="@color/xp_green"
+            style="@style/xp_style_button_all"
+            />
+    </RelativeLayout>
+
+    <TextView
+        android:id="@+id/bottom_text"
+        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"
+        android:visibility="gone"
+        />
+
+    <Button
+        android:id="@+id/bottom_button"
+        android:layout_width="80dp"
+        android:layout_height="28dp"
+        android:layout_centerHorizontal="true"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="25dp"
+        android:textSize="12sp"
+        android:textFontWeight="400"
+        android:textColor="#FFFFFFFF"
+        android:fontFamily="Roboto"
+        android:text="+"
+        android:backgroundTint="@color/xp_green"
+        style="@style/xp_style_button_all"
+        android:visibility="gone"
+        />
+
+</RelativeLayout>

+ 7 - 6
app/src/main/res/layout/item_title_center.xml

@@ -1,27 +1,28 @@
 <?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="34dp"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
     >
 
     <FrameLayout
         android:layout_width="match_parent"
-        android:layout_height="34dp"
+        android:layout_height="38dp"
         android:layout_gravity="center"
         android:layout_marginLeft="25dp"
         android:layout_marginRight="25dp"
-        android:background="@drawable/button_shape"
         >
 
         <TextView
             android:id="@+id/item_title"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="34dp"
             android:gravity="center"
             android:fontFamily="Roboto"
             android:textFontWeight="700"
             android:textColor="@color/white"
-            android:textSize="12sp" />
+            android:textSize="12sp"
+            android:background="@drawable/button_shape"
+            />
 
     </FrameLayout>
 

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

@@ -22,7 +22,7 @@
                 android:layout_height="18dp"
                 android:fontFamily="Roboto"
                 android:textColor="@color/white"
-                android:textFontWeight="700"
+                android:textFontWeight="500"
                 android:textSize="12sp"
                 />
 

+ 2 - 4
app/src/main/res/layout/view_message_text.xml

@@ -6,15 +6,13 @@
 
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="50dp">
+        android:layout_height="70dp">
 
         <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_centerInParent="true"
             android:layout_marginStart="8dp"
             android:layout_marginEnd="8dp"
             android:textSize="10dp"

+ 1 - 1
app/src/main/res/values/arrays.xml

@@ -47,7 +47,7 @@
         <item>Sound</item>
         <item>Vibrate</item>
         <item>Mute</item>
-        <item>Data roaming</item>
+        <item>Vibrate while ringing</item>
         <item>Volume</item>
         <item>Ring tone</item>
     </string-array>

+ 2 - 0
app/src/main/res/values/strings.xml

@@ -37,4 +37,6 @@
 
     <string name="apn_hint">Please tap “+” to add \n new APN</string>
     <string name="apn_delete_content">Really want to delete this APN?</string>
+
+    <string name="sound_mode">Sound Mode</string>
 </resources>