什么=>用JavaScript表示?

时间:2016-06-02 16:34:41

标签: javascript

我无法理解这段代码的语法。有人可以帮助描述它的含义吗?

String catName;
EditText catNameInput,catFoodInput,catHabitInput,catAgeInput;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_new_cat);

    final Button bBack=(Button) findViewById(R.id.bBack);
    bBack.setOnClickListener(new View.OnClickListener(){
        public void onClick(View v){
            Intent intent = new Intent(v.getContext(), MainActivity.class);
            startActivityForResult(intent,0);
        }
    });

    final Button bLocation=(Button) findViewById(R.id.bLocation);
    bLocation.setOnClickListener(new View.OnClickListener(){
        public void onClick(View v){
            Intent intent = new Intent(v.getContext(), mapActivity.class);
            startActivityForResult(intent,0);
        }

    });


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

            catNameInput = (EditText) findViewById(R.id.etCatName);
            catName=(String) catNameInput.getText().toString();



        }

    });
}

0 个答案:

没有答案