oop - Using Android's TabActivity in an Object-oriented manner -


i'm new object-oriented programming, , i'm interested in learning correctly. problem this:

i trying create tabactivity plots user's data on time in each tab's content. thing tabs going control timespan of graph. (i.e. 1 tab 'past year', 1 'past month', 1 'all time', etc). can see, layout used each tab identical. code used each tab differ couple lines... (the starting , ending date of x-axis).

i'm not sure how can pull off in well-designed, object-o fashion. ideas?

ok...as far know can give try :

make on super class extends acitivity.. particular class have acitivity life cycle methods.

now make child class a1 extending class (since activity, a1 acitivity) can start activity in tab 1.

make child class a2 extending class (since activity, a2 acitivity) can start activity in tab 2.

make child class a3 extending class (since activity, a3 acitivity) can start activity in tab 3.

don't forget declare activities a1, a2, a3 androidmanifest.xml.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -