Git Product home page Git Product logo

basic's Introduction

BasicApp功能介绍

欢迎Follow我的Github:https://github.com/meikoz 如果有不理解的 可以加q 93682011

Usage Gradle

repositories {
    maven { url "https://jitpack.io" }
}
dependencies {
    compile 'com.github.meikoz:basic:2.0.3'
}

##Basic框架支出的功能##

  • Mvp模式
  • 网络请求的封装
  • 强大的漂亮日志
  • 列表数据的统一业务处理
  • 多种样式上拉加载、下拉刷新
  • App crash 异常的处理
  • Loading页面的统一处理
  • 快速实现广告轮播图、引导页功能
  • 快速实现底部导航功能
  • 右滑页面关闭当前Activity

Mvp模式

Application onreate方法中初始化presenter
LogicProxy.getInstance().init(
                LoginLogic.class, MainLogic.class...);
				
在Activity中直接取出presenter实例绑定view
LoginLogic mLoginLogic = getLogicImpl(LoginLogic.class, this);

简单、漂亮、实用的Logcat

Application onreate方法中初始化
Logcat.init("com.android.logcat").hideThreadInfo().methodCount(3);

在需要的地方使用 "com.android.logcat" 是Logcat的TAG
Logcat.d(message);
Logcat.i(message);

App打开哪个页面直接能找到相应的类 Paste_Image.png

网络请求Retrofit2.0封装和使用

Paste_Image.png 定义生成自己相应的Service,BASE_URL是服务器地址,这样就简单实现的网络调用

 Factory.provideHttpService().getImageClassify(page).enqueue(new Callback<Classify>() {
            @Override
            public void onResponse(Call<Classify> call, Response<Classify> response) {
                onLoadListSuccessHandle(response, isMore);
            }

            @Override
            public void onFailure(Call<Classify> call, Throwable t) {
                onLoadFail("请求失败,原因..");
            }
        });

统一处理列表加载业务逻辑类

Paste_Image.png

XRecyclerView实现多种下拉刷新,上拉加载样式

支持addHeaderView、footerView

LinearLayoutManager layoutManager = new LinearLayoutManager(context); layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecy.setLayoutManager(layoutManager);
//设置分隔线
mRecy.addItemDecoration(new SpacesItemDecoration(1));
mRecy.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
//设置加载更多样式
mRecy.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
mRecy.setArrowImageView(R.drawable.abc_icon_down_arrow);

Android Crash异常处理

Application onreate方法中初始化 异常保存本地,可以进行服务上传
AndroidCrash.getInstance().init(this);

快速实现广告轮播图CustomViewpager

CustomViewPageAdapter adapter = new CustomViewPageAdapter(getActivity(), getAdData());
mViewpage.updateIndicatorView(getAdData().size(), 0);
mViewpage.setAdapter(adapter);
mViewpage.startScorll();

快速实现底部导航功能

Paste_Image.png

实现右滑关闭当前页面

Paste_Image.png

 

basic's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.