is it ok to create a class which extends a service within a class that extends an activity
public class fill extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.seconds);
....................
}
public class MyCount extends Servcie{
....开发者_开发技巧.............................
..................................
.................................
}
}
2 ways to do:
- You need only an inner class? Than create one inside another class. (what you didn't have done because
MyCount
is not inside theActivity
class) - You need another class but it shouldnt be an inner class? Than create a new file for this class.
精彩评论