Code Monkey home page Code Monkey logo

ganguo's Issues

请教一个问题

我用了作者的吸顶布局滚动监听
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@OverRide
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
}

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            super.onScrolled(recyclerView, dx, dy);

// if (dy <= 0) {
// fab.show();
// } else {
// fab.hide();
// }

            View stickyInfoView = recyclerView.findChildViewUnder(
                    tvTop.getMeasuredWidth() / 2, 5);

            if (stickyInfoView != null && stickyInfoView.getContentDescription() != null) {
                tvTop.setText(String.valueOf(stickyInfoView.getContentDescription()));
            }

            View transInfoView = recyclerView.findChildViewUnder(
                    tvTop.getMeasuredWidth() / 2, tvTop.getMeasuredHeight() + 1);

            if (transInfoView != null && transInfoView.getTag() != null) {

                int transViewStatus = (int) transInfoView.getTag();
                int dealtY = transInfoView.getTop() - tvTop.getMeasuredHeight();

                if (transViewStatus == mConsumeAdapter.HAS_STICKY_VIEW) {
                    if (transInfoView.getTop() > 0) {
                        tvTop.setTranslationY(dealtY);
                    } else {
                        tvTop.setTranslationY(0);
                    }
                } else if (transViewStatus == mConsumeAdapter.NONE_STICKY_VIEW) {
                    tvTop.setTranslationY(0);
                }
            }
        }
    });

为什么在最顶部的那个会缩进去,或者是位置不正确呢,找不出来问题,请教下作者

OutOfMemoryError on Xiaomi Note2 base on Android 5.0.1 platform

06-13 09:28:42.433 8367-8367/com.gank E/art: Throwing OutOfMemoryError "Failed to allocate a 8294412 byte allocation with 6411488 free bytes and 6MB until OOM" 06-13 09:28:42.436 8367-8367/com.gank E/AndroidRuntime: FATAL EXCEPTION: main Process: com.gank, PID: 8367 java.lang.OutOfMemoryError: Failed to allocate a 8294412 byte allocation with 6411488 free bytes and 6MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:825) at android.graphics.Bitmap.createBitmap(Bitmap.java:802) at android.graphics.Bitmap.createBitmap(Bitmap.java:722) at android.graphics.Bitmap.createBitmap(Bitmap.java:647) at android.graphics.Bitmap.createBitmap(Bitmap.java:627) at com.gank.ui.base.BaseActivity.getCacheBitmapFromView(BaseActivity.java:123) at com.gank.ui.base.BaseActivity.showAnimation(BaseActivity.java:96) at com.gank.ui.base.BaseActivity.access$000(BaseActivity.java:40) at com.gank.ui.base.BaseActivity$1.accept(BaseActivity.java:59) at com.gank.ui.base.BaseActivity$1.accept(BaseActivity.java:56) at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:59) at io.reactivex.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:265) at io.reactivex.subjects.PublishSubject.onNext(PublishSubject.java:184) at com.gank.ui.base.RxBus.post(RxBus.java:75) at com.gank.ui.base.RxBus.post(RxBus.java:68) at com.gank.ui.setting.SettingFragment$3.onCheckedChanged(SettingFragment.java:118) at android.widget.CompoundButton.setChecked(CompoundButton.java:152) at android.support.v7.widget.SwitchCompat.setChecked(SwitchCompat.java:1062) at android.support.v7.widget.SwitchCompat.toggle(SwitchCompat.java:1057) at android.widget.CompoundButton.performClick(CompoundButton.java:124) at android.view.View$PerformClick.run(View.java:20136) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5562) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:968) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:763)

频道选择错误~

默认初始化频道是首页,android,ios,前端,但是点击选择频道以后,返回(无操作)会多出扩展资源。

只需要在初始化频道的时候把if(i<4) 改成if(i<3)就可以了

请教一下 大神的图片墙的缓存是怎么处理的

大神应用的代码似乎把图片的所有资源都缓存了,但是内存似乎一直保持在80~90mb左右,是在哪里做了释放呢,且滑倒下面去之后再划上来,图片依然显示出来了,好像图片内存缓存并没有清一样
可否简单说说 大神的内存怎么处理的呢?
我这边做了很多处理 依然会有oom的存在。。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.