第二阶段冲刺第三天

mport android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;



/**
 * @author:created By ZhangHao
 * 时间:2019/6/9 13
 * 邮箱:188660586@qq.com
 */
public class xiangxi extends Activity {

    private boolean paying;
    private isFuKuan ifk;


    @Override
    protected void onCreate( Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.xiangxi);
        ifk = (isFuKuan)getApplicationContext();


                    /* 找到关心的控件*/
        TextView xx_line = findViewById(R.id.xx_line);
        TextView xx_money =findViewById(R.id.xx_money);
        Button xx_click=findViewById(R.id.xx_click);
        /*接收传递过来的参数*/

        Intent intent = this.getIntent();
        String line = intent.getStringExtra("line");
        int money = intent.getIntExtra("money", 1);
        xx_line.setText(line);
        xx_money.setText(""+money+"元");

           /*给按钮设置点击事件*/

        xx_click.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast toast = Toast.makeText(getApplicationContext(), "二维码生成完成,请前往-我的-进行查看", Toast.LENGTH_LONG);
                paying =true;
     ifk.setIFK(paying);

                toast.show();
            }
        });
    }
}

 

posted @ 2019-06-20 22:56  我叫张小凡  阅读(111)  评论(0编辑  收藏  举报