Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gedoor committed Dec 26, 2020
1 parent 3558e95 commit e4f4fe0
Show file tree
Hide file tree
Showing 58 changed files with 1,793 additions and 2,413 deletions.
22 changes: 9 additions & 13 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: "de.timfreiheit.resourceplaceholders"
Expand Down Expand Up @@ -35,7 +34,9 @@ android {
multiDexEnabled true

}

buildFeatures {
viewBinding true
}
lintOptions {
abortOnError false
}
Expand Down Expand Up @@ -73,8 +74,8 @@ resourcePlaceholders {
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'
testImplementation 'junit:junit:4.13'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'
testImplementation 'junit:junit:4.13.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':basemvplib')

Expand All @@ -87,14 +88,14 @@ dependencies {
implementation "org.jetbrains.anko:anko-sdk27-listeners:$anko_version"

//fireBase
implementation 'com.google.firebase:firebase-analytics:17.6.0'
implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
implementation 'com.google.firebase:firebase-analytics:18.0.0'
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'

//androidX
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.media:media:1.2.0'
implementation 'androidx.media:media:1.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

//google
Expand Down Expand Up @@ -135,11 +136,6 @@ dependencies {
//CircleImageView
implementation 'de.hdodenhof:circleimageview:3.1.0'

//bind view
//noinspection AnnotationProcessorOnCompilePath
implementation 'com.jakewharton:butterknife:10.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'

//webServer
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation 'org.nanohttpd:nanohttpd-websocket:2.3.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@

import java.util.List;

import butterknife.BindView;

/**
* Created by newbiechen on 17-4-24.
*/

public abstract class BaseTabActivity<T extends IPresenter> extends MBaseActivity<T> {
/**************View***************/
@BindView(R.id.tab_tl_indicator)
protected TabLayout mTlIndicator;
@BindView(R.id.tab_vp)
protected ViewPager mVp;
/**************Adapter***************/
protected TabFragmentPageAdapter tabFragmentPageAdapter;
Expand All @@ -39,6 +35,8 @@ public abstract class BaseTabActivity<T extends IPresenter> extends MBaseActivit
@Override
protected void bindView() {
super.bindView();
mTlIndicator = findViewById(R.id.tab_tl_indicator);
mVp = findViewById(R.id.tab_vp);
setUpTabLayout();
}

Expand Down
13 changes: 0 additions & 13 deletions app/src/main/java/com/kunfei/bookshelf/base/MBaseFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import androidx.annotation.Nullable;
Expand All @@ -25,22 +22,12 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}

@Override
protected View createView(LayoutInflater inflater, ViewGroup container) {
return inflater.inflate(createLayoutId(), container, false);
}

@Override
public void onDestroy() {
super.onDestroy();
detachView();
}

/**
* @return LayoutId
*/
public abstract int createLayoutId();

/**
* P层绑定 若无则返回null;
*/
Expand Down
Loading

0 comments on commit e4f4fe0

Please sign in to comment.