Click here to Skip to main content
       

Mobile

 
QuestionSuggestions on Sensor API PinmemberNitin29057-May-13 21:07 
Questionthis my friends question on android application which i am not able to solve please let help my friend PinmemberMember 97729226-May-13 3:47 
AnswerRe: this my friends question on android application which i am not able to solve please let help my friend Pinmember0xr00t3r11-May-13 16:16 
AnswerRe: this my friends question on android application which i am not able to solve please let help my friend Pinmembermekalareddy13-May-13 4:37 
QuestionAndroid Orientation with Video Pinmemberkeyur satyadev6-May-13 0:26 
AnswerRe: Android Orientation with Video PinmemberShruti Sruchika7-May-13 0:08 
GeneralRe: Android Orientation with Video Pinmemberkeyur satyadev7-May-13 22:21 
QuestionAndroid activity inheritance Pinmembershja884-May-13 4:23 
Hello,
I've been trying to make my first Android app.
I created a library project that cointain an activity called 'Reader':
public class Reader extends Activity {
    private String ID;
    public void setID(String id) {
	ID = id;
    }
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_reader);
    }
 
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
	getMenuInflater().inflate(R.menu.activity_reader, menu);
	return true;
    }
}
 
also i created a (test) project that contain another activity called 'MainActivity':
public class MainActivity extends Reader {
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setID("bla_bla_bla");
    }
}
 
when it comes to the GUI the inheritance is working well, i can see everything I placed in 'Reader' on 'MainActivity', but when it comes to using inherited methods such as 'setID(String)' i get a compilation error
Eclipse Quote:
The method setID(String) is undefined for the type MainActivity

 
How can it be?
 
thank you very much!!!
SuggestionRe: Android activity inheritance PinprofessionalPrasad Khandekar30-May-13 6:31 
Questionandroid activity inheritance Pinmembershja884-May-13 3:59 
NewsMessage Automatically Removed PinmemberStaceycook0322-Apr-13 14:02 
Questionhow to execute adb commands from dialog based application? PinmemberLe@rner12-Apr-13 0:28 
QuestionWindows Phone 8 SQLite Question PinmemberTony Palumbo11-Apr-13 8:11 
AnswerRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon11-Apr-13 9:07 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo11-Apr-13 9:27 
GeneralRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon11-Apr-13 9:28 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo11-Apr-13 10:02 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo11-Apr-13 10:07 
GeneralRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon11-Apr-13 10:31 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo12-Apr-13 2:01 
GeneralRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon12-Apr-13 2:55 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo12-Apr-13 3:22 
GeneralRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon12-Apr-13 3:25 
GeneralRe: Windows Phone 8 SQLite Question PinmemberSanjay22Tomar18-Apr-13 0:59 
QuestionInvoke a secure web service from J2ME PinmemberEng.Fatima M10-Apr-13 22:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140421.2 | Last Updated 16 Apr 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid