syedshan
Advanced Member level 1
- Joined
- Feb 27, 2012
- Messages
- 463
- Helped
- 27
- Reputation
- 54
- Reaction score
- 26
- Trophy points
- 1,308
- Location
- Jeonju, South Korea
- Activity points
- 5,134
Dear all
Hope everyone is doing great.
I am learning Android for the first time. I have done the a code thru tutorial which is working great.
Although my code works great. However, I want to inquire about the following code.
please see the
Hope everyone is doing great.
I am learning Android for the first time. I have done the a code thru tutorial which is working great.
Although my code works great. However, I want to inquire about the following code.
please see the
since I have seen this first time, I cannot understand what it says...For details excerpt please see the code below.new View.OnClickListener() {....}
Code:
mainButton2 = (Button) findViewById(R.id.main_button2);
mainButton2.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if(mainTextView.getText() == "Button pressed!" | mainTextView.getText() == "Button pressed unpressed")
mainTextView.setText("");
else
mainTextView.setText(" Please press the top button");
}
});