浏览代码

select fragment

losion.liu@sikey.com.cn 6 月之前
父节点
当前提交
a069c0ca29

+ 4 - 0
app/src/main/java/com/xplora/xpsettings/Activity/AboutActivity.java

@@ -2,6 +2,8 @@ package com.xplora.xpsettings.Activity;
 
 import android.content.Context;
 import android.content.Intent;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
 import android.os.Build;
 import android.os.Bundle;
 //import android.os.SystemProperties;
@@ -68,6 +70,8 @@ public class AboutActivity extends BaseActionActivity {
         mAdapter = new BaseListAdapter(AboutActivity.this, 0, mDataList);
         ListView listView = findViewById(R.id.activity_listview);
         listView.setAdapter(mAdapter);
+        listView.setDivider(new ColorDrawable(Color.TRANSPARENT));
+        listView.setDividerHeight(0);
         listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

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

@@ -85,7 +85,7 @@ public class SystemActivity extends BaseActionActivity {
                     if (DataManager.getLockShutDown() == 1)
                         break;
                     SelectFragment fragment2 = SelectFragment.newInstance(this);
-                    fragment2.setItemInfo(102, getString(R.string.shut_down), getString(R.string.confirm_to_restore_factory));
+                    fragment2.setItemInfo(102, getString(R.string.restore_factory_settings), getString(R.string.confirm_to_restore_factory));
                     fragment2.show(this.getFragmentManager(), Constant.PACKAGE_NAME);
                     break;
                 case 3:

+ 10 - 0
app/src/main/res/drawable-xhdpi/bg_gray_button.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <!-- 填充的颜色 -->
+    <solid android:color="@color/sk_gray" />
+
+    <!-- 圆角的半径 -->
+    <corners android:radius="37dp" />
+</shape>

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

@@ -29,6 +29,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="7dp"
+            android:layout_marginBottom="3dp"
             android:scrollbarThumbVertical="@color/xp_yellow"
             >
         </ListView>

+ 30 - 29
app/src/main/res/layout/fragment_select.xml

@@ -10,59 +10,60 @@
         android:id="@+id/mTitle"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="25dp"
+        android:layout_marginTop="10dp"
+        android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
         android:textColor="@color/white"
-        android:textSize="15sp"
-        android:textFontWeight="700"
-        android:gravity="center"/>
+        android:textSize="20sp"
+        android:textStyle="bold"
+        />
 
     <TextView
         android:id="@+id/mContent"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="55dp"
+        android:layout_below="@+id/mTitle"
+        android:layout_marginTop="8dp"
+        android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
         android:textColor="@color/white"
-        android:textSize="11sp"
+        android:textSize="17sp"
         android:textFontWeight="400"
-        android:gravity="center"/>
+        />
 
-    <RelativeLayout
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="28dp"
-        android:layout_marginBottom="25dp"
+        android:layout_height="37dp"
+        android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
+        android:layout_marginBottom="5dp"
         android:layout_alignParentBottom="true"
+        android:orientation="horizontal"
         >
 
         <Button
             android:id="@+id/mNoBtn"
-            android:layout_width="85dp"
+            android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_alignParentStart="true"
-            android:layout_centerVertical="true"
+            android:layout_weight="1"
             android:text="@string/button_cancel"
-            android:textSize="12sp"
-            android:textFontWeight="700"
-            android:fontFamily="Roboto"
-            android:paddingRight="15dp"
-            android:backgroundTint="@color/xp_red"
-            style="@style/xp_style_button_right"
+            android:textSize="17sp"
+            android:textColor="@color/white"
+            android:background="@drawable/bg_gray_button"
             />
 
         <Button
             android:id="@+id/mYesBtn"
-            android:layout_width="85dp"
+            android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_alignParentEnd="true"
-            android:layout_centerVertical="true"
+            android:layout_weight="1"
+            android:layout_marginStart="5dp"
             android:text="@string/button_yes"
-            android:textSize="12sp"
-            android:textFontWeight="700"
-            android:fontFamily="Roboto"
-            android:paddingLeft="15dp"
-            android:backgroundTint="@color/xp_green"
-            style="@style/xp_style_button_left"
+            android:textSize="17sp"
+            android:textColor="@color/white"
+            android:background="@drawable/bg_gray_button"
             />
 
-    </RelativeLayout>
+    </LinearLayout>
 
 </RelativeLayout>