Skip to content

Commit

Permalink
1、新增WebFragment
Browse files Browse the repository at this point in the history
2、更新de.greenrobot:eventbus:3.0.0-beta1 为 'org.greenrobot:eventbus:3.0.0'
  • Loading branch information
jenly1314 committed Feb 5, 2017
1 parent 4ae7f3e commit fd720bb
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 22 deletions.
15 changes: 14 additions & 1 deletion Base.iml
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,39 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/24.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 24 Platform (1)" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="recyclerview-v7-24.0.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
<orderEntry type="library" exported="" name="eventbus-3.0.0-beta1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-24.0.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-24.0.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-24.0.0" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-24.0.0" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-24.0.0" level="project" />
<orderEntry type="library" exported="" name="eventbus-3.0.0" level="project" />
</component>
</module>
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ Base是针对于Android开发封装好一些常用的基类,主要包括通用
<dependency>
<groupId>com.king.base</groupId>
<artifactId>base</artifactId>
<version>1.3</version>
<version>2.0</version>
<type>pom</type>
</dependency>
```
###Gradle:
```gradle
compile 'com.king.base:base:1.3'
compile 'com.king.base:base:2.0'
```
###Lvy:
```lvy
<dependency org='com.king.base' name='base' rev='1.3'>
<dependency org='com.king.base' name='base' rev='2.0'>
<artifact name='$AID' ext='pom'></artifact>
</dependency>
```

###引入的库:
```gradle
compile 'com.android.support:recyclerview-v7:24.0.+'
provided 'com.android.support:recyclerview-v7:24.0.+'
```

```gradle
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ android {
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
provided 'com.android.support:appcompat-v7:24.0.+'
provided 'com.android.support:recyclerview-v7:24.0.+'
provided 'de.greenrobot:eventbus:3.0.+'
compile 'com.android.support:appcompat-v7:24.0.+'
compile 'org.greenrobot:eventbus:3.0.0'

}

Expand All @@ -39,7 +39,7 @@ publish {
userOrg = 'jenly'//bintray.com用户名
groupId = 'com.king.base'//jcenter上的路径
artifactId = 'base'//项目名称
publishVersion = '1.3'//版本号
publishVersion = '2.0'//版本号
desc = 'Base for Android'//描述
website = 'https://github.com/jenly1314/Base'//网站
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/king/base/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
import com.king.base.util.StringUtils;
import com.king.base.util.ToastUtils;

import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
import de.greenrobot.event.ThreadMode;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

/**
* @author Jenly
Expand Down Expand Up @@ -351,13 +351,13 @@ public boolean showAssist(Bundle args) {
return super.showAssist(args);
}

@Subscribe(threadMode = ThreadMode.MainThread)
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventExit(Boolean isExit){
if(isExit)
finish();
}

@Subscribe(threadMode = ThreadMode.MainThread)
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(EventMessage em){
onEventMessage(em);
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/king/base/BaseDialogFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
import com.king.base.util.StringUtils;
import com.king.base.util.ToastUtils;

import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
import de.greenrobot.event.ThreadMode;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

/**
* @author Jenly
Expand Down Expand Up @@ -346,7 +346,7 @@ public void exit(){
sendEvent(true);
}

@Subscribe(threadMode = ThreadMode.MainThread)
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(EventMessage em){
onEventMessage(em);
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/king/base/BaseFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
import com.king.base.util.StringUtils;
import com.king.base.util.ToastUtils;

import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
import de.greenrobot.event.ThreadMode;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

/**
* @author Jenly
Expand Down Expand Up @@ -381,7 +381,7 @@ public void exit(){
sendEvent(true);
}

@Subscribe(threadMode = ThreadMode.MainThread)
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(EventMessage em){
onEventMessage(em);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/king/base/fragment/WebFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public int inflaterRootView() {
return R.layout.fragment_web;
}


@Override
public void initUI() {
rootView.setFocusable(true);
Expand Down
2 changes: 1 addition & 1 deletion src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<item name="android:progressBarStyle">@style/Base.Widget.AppCompat.ProgressBar</item>
</style>

<style name="progressBarHorizontalStyle" parent="Widget.AppCompat.ProgressBar.Horizontal">
<style name="progressBarHorizontalStyle" parent="Base.Widget.AppCompat.ProgressBar.Horizontal">
</style>

</resources>

0 comments on commit fd720bb

Please sign in to comment.