I am trying to design one Abstract class and method in Android and call those methods by extending the class from my parent Activity class but I don't how to call my abstract method.
MyCode :
MainActivity.java
public class MainActivity extends MyActivity {
@Override
public void onTest() {
Log.d("MyLog", "onTest");
} }
MyActivity.java
public abstract class MyActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public abstract void onTest(); }
So this is the above code snippet , please let me know , how to use Abstract in Android because i have never done this before.