Click here to Skip to main content
       

Mobile

 
QuestionSuggestions on Sensor API PinmemberNitin29057-May-13 22:07 
Questionthis my friends question on android application which i am not able to solve please let help my friend PinmemberMember 97729226-May-13 4:47 
AnswerRe: this my friends question on android application which i am not able to solve please let help my friend Pinmember0xr00t3r11-May-13 17:16 
AnswerRe: this my friends question on android application which i am not able to solve please let help my friend Pinmembermekalareddy13-May-13 5:37 
QuestionAndroid Orientation with Video Pinmemberkeyur satyadev6-May-13 1:26 
AnswerRe: Android Orientation with Video PinmemberShruti Sruchika7-May-13 1:08 
GeneralRe: Android Orientation with Video Pinmemberkeyur satyadev7-May-13 23:21 
QuestionAndroid activity inheritance Pinmembershja884-May-13 5: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 7:31 
Questionandroid activity inheritance Pinmembershja884-May-13 4:59 
NewsMessage Automatically Removed PinmemberStaceycook0322-Apr-13 15:02 
Questionhow to execute adb commands from dialog based application? PinmemberLe@rner12-Apr-13 1:28 
QuestionWindows Phone 8 SQLite Question PinmemberTony Palumbo11-Apr-13 9:11 
AnswerRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon11-Apr-13 10:07 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo11-Apr-13 10:27 
GeneralRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon11-Apr-13 10:28 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo11-Apr-13 11:02 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo11-Apr-13 11:07 
GeneralRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon11-Apr-13 11:31 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo12-Apr-13 3:01 
GeneralRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon12-Apr-13 3:55 
GeneralRe: Windows Phone 8 SQLite Question PinmemberTony Palumbo12-Apr-13 4:22 
GeneralRe: Windows Phone 8 SQLite Question PinprotectorPete O'Hanlon12-Apr-13 4:25 
GeneralRe: Windows Phone 8 SQLite Question PinmemberSanjay22Tomar18-Apr-13 1:59 
QuestionInvoke a secure web service from J2ME PinmemberEng.Fatima M10-Apr-13 23: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.141220.1 | Last Updated 18 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid