Commit 3e1796db50fe8d76286caf2c34bcaf283fa6e643

Authored by 孙向锦
1 parent 53509e93

管理员界面修改

C5/app/src/main/java/com/sunvote/xpadapp/MainActivity.java
@@ -300,6 +300,10 @@ public class MainActivity extends BaseActivity implements ComListener { @@ -300,6 +300,10 @@ public class MainActivity extends BaseActivity implements ComListener {
300 super.onResume(); 300 super.onResume();
301 } 301 }
302 302
  303 + public void setBackgroundColor(int color){
  304 + findViewById(R.id.root).setBackgroundColor(color);
  305 + }
  306 +
303 @Override 307 @Override
304 protected void onPause() { 308 protected void onPause() {
305 LogUtil.i(TAG, "onPause"); 309 LogUtil.i(TAG, "onPause");
C5/app/src/main/java/com/sunvote/xpadapp/fragments/AdminFragment.java
@@ -41,7 +41,7 @@ public class AdminFragment extends BaseFragment { @@ -41,7 +41,7 @@ public class AdminFragment extends BaseFragment {
41 btnConfig = view.findViewById(R.id.admin_config_mode); 41 btnConfig = view.findViewById(R.id.admin_config_mode);
42 btnPowerOff = view.findViewById(R.id.admin_btnShutdown); 42 btnPowerOff = view.findViewById(R.id.admin_btnShutdown);
43 43
44 - tvModalInfo.setText(getString(R.string.app_version) + getVersionName() + getString(R.string.server_ip) + Config.getInstance().serverIP); 44 + tvModalInfo.setText(getString(R.string.app_version) + getVersionName() + " "+ getString(R.string.server_ip) + Config.getInstance().serverIP);
45 btnBack.setOnClickListener(new OnClickListener() { 45 btnBack.setOnClickListener(new OnClickListener() {
46 @Override 46 @Override
47 public void onClick(View v) { 47 public void onClick(View v) {
C5/app/src/main/res/layout/activity_main.xml
1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2 xmlns:tools="http://schemas.android.com/tools" 2 xmlns:tools="http://schemas.android.com/tools"
  3 + android:id="@+id/root"
3 android:layout_width="match_parent" 4 android:layout_width="match_parent"
4 android:layout_height="match_parent" 5 android:layout_height="match_parent"
5 tools:context="com.sunvote.xpadapp.MainActivity" 6 tools:context="com.sunvote.xpadapp.MainActivity"
C5/app/src/main/res/layout/fragment_admin.xml
@@ -2,25 +2,77 @@ @@ -2,25 +2,77 @@
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent" 3 android:layout_width="match_parent"
4 android:layout_height="match_parent" 4 android:layout_height="match_parent"
5 - android:background="#ffa9a9a9"> 5 + android:background="@drawable/bgpic_2">
  6 +
  7 +
  8 + <LinearLayout
  9 + android:id="@+id/middle_line"
  10 + android:layout_width="720dp"
  11 + android:layout_height="60dp"
  12 + android:layout_centerInParent="true"
  13 + android:orientation="horizontal">
  14 +
  15 + <Button
  16 + android:id="@+id/admin_config_mode"
  17 + android:layout_width="0dp"
  18 + android:layout_height="60dp"
  19 + android:layout_marginRight="80dp"
  20 + android:layout_weight="1"
  21 + android:background="@color/blue"
  22 + android:gravity="center"
  23 + android:text="@string/modifi_idsn"
  24 + android:textColor="@color/white"
  25 + android:textSize="@dimen/big_text_p5"
  26 + android:textStyle="bold" />
  27 +
  28 + <Button
  29 + android:id="@+id/admin_btnComTest"
  30 + android:layout_width="0dp"
  31 + android:layout_height="60dp"
  32 + android:layout_weight="1"
  33 + android:background="@color/blue"
  34 + android:gravity="center"
  35 + android:text="重定向服务器"
  36 + android:textColor="@color/white"
  37 + android:textSize="@dimen/big_text_p5"
  38 + android:textStyle="bold" />
  39 +
  40 + <Button
  41 + android:id="@+id/admin_btnShutdown"
  42 + android:layout_width="0dp"
  43 + android:layout_height="60dp"
  44 + android:layout_marginLeft="80dp"
  45 + android:layout_weight="1"
  46 + android:background="@drawable/oppos_selector"
  47 + android:gravity="center"
  48 + android:text="@string/shutdown"
  49 + android:textColor="@color/white"
  50 + android:textSize="@dimen/big_text_p5"
  51 + android:textStyle="bold"/>
  52 +
  53 + </LinearLayout>
6 54
7 <TextView 55 <TextView
8 android:id="@+id/admin_modal_title" 56 android:id="@+id/admin_modal_title"
9 android:layout_width="wrap_content" 57 android:layout_width="wrap_content"
10 android:layout_height="wrap_content" 58 android:layout_height="wrap_content"
11 android:layout_centerHorizontal="true" 59 android:layout_centerHorizontal="true"
12 - android:layout_marginTop="48dp" 60 + android:layout_above="@id/middle_line"
  61 + android:layout_marginBottom="48dp"
13 android:text="@string/admin_setting" 62 android:text="@string/admin_setting"
14 android:textSize="@dimen/big_text_p2" 63 android:textSize="@dimen/big_text_p2"
  64 + android:textColor="@color/white"
15 android:textStyle="bold" /> 65 android:textStyle="bold" />
16 66
17 <TextView 67 <TextView
18 android:id="@+id/admin_modal_info" 68 android:id="@+id/admin_modal_info"
19 android:layout_width="wrap_content" 69 android:layout_width="wrap_content"
20 android:layout_height="wrap_content" 70 android:layout_height="wrap_content"
21 - android:layout_below="@id/admin_modal_title" 71 + android:layout_alignParentBottom="true"
22 android:layout_centerHorizontal="true" 72 android:layout_centerHorizontal="true"
23 - android:layout_marginTop="30dp" 73 + android:layout_marginBottom="50dp"
  74 + android:text="APP版本:1.1.2.6 基站IP:192.168.0.136"
  75 + android:textColor="@color/white"
24 android:textSize="@dimen/big_text_p4" /> 76 android:textSize="@dimen/big_text_p4" />
25 77
26 <ImageButton 78 <ImageButton
@@ -31,46 +83,6 @@ @@ -31,46 +83,6 @@
31 android:layout_marginTop="20dp" 83 android:layout_marginTop="20dp"
32 android:background="@drawable/back_selector" /> 84 android:background="@drawable/back_selector" />
33 85
34 - <Button  
35 - android:id="@+id/admin_config_mode"  
36 - android:layout_width="200dp"  
37 - android:layout_height="60dp"  
38 - android:layout_alignParentLeft="true"  
39 - android:layout_centerVertical="true"  
40 - android:layout_marginLeft="120dp"  
41 - android:background="@drawable/agree_selector"  
42 - android:gravity="center"  
43 - android:text="@string/modifi_idsn"  
44 - android:textColor="@color/white"  
45 - android:textSize="@dimen/big_text_p5"  
46 - android:textStyle="bold" />  
47 86
48 - <Button  
49 - android:id="@+id/admin_btnComTest"  
50 - android:layout_width="200dp"  
51 - android:layout_height="60dp"  
52 - android:layout_below="@id/admin_config_mode"  
53 - android:layout_marginLeft="120dp"  
54 - android:layout_marginTop="40dp"  
55 - android:background="@drawable/agree_selector"  
56 - android:gravity="center"  
57 - android:text="重定向服务器"  
58 - android:textColor="@color/white"  
59 - android:textSize="@dimen/big_text_p5"  
60 - android:textStyle="bold" />  
61 -  
62 - <Button  
63 - android:id="@+id/admin_btnShutdown"  
64 - android:layout_width="200dp"  
65 - android:layout_height="60dp"  
66 - android:layout_alignParentRight="true"  
67 - android:layout_centerVertical="true"  
68 - android:layout_marginRight="120dp"  
69 - android:background="@drawable/oppos_selector"  
70 - android:gravity="center"  
71 - android:text="@string/shutdown"  
72 - android:textColor="@color/white"  
73 - android:textSize="@dimen/big_text_p5"  
74 - android:textStyle="bold"/>  
75 87
76 </RelativeLayout> 88 </RelativeLayout>
C5/app/src/main/res/layout/fragment_no_file.xml
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 android:layout_width="wrap_content" 31 android:layout_width="wrap_content"
32 android:layout_height="wrap_content" 32 android:layout_height="wrap_content"
33 android:layout_centerHorizontal="true" 33 android:layout_centerHorizontal="true"
34 - android:textColor="#ff1111" 34 + android:textColor="@color/white"
35 android:textStyle="bold" 35 android:textStyle="bold"
36 android:text="会议1的资料不存在!" 36 android:text="会议1的资料不存在!"
37 android:textSize="@dimen/big_text_p1" /> 37 android:textSize="@dimen/big_text_p1" />
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 android:layout_below="@id/fragment_no_file_title" 43 android:layout_below="@id/fragment_no_file_title"
44 android:layout_centerHorizontal="true" 44 android:layout_centerHorizontal="true"
45 android:layout_marginTop="30dp" 45 android:layout_marginTop="30dp"
46 - android:textColor="#ff1111" 46 + android:textColor="@color/white"
47 android:textStyle="bold" 47 android:textStyle="bold"
48 android:textSize="@dimen/big_text_p1" /> 48 android:textSize="@dimen/big_text_p1" />
49 </RelativeLayout> 49 </RelativeLayout>