Skip to content

Commit

Permalink
convert webp & fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
codeestX committed Mar 12, 2017
1 parent dc9406c commit e3a8996
Show file tree
Hide file tree
Showing 97 changed files with 13 additions and 113 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'realm-android'

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

defaultConfig {
applicationId "com.codeest.geeknews"
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/com/codeest/geeknews/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.codeest.geeknews.di.component.DaggerAppComponent;
import com.codeest.geeknews.di.module.AppModule;
import com.codeest.geeknews.di.module.HttpModule;
import com.codeest.geeknews.di.module.PageModule;

import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -105,7 +104,6 @@ public static AppComponent getAppComponent(){
appComponent = DaggerAppComponent.builder()
.appModule(new AppModule(instance))
.httpModule(new HttpModule())
.pageModule(new PageModule())
.build();
}
return appComponent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@
import com.codeest.geeknews.app.App;
import com.codeest.geeknews.di.module.AppModule;
import com.codeest.geeknews.di.module.HttpModule;
import com.codeest.geeknews.di.module.PageModule;
import com.codeest.geeknews.model.db.RealmHelper;
import com.codeest.geeknews.model.http.RetrofitHelper;
import com.codeest.geeknews.ui.gank.fragment.GankMainFragment;
import com.codeest.geeknews.ui.gold.fragment.GoldMainFragment;
import com.codeest.geeknews.ui.main.fragment.AboutFragment;
import com.codeest.geeknews.ui.main.fragment.LikeFragment;
import com.codeest.geeknews.ui.main.fragment.SettingFragment;
import com.codeest.geeknews.ui.vtex.fragment.VtexMainFragment;
import com.codeest.geeknews.ui.wechat.fragment.WechatMainFragment;
import com.codeest.geeknews.ui.zhihu.fragment.ZhihuMainFragment;

import javax.inject.Singleton;

Expand All @@ -24,28 +15,12 @@
*/

@Singleton
@Component(modules = {AppModule.class, HttpModule.class, PageModule.class})
@Component(modules = {AppModule.class, HttpModule.class})
public interface AppComponent {

App getContext(); // 提供App的Context

RetrofitHelper retrofitHelper(); //提供http的帮助类

RealmHelper realmHelper(); //提供数据库帮助类

ZhihuMainFragment zhihuMainFragment();

GankMainFragment gankMainFragment();

WechatMainFragment wechatMainFragment();

GoldMainFragment goldMainFragment();

VtexMainFragment vtexMainFragment();

LikeFragment likeFragment();

SettingFragment settingFragment();

AboutFragment aboutFragment();
}
71 changes: 0 additions & 71 deletions app/src/main/java/com/codeest/geeknews/di/module/PageModule.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
import com.miguelcatalan.materialsearchview.MaterialSearchView;
import com.tbruyelle.rxpermissions.RxPermissions;

import javax.inject.Inject;

import butterknife.BindView;
import me.yokeyword.fragmentation.SupportFragment;

Expand All @@ -56,21 +54,13 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
@BindView(R.id.view_search)
MaterialSearchView mSearchView;

@Inject
ZhihuMainFragment mZhihuFragment;
@Inject
GankMainFragment mGankFragment;
@Inject
WechatMainFragment mWechatFragment;
@Inject
GoldMainFragment mGoldFragment;
@Inject
VtexMainFragment mVtexFragment;
@Inject
LikeFragment mLikeFragment;
@Inject
SettingFragment mSettingFragment;
@Inject
AboutFragment mAboutFragment;

MenuItem mLastMenuItem;
Expand Down Expand Up @@ -112,6 +102,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
@Override
protected void initEventAndData() {
setToolBar(mToolbar,"知乎日报");
mZhihuFragment = new ZhihuMainFragment();
mGankFragment = new GankMainFragment();
mWechatFragment = new WechatMainFragment();
mGoldFragment = new GoldMainFragment();
mVtexFragment = new VtexMainFragment();
mLikeFragment = new LikeFragment();
mSettingFragment = new SettingFragment();
mAboutFragment = new AboutFragment();
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, mToolbar, R.string.drawer_open, R.string.drawer_close);
mDrawerToggle.syncState();
mDrawerLayout.addDrawerListener(mDrawerToggle);
Expand Down
Binary file removed app/src/main/res/mipmap-night-xxhdpi/ic_cache.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-night-xxhdpi/ic_cache.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-night-xxhdpi/ic_clear.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-night-xxhdpi/ic_clear.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-night-xxhdpi/ic_feedback.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-night-xxhdpi/ic_hot.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-night-xxhdpi/ic_hot.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-night-xxhdpi/ic_image.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-night-xxhdpi/ic_image.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-night-xxhdpi/ic_night.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-night-xxhdpi/ic_night.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-night-xxhdpi/ic_update.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-night-xxhdpi/ic_update.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xhdpi/bg_splash.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xhdpi/bg_splash.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/bg_about.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/bg_about.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_android.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_android.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_author.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_author.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_cache.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_cache.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_clear.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_clear.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_close.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_close.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_comment.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_comment.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_daily_comment.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_daily_comment.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_daily_like.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_daily_like.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_daily_share.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_daily_share.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drag.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_drag.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drawer_about.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_drawer_about.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drawer_gank.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_drawer_gank.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drawer_gold.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_drawer_gold.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drawer_like.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_drawer_like.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drawer_setting.png
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drawer_vtex.png
Binary file not shown.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_drawer_vtex.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drawer_wechat.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_drawer_wechat.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_drawer_zhihu.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_drawer_zhihu.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_fab_calendar.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_fab_calendar.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_feedback.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_feedback.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_gold_author.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_gold_author.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_gold_like.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_gold_like.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_gold_time.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_gold_time.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_hot.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_hot.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_image.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_image.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_ios.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_ios.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_menu.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_menu.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_night.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_night.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_time.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_time.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_toolbar_copy.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_toolbar_copy.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_toolbar_like_n.png
Diff not rendered.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_toolbar_like_p.png
Diff not rendered.
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_toolbar_save.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_toolbar_save.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_toolbar_share.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_toolbar_share.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_update.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_update.webp
Binary file not shown.
Binary file removed app/src/main/res/mipmap-xxhdpi/ic_web.png
Diff not rendered.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_web.webp
Binary file not shown.
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.2'
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "io.realm:realm-gradle-plugin:1.1.1"

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
#Sun Mar 12 23:28:39 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 e3a8996

Please sign in to comment.