Пример #1
0
  public void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);

    initAnimation();
    initMain();
    SysApplication.getInstance().addActivity(this);
    Bundle extras = getIntent().getExtras();
    if (extras != null) {
      data = extras.getString("index");
    }
    Goods[] goods = goodsdata.goods_rank_show(data);
    number = goods.length;
    goodsid = new int[number];
    for (int i = 0; i < number; i++) {
      image[i] = new String();
      goodsid[i] = Integer.parseInt(goods[i].getGoodsId());
      image[i] = goods[i].getCode();
    }

    this.goodsshow();

    LinearLayout menu1 = (LinearLayout) findViewById(R.id.menu1);
    menu1.setOnClickListener(menu);
    LinearLayout menu2 = (LinearLayout) findViewById(R.id.menu2);
    menu2.setOnClickListener(menu);
    LinearLayout menu3 = (LinearLayout) findViewById(R.id.menu3);
    menu3.setOnClickListener(menu);
    LinearLayout menu4 = (LinearLayout) findViewById(R.id.menu4);
    menu4.setOnClickListener(menu);
    LinearLayout menu5 = (LinearLayout) findViewById(R.id.menu5);
    menu5.setOnClickListener(menu);
  }
Пример #2
0
  public boolean onOptionsItemSelected(MenuItem item) {
    if (item.getItemId() == 1) {
      Intent intent1 = new Intent(Goods_Rank_Show.this, Goods_Rank_Show.class);

      startActivity(intent1);
      finish();
    } else if (item.getItemId() == 2) {
      Intent intent = new Intent(Goods_Rank_Show.this, ActivityShow.class);
      startActivity(intent);
    } else if (item.getItemId() == 3) {
      account = Consumer.getClientAccount();
      if (account != null) {
        consumerdata.exit(account);
        SysApplication.getInstance().exit();
      } else {
        SysApplication.getInstance().exit();
      }
    }

    return true;
  }
Пример #3
0
  public void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);
    this.setContentView(R.layout.amendactive);
    SysApplication.getInstance().addActivity(this);
    Bundle extras = getIntent().getExtras();
    id = extras.getInt("index");
    activeid = String.valueOf(id);

    TextView textViewTitle = (TextView) findViewById(R.id.title);
    textViewTitle.setText("发起活动");

    edittext1 = (EditText) findViewById(R.id.text2);
    edittext2 = (EditText) findViewById(R.id.text3);
    edittext3 = (EditText) findViewById(R.id.text5);
    edittext4 = (EditText) findViewById(R.id.text6);
    edittext5 = (EditText) findViewById(R.id.text4);

    Button button1 = (Button) findViewById(R.id.Btn1);
    button1.setOnClickListener(
        new OnClickListener() {
          public void onClick(View v) {

            String topic = edittext1.getText().toString();
            String address = edittext2.getText().toString();
            String starttime = edittext3.getText().toString();
            String endtime = edittext4.getText().toString();
            String content = edittext5.getText().toString();

            if (consumerdata
                .alterClientActyivity(
                    Consumer.getClientAccount(),
                    activeid,
                    topic,
                    address,
                    starttime,
                    endtime,
                    content)
                .equals("1")) {
              Toast.makeText(ClientAmendActive.this, "修改成功", Toast.LENGTH_LONG).show();
              finish();
            } else {
              Toast.makeText(ClientAmendActive.this, "网络异常,请稍后再试", Toast.LENGTH_LONG).show();
              finish();
            }
          }
        });
  }
Пример #4
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    ListView listViewAll;
    super.onCreate(savedInstanceState);
    setContentView(R.layout.more);

    SysApplication.getInstance().addActivity(this);

    Goods[] goods = consumerdata.viewScheduled(Consumer.getClientAccount());
    length = goods.length;
    BOYTYPE = new String[length];
    goodsid = new int[length];
    for (int i = 0; i < BOYTYPE.length; i++) {

      BOYTYPE[i] = goods[i].getGoodsName();
      goodsid[i] = Integer.parseInt(goods[i].getGoodsId());
    }

    listViewAll = (ListView) findViewById(android.R.id.list);
    setListAdapter(
        new SimpleAdapter(
            Reserve.this,
            getDate(),
            R.layout.common_listview_text,
            new String[] {"img", "text", "img_pre"},
            new int[] {R.id.img, R.id.text, R.id.img_pre}));
    listViewAll.setOnItemClickListener(this);

    LinearLayout menu1 = (LinearLayout) findViewById(R.id.menu1);
    menu1.setOnClickListener(menu);
    LinearLayout menu2 = (LinearLayout) findViewById(R.id.menu2);
    menu2.setOnClickListener(menu);
    LinearLayout menu3 = (LinearLayout) findViewById(R.id.menu3);
    menu3.setOnClickListener(menu);
    LinearLayout menu4 = (LinearLayout) findViewById(R.id.menu4);
    menu4.setOnClickListener(menu);
    LinearLayout menu5 = (LinearLayout) findViewById(R.id.menu5);
    menu5.setOnClickListener(menu);
  }