@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.discover_activity_processmoreother); ButterKnife.bind(this); adapter = new OtherArrayAdapter(this); gridView.setAdapter(adapter); visitOther.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(ProcessMoreOtherActivity.this, ProcessMoreActivity.class); intent.putExtra( Constant.INRECORD_TRADE, getIntent().getStringExtra(Constant.INRECORD_TRADE)); startActivity(intent); finish(); } }); addFab.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(ProcessMoreOtherActivity.this, PublishActivity.class)); } }); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.user_activity_modifypass); ButterKnife.bind(this); submit.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { getPresenter() .resetPassword( oldPassword.getText().toString(), newPassword.getText().toString(), repeatPassword.getText().toString()); } }); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.user_activity_messageset); ButterKnife.bind(this); setSwitch(); commentPush.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { if (commentSwitchOn) { commentPush.setImageDrawable(getResources().getDrawable(R.drawable.ic_off)); commentSwitchOn = false; Utils.spPutBoolean(Constant.COMMENTSWITCHON, commentSwitchOn); JPushInterface.stopPush(getApplicationContext()); } else { commentPush.setImageDrawable(getResources().getDrawable(R.drawable.ic_on)); commentSwitchOn = true; Utils.spPutBoolean(Constant.COMMENTSWITCHON, commentSwitchOn); JPushInterface.resumePush(getApplicationContext()); } } }); starPush.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { if (starSwitchOn) { starPush.setImageDrawable(getResources().getDrawable(R.drawable.ic_off)); starSwitchOn = false; Utils.spPutBoolean(Constant.STARSWITCHON, starSwitchOn); JPushInterface.stopPush(getApplicationContext()); } else { starPush.setImageDrawable(getResources().getDrawable(R.drawable.ic_on)); starSwitchOn = true; Utils.spPutBoolean(Constant.STARSWITCHON, starSwitchOn); JPushInterface.resumePush(getApplicationContext()); } } }); attentionPush.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { if (atentionSwitchOn) { attentionPush.setImageDrawable(getResources().getDrawable(R.drawable.ic_off)); atentionSwitchOn = false; Utils.spPutBoolean(Constant.ATENTIONSWITCHON, atentionSwitchOn); JPushInterface.stopPush(getApplicationContext()); } else { attentionPush.setImageDrawable(getResources().getDrawable(R.drawable.ic_on)); atentionSwitchOn = true; Utils.spPutBoolean(Constant.ATENTIONSWITCHON, atentionSwitchOn); JPushInterface.resumePush(getApplicationContext()); } } }); systemPush.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { if (systemSwitchOn) { systemPush.setImageDrawable(getResources().getDrawable(R.drawable.ic_off)); systemSwitchOn = false; Utils.spPutBoolean(Constant.SYSTEMSWITCHON, systemSwitchOn); JPushInterface.stopPush(getApplicationContext()); } else { systemPush.setImageDrawable(getResources().getDrawable(R.drawable.ic_on)); systemSwitchOn = true; Utils.spPutBoolean(Constant.SYSTEMSWITCHON, systemSwitchOn); JPushInterface.resumePush(getApplicationContext()); } } }); }