Skip to content

Commit

Permalink
add jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
shihao committed Mar 11, 2017
1 parent b067354 commit 465622c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 28 deletions.
16 changes: 16 additions & 0 deletions app/src/main/java/cn/droidlover/xdroid/demo/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

import java.util.concurrent.TimeUnit;

import cn.droidlover.xdroidbase.XDroidBaseConf;
import cn.droidlover.xdroidbase.imageloader.GlideLoader;
import cn.droidlover.xdroidbase.imageloader.ILoader;
import cn.droidlover.xdroidbase.router.Router;
import okhttp3.OkHttpClient;

/**
Expand All @@ -30,6 +34,18 @@ public void onCreate() {
OkHttpUtils.initClient(okHttpClient);

context = getApplicationContext();

XDroidBaseConf.getInstance()
.setLog(true)//是否显示log输出
.setDefLogTag("XDroid")//默认的日志输出tag
.setCacheSpName("config")//配置sharedPref的文件名
.setCacheDiskDir("cache")//配置缓存文件夹名称
.setILLoadingRes(ILoader.Options.RES_NONE)//配置图片加载loding占位图
.setILErrorRes(ILoader.Options.RES_NONE)//配置图片加载失败占位图
.setILoader(new GlideLoader())//配置图片框架
.setRouterLaunchAnim(Router.RES_NONE, Router.RES_NONE)//配置launch动画
.setRouterPopAnim(Router.RES_NONE, Router.RES_NONE)//配置pop动画
.build();//设置生效
}

public static Context getContext() {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'

classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 2 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.fodroid'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
Expand Down
27 changes: 0 additions & 27 deletions library/src/main/java/cn/droidlover/xdroid/XDroidConf.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package cn.droidlover.xdroid.base;

import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.view.View;

/**
* Created by shihao on 2017/3/11.
*/

public class SimpleListBindingViewHolder<T extends ViewDataBinding> {
private T binding;

public SimpleListBindingViewHolder(T binding) {
this.binding = binding;
}

public SimpleListBindingViewHolder(View itemView) {
this.binding = DataBindingUtil.bind(itemView);
}

public T getBinding() {
return binding;
}
}

0 comments on commit 465622c

Please sign in to comment.