4c3de86c
 
  孙向锦
 
UI改版第一版
 | 
1
2 
 | 
  package com.sunvote.xpadapp.fragments;
  
 
 | 
75386c29
 
  孙向锦
 
选举结果UI修改
 | 
3 
 | 
  import android.graphics.Color;
 
 | 
4c3de86c
 
  孙向锦
 
UI改版第一版
 | 
4
5
6
7
8
9 
 | 
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.TextView;
  
 
 | 
75386c29
 
  孙向锦
 
选举结果UI修改
 | 
10 
 | 
  import com.sunvote.xpadapp.MainActivity;
 
 | 
4c3de86c
 
  孙向锦
 
UI改版第一版
 | 
11
12
13
14 
 | 
  import com.sunvote.xpadapp.R;
  import com.sunvote.xpadapp.base.BaseFragment;
  import com.sunvote.xpadcomm.XPadApiInterface.VoteInfo;
  
 
 | 
75386c29
 
  孙向锦
 
选举结果UI修改
 | 
15
16 
 | 
  import org.apache.tools.ant.Main;
  
 
 | 
4c3de86c
 
  孙向锦
 
UI改版第一版
 | 
17
18
19
20
21
22
23
24
25
26
27
28
29 
 | 
  public class SinginResultFragment extends BaseFragment {
  
      private VoteInfo.ResultInfo resultInfo;
  
      public void setResultInfo(VoteInfo.ResultInfo resultInfo) {
          this.resultInfo = resultInfo;
      }
  
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View view = inflater.inflate(R.layout.fragment_signin_result_vote, container, false);
          TextView shidaoresult = view.findViewById(R.id.shidaoresult);
          TextView yingdaoresult = view.findViewById(R.id.yingdaoresult);
          TextView weidaoresult = view.findViewById(R.id.weidaoresult);
 
 | 
1c5059dd
 
  孙向锦
 
下载文件UI更新
 | 
30 
 | 
          TextView result = view.findViewById(R.id.result);
 
 | 
4c3de86c
 
  孙向锦
 
UI改版第一版
 | 
31
32
33 
 | 
          shidaoresult.setText("" + resultInfo.num3);
          yingdaoresult.setText("" + resultInfo.num2);
          weidaoresult.setText("" + resultInfo.num1);
 
 | 
e129be23
 
  孙向锦
 
添加一些修改选项
 | 
34 
 | 
          ((MainActivity)getActivity()).setBackgroundColor(Color.parseColor("#042148"));
 
 | 
1c5059dd
 
  孙向锦
 
下载文件UI更新
 | 
35
36
37
38
39
40
41 
 | 
          if ((resultInfo.bits & 0xF) == 0xF) {
              result.setText("");
          } else if ((resultInfo.bits & 0xF) == 0) {
              result.setText(R.string.bufuherenshu);
          } else {
              result.setText(R.string.fuherenshu);
          }
 
 | 
4c3de86c
 
  孙向锦
 
UI改版第一版
 | 
42
43
44
45 
 | 
          return view;
      }
  
  }
 
 |