search

Home  >  Q&A  >  body text

How to classify different java files in Android according to their functions, such as activity adapter beans, etc.

How to classify different java files according to their functions in Android, such as dividing them into activity adapter beans, etc.

我想大声告诉你我想大声告诉你2743 days ago698

reply all(5)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新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.

    reply
    0
  • PHP中文网

    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.

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-16 13:26:13

    It is clearer to divide according to MVP framework and functional modules

    reply
    0
  • 漂亮男人

    漂亮男人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

    reply
    0
  • 漂亮男人

    漂亮男人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.

    reply
    0
  • Cancelreply