Break up a rather large android project into smaller components

I am still pretty new to developing Android programs and am having difficulty with my current project. It started out as a simple small project, but it became large for a single file.

I would like to split it into several components, for example, ui, calculations and main. But what is the best way to do this.

Currently I have received:

public class main extends Activity {...}

and

public class preference extends PreferenceActivity implements OnSharedPreferenceChangeListener {...}

Should I remove functions from main, put it like this:

public class ui extends main {...}
+3
source share
2 answers

It is up to you to organize your project accordingly. My way of doing things is to have the following packages:

  • action . Where I post all the actions.

  • . , : User Country.

  • . .

  • .

  • : .

  • .

  • util: , , (, JSON, String, ..).

.

activities . ui , ui (inseed of activities). , . , : LoginScreenActivity. , Shelves Foursquare, Android.

+2

MVC/MVP/MVVM. Android-, // .

0

All Articles