Skip to content

Commit

Permalink
update FragmentLazy
Browse files Browse the repository at this point in the history
  • Loading branch information
秋逸 committed Mar 3, 2017
1 parent 6e74203 commit 5d7bef3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion RxTools-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'com.jfrog.bintray'

android {
compileSdkVersion 25
buildToolsVersion "24.0.2"
buildToolsVersion '25.0.0'

defaultConfig {
minSdkVersion 14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
Expand Down Expand Up @@ -47,8 +48,7 @@ public abstract class FragmentLazy extends Fragment {
*/
private boolean isFirstLoad = true;

public Context mContext;

public FragmentActivity mContext;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Expand All @@ -61,7 +61,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
// 取消 isFirstLoad = true的注释 , 因为上述的initData本身就是应该执行的
// onCreateView执行 证明被移出过FragmentManager initData确实要执行.
// 如果这里有数据累加的Bug 请在initViews方法里初始化您的数据 比如 list.clear();
mContext = getContext();
mContext = getActivity();

isFirstLoad = true;
View view = initViews(inflater, container, savedInstanceState);
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'android-apt'

android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.vondear.rxtools"
minSdkVersion 14
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Fri Mar 03 09:55:18 CST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

0 comments on commit 5d7bef3

Please sign in to comment.