コード例 #1
0
ファイル: B002Activity.java プロジェクト: hoang89/pr
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
   setContentView(R.layout.b002);
   b002_help = (TextView) findViewById(R.id.b002_help);
   Pattern patternUseInfo = Pattern.compile(getResources().getString(R.string.use_info));
   Linkify.addLinks(b002_help, patternUseInfo, "puripuri_link://");
   getUIComponent();
   setUIEvent();
 }
コード例 #2
0
ファイル: QueryResultActivity.java プロジェクト: SDSLJ/AA_01
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_query);
    setTitle(R.string.query_querylist, Color.WHITE);
    Intent intent = getIntent();
    starttime = intent.getStringExtra("start");
    stoptime = intent.getStringExtra("stop");
    mpatterns = intent.getStringExtra("patterns");
    mtype = intent.getStringExtra("type");
    mmoney = intent.getStringExtra("money");
    mstarttime = Integer.parseInt(starttime.toString());
    mstoptime = Integer.parseInt(stoptime.toString());
    putValuesDB = new PutValuesDB(this);
    aaValuesDB = new AAValuesDB(this);

    Cursor cursor;
    if (mpatterns.equals("个人")) {
      if (mtype.equals("全部")) {
        if (mmoney.equals("全部")) {
          cursor = putValuesDB.putQuery(mstarttime, mstoptime);
          queryput(cursor);
        } else {
          if (mmoney.equals("100元以下")) {
            mstartmoney = 0;
            mstopmoney = 100;
            cursor = putValuesDB.putQuerymoney(mstarttime, mstoptime, mstartmoney, mstopmoney);
            queryput(cursor);
          }
          if (mmoney.equals("100元到300元")) {
            mstartmoney = 100;
            mstopmoney = 300;
            cursor = putValuesDB.putQuerymoney(mstarttime, mstoptime, mstartmoney, mstopmoney);
            queryput(cursor);
          }
          if (mmoney.equals("300元到500元")) {
            mstartmoney = 300;
            mstopmoney = 500;
            cursor = putValuesDB.putQuerymoney(mstarttime, mstoptime, mstartmoney, mstopmoney);
            queryput(cursor);
          }
          if (mmoney.equals("500元以上")) {
            mstartmoney = 500;
            mstopmoney = 9999999;
            cursor = putValuesDB.putQuerymoney(mstarttime, mstoptime, mstartmoney, mstopmoney);
            queryput(cursor);
          }
        }
      } else {
        if (mmoney.equals("全部")) {
          cursor = putValuesDB.putQuerytype(mstarttime, mstoptime, mtype);
          queryput(cursor);

        } else {
          if (mmoney.equals("100元以下")) {
            mstartmoney = 0;
            mstopmoney = 100;
            cursor = putValuesDB.putQueryall(mstarttime, mstoptime, mstartmoney, mstopmoney, mtype);
            queryput(cursor);
          }
          if (mmoney.equals("100元到300元")) {
            mstartmoney = 100;
            mstopmoney = 300;
            cursor = putValuesDB.putQueryall(mstarttime, mstoptime, mstartmoney, mstopmoney, mtype);
            queryput(cursor);
          }
          if (mmoney.equals("300元到500元")) {
            mstartmoney = 300;
            mstopmoney = 500;
            cursor = putValuesDB.putQueryall(mstarttime, mstoptime, mstartmoney, mstopmoney, mtype);
            queryput(cursor);
          }
          if (mmoney.equals("500元以上")) {
            mstartmoney = 500;
            mstopmoney = 9999999;
            cursor = putValuesDB.putQueryall(mstarttime, mstoptime, mstartmoney, mstopmoney, mtype);
            queryput(cursor);
          }
        }
      }
    } else {
      if (mtype.equals("全部")) {
        if (mmoney.equals("全部")) {
          cursor = aaValuesDB.aaQuery(mstarttime, mstoptime);
          queryaa(cursor);
        } else {
          if (mmoney.equals("100元以下")) {
            mstartmoney = 0;
            mstopmoney = 100;
            cursor = aaValuesDB.aaQuerymoney(mstarttime, mstoptime, mstartmoney, mstopmoney);
            queryaa(cursor);
          }
          if (mmoney.equals("100元到300元")) {
            mstartmoney = 100;
            mstopmoney = 300;
            cursor = aaValuesDB.aaQuerymoney(mstarttime, mstoptime, mstartmoney, mstopmoney);
            queryaa(cursor);
          }
          if (mmoney.equals("300元到500元")) {
            mstartmoney = 300;
            mstopmoney = 500;
            cursor = aaValuesDB.aaQuerymoney(mstarttime, mstoptime, mstartmoney, mstopmoney);
            queryaa(cursor);
          }
          if (mmoney.equals("500元以上")) {
            mstartmoney = 500;
            mstopmoney = 9999999;
            cursor = aaValuesDB.aaQuerymoney(mstarttime, mstoptime, mstartmoney, mstopmoney);
            queryaa(cursor);
          }
        }
      } else {
        if (mmoney.equals("全部")) {
          cursor = aaValuesDB.aaQuerytype(mstarttime, mstoptime, mtype);
          queryaa(cursor);

        } else {
          if (mmoney.equals("100元以下")) {
            mstartmoney = 0;
            mstopmoney = 100;
            cursor = aaValuesDB.aaQueryall(mstarttime, mstoptime, mstartmoney, mstopmoney, mtype);
            queryaa(cursor);
          }
          if (mmoney.equals("100元到300元")) {
            mstartmoney = 100;
            mstopmoney = 300;
            cursor = aaValuesDB.aaQueryall(mstarttime, mstoptime, mstartmoney, mstopmoney, mtype);
            queryaa(cursor);
          }
          if (mmoney.equals("300元到500元")) {
            mstartmoney = 300;
            mstopmoney = 500;
            cursor = aaValuesDB.aaQueryall(mstarttime, mstoptime, mstartmoney, mstopmoney, mtype);
            queryaa(cursor);
          }
          if (mmoney.equals("500元以上")) {
            mstartmoney = 500;
            mstopmoney = 9999999;
            cursor = aaValuesDB.aaQueryall(mstarttime, mstoptime, mstartmoney, mstopmoney, mtype);
            queryaa(cursor);
          }
        }
      }
    }
  }