How to classify different java files according to their functions in Android, such as dividing them into activity adapter beans, etc.
曾经蜡笔没有小新2017-05-16 13:26:13
I am configuring the page activity, config, network http tool, utils, etc. I feel that the classification is to make it clearer in the future. As long as you can distinguish it clearly, it will be more clear to others.
PHP中文网2017-05-16 13:26:13
Subcontracting can be flexibly classified according to your own needs:
Can be divided by function: Android open source project subcontracting method learning (eoe, oschina, github);
Can also be divided by business: android-architecture.
滿天的星座2017-05-16 13:26:13
It is clearer to divide according to MVP framework and functional modules
漂亮男人2017-05-16 13:26:13
Relatively small projects can be divided like this, a typical MVC model. Larger projects need to be divided by modules, refer to MVP or MVVM
漂亮男人2017-05-16 13:26:13
The more you write code, the more you will pay attention to it, and you will slowly develop your own style.
I have a way, that is, look at your class inheritance relationship. For example, the MainActivity extends Activity we wrote ourselves can be classified into the Activity category; XXXAdapter extends BaseAdapter can also be classified into the Adapter category. To put it simply, it means grouping things that have something in common into one category.