i am learning to build app through java but dont know java hence i m taking an old android course.

  • Thread starter Android Central Question
  • Start date
A

Android Central Question

old code

package com.myappcompany.rob.interactivitydemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends AppCompatActivity {

public void clickFunction(View view) {

Log.i("Info", "It worked!!");

}

@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}

new code

package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends AppCompatActivity {
private String tag,msg;

public void clickFunction(View view){
Log.i( tag:"Info" , msg :"Button Pressed");
}

@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
in new code does not identify tag and msg
 

hallux

Q&A Team
Jul 7, 2013
12,322
7
38
Visit site
You might consider posting in the developer's forum/lounge if you have a specific question. You would need to register to post there.

If you need additional help or have more questions or details to share, please join the site so you can reply in this thread. See this link for instructions on how to join Android Central.
 

Rukbat

Retired Moderator
Feb 12, 2012
44,529
26
0
Visit site
First learn programming, including object oriented programming - in English. (You don't 'build an app', you solve a problem. Then you code the solution into Java/Kotlin.)
 

Forum statistics

Threads
943,142
Messages
6,917,501
Members
3,158,840
Latest member
wei34