Giter Site home page Giter Site logo

Comments (13)

MagicMashRoom avatar MagicMashRoom commented on May 4, 2024 1

首先你找到SyllabusActivity中 97 98 行 在确保你的View绘制出来之后调用这两句话 最后一个参数 时间 改为0 然后你在你的recyclerView的实例对象使用setNestedScrollingEnabled(false)这个方法 禁止掉嵌套滑动就可以了

from supercalendar.

StephenCMZ avatar StephenCMZ commented on May 4, 2024

感谢!

from supercalendar.

JYPJSY avatar JYPJSY commented on May 4, 2024

额,ST同学解决了吗?

from supercalendar.

StephenCMZ avatar StephenCMZ commented on May 4, 2024

@JYPJSY 根据楼上作者的回复,已经解决了

from supercalendar.

hqAnd avatar hqAnd commented on May 4, 2024

@StephenCMZ 老哥
Utils.scrollTo(content, recyclerView, monthPager.getCellHeight(), 200);
calendarAdapter.switchToWeek(0);
这两句代码你些在哪里了。我放在initMonthPager();这个方法后面了。但是变为周的时候显示空白。滑动一下就好了。

from supercalendar.

JYPJSY avatar JYPJSY commented on May 4, 2024

@StephenCMZ 请问,初始化就是周历的话。你的周历滑动操作,周历数据不会异常吗??我的周历数据异常了。求教,除了作者回复的修改,你还修改了哪里,谢谢。

from supercalendar.

StephenCMZ avatar StephenCMZ commented on May 4, 2024

@hqAnd 根据作者的回答是“在确保你的View绘制出来之后调用”,放在initMonthPager();后面出现异常,估计是 View 还没绘制完成吧。我是如下调用的:

@Override
    public void onStart() {
        super.onStart();
        if (calendarAdapter.getCalendarType() != CalendarAttr.CalendayType.WEEK){
            new Handler().postDelayed(new Runnable() {
                @Override
                public void run() {
                    scrollSwitchAction();
                }
            },500);
        }
    }

from supercalendar.

StephenCMZ avatar StephenCMZ commented on May 4, 2024

@JYPJSY 确实有出现过周历数据异常,我的做法是延迟切换到周模式:

@Override
    public void onStart() {
        super.onStart();
        if (calendarAdapter.getCalendarType() != CalendarAttr.CalendayType.WEEK){
            new Handler().postDelayed(new Runnable() {
                @Override
                public void run() {
                    scrollSwitchAction();
                }
            },500);
        }
    }

from supercalendar.

MagicMashRoom avatar MagicMashRoom commented on May 4, 2024

Utils.scrollTo(content, recyclerView, monthPager.getCellHeight(), 0);//时间改为0
calendarAdapter.switchToWeek(monthPager.getRowIndex());//滑动到当前日所在行
这两句方法可以在
@OverRide
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus && !initiated) {
refreshMonthPager();
initiated = true;
}
}
这句生命周期的回调中添加
添加完后可以提pull request ,将这个操作作为日历的一个特性封装起来

from supercalendar.

sxf-Ignite avatar sxf-Ignite commented on May 4, 2024

@MagicMashRoom 我布局外层没有像你demo那样嵌套,怎么设置,在初始日历的时候只显示week模式?

from supercalendar.

2628286752 avatar 2628286752 commented on May 4, 2024

@MagicMashRoom 只想要你的周日历效果,不需要下面的RecycleView,可以设置吗

from supercalendar.

TheBloodElf avatar TheBloodElf commented on May 4, 2024

问题太多了,基本的需求没办法满足;希望做成通用一点的

from supercalendar.

wardenlzr avatar wardenlzr commented on May 4, 2024

@MagicMashRoom 老哥,如何单纯使用月模式呢?

from supercalendar.

Related Issues (20)

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.