Hello,
I a very new to this.. I mean totally new. I am learning how to build an App from an online course (video). I guess the course is older so not everything is the same in the updated version of the Android Studio. In the activity we are supposed to create a Toast. When the instructor types Toast and click on create Toast it automatically adds "MainActivity.this". Mine does not. All I get is Toast.makeText(this, "", Toast.LENGTH_SHORT).show();. So I only get "this". If I try to add MainActivity manually it doesn't seem to work.
If anyone can help me to understand the problem I would really appreciate it. I am stuck in my progress until I resolve it. Please remember that these few lines of code is all I know, so speak to me like you would to a child...and not a smart one!
public class MainActivity extends AppCompatActivity {
public void clickFunction(View view) {
Toast.makeText(this, "", Toast.LENGTH_SHORT).show();
EditText myTextField = (EditText) findViewById(R.id.myTextField);
Log.i("info", myTextField.getText().toString());