Skip to content

Afra55/AndroidBasicFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

AndroidBasicFramework

Android项目的基本架构搭建

Clean(干净架构) + Rxjava + Retrofit + Fresco.

https://github.com/Afra55/AndroidBasicFramework/tree/clean

MVP + Retrofit + Fresco.

https://github.com/Afra55/AndroidBasicFramework/tree/mvp


第三方库

  1. Retrofit http://square.github.io/retrofit/
  2. Fresco Fresco 文档
  3. Rxjava Rxjava 文档

推荐使用

  1. AppBarLayout,CollapsingToolbarLayout,Toobar 添加应用栏

  2. NestedScrollView NestedScrollView

  3. NavigationView 创建抽屉式导航栏

     Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
             setSupportActionBar(toolbar);
             
     DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
     ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
             this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
     drawer.setDrawerListener(toggle);
     toggle.syncState();
    
     NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
     navigationView.setNavigationItemSelectedListener(this);
    
  4. AppCompatPreferenceActivity 设置

  5. NotificationCompat.Builder 通知代码示例