zoukankan      html  css  js  c++  java
  • 第一阶段冲刺3

    1、我昨天的成就:完成了一个基本的注册界面,并可以实现跳转
    2、遇到什么困难:跳转的方法找了很久,并最终在网上找到。
    3、今天的任务:写一个类似于进入app的图片动画!

    public class ZhuCe extends AppCompatActivity {
    
        private EditText edit_name;
        private EditText edit_password;
        private EditText edit_password2;
        private Button Zhuce;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_zhu_ce);
    
            edit_name = findViewById(R.id.edit_name);
            edit_password = findViewById(R.id.edit_password);
            edit_password2 = findViewById(R.id.edit_password2);
    
            Zhuce=findViewById(R.id.tijiao);
    
            Zhuce.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                   test();
                }
            });
        }
        protected void test()
        {
            String password1 = edit_password.getText().toString();
            String password2 = edit_password2.getText().toString();
            if((edit_name).length()==0)
            {
                Toast.makeText(getApplicationContext(),"账号输入为空",Toast.LENGTH_SHORT).show();
            }
            else if((edit_password).length()==0)
            {
                Toast.makeText(getApplicationContext(),"密码输入为空",Toast.LENGTH_SHORT).show();
            }
            else if((edit_password2).length()==0)
            {
                Toast.makeText(getApplicationContext(),"确认密码输入为空",Toast.LENGTH_SHORT).show();
            }
            else if(!(password1.equals(password2)))
            {
                Toast.makeText(getApplicationContext(),"两次输入密码不一致",Toast.LENGTH_SHORT).show();
            }
            else
            {
                String name = edit_name.getText().toString();
                Intent intent = new Intent(ZhuCe.this,index.class);
                Bundle bundle = new Bundle();
                bundle.putString("name",name);
                intent.putExtras(bundle);
                startActivity(intent);
            }
        }
    
    }

  • 相关阅读:
    CF700E Cool Slogans
    [NOI2018]你的名字
    [CTSC2012]熟悉的文章
    CF666E Forensic Examination
    [BZOJ4310]跳蚤
    CF1063F String Journey
    [BZOJ3277]串/CF204E Little Elephant and Strings
    CF123D String
    使用ActiveReports for .net 进行报表开发之交叉报表(转)
    使用ActiveReport for .net 进行报表开发(一)(转自Cure The Last Day Of Summer)
  • 原文地址:https://www.cnblogs.com/xcl666/p/11061507.html
Copyright © 2011-2022 走看看