Last active
December 28, 2017 13:25
-
-
Save the-dagger/7f46c297edbea5c9b0bdf9d4d0c9c3fb to your computer and use it in GitHub Desktop.
Kotlin synthetic binding blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity extends AppCompatActivity{ | |
TextView studentName, studentSubject, studentCenter; | |
//Since I might need them later on outside of my onCreate method | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
studentName = findViewById(R.id.studentName), | |
studentCenter = findViewById(R.id.studentCenter), | |
studentSubject = findViewById(R.id.studentSubject); | |
} | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
studentName.setText("Harshit Dwivedi"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment