android_haibin:calendarview的使用

强大的第三方日历控件

GitHub https://github.com/huanghaibin-dev/CalendarView

juejin https://juejin.im/post/5a6743836fb9a01caa20aefc

使用方法

compile 'com.haibin:calendarview:3.3.9' 

android_haibin:calendarview的使用_第1张图片

去GitHub看到这个效果一下子就喜欢了,就把代码下了下来了解一下

具体使用

把源代码中的MeiZuActivity MeizuMonthView MeiZuWeekView BaseActivity复制一份 以及你想用的资源文件drawable底下的bg_material.xml bg_ripple.xml  mipmap底下menu_action_calendar_mvp.png  layout底下activity_meizu.xml

layout代码



    
    

        

            

            

                

                
            

            

                

                
            
        

    app:calendar_content_view_id="@+id/recyclerView">

        app:month_view="com.example.iamchan.cal2.MeiZuMonthView"
            app:week_view="com.example.iamchan.cal2.MeizuWeekView"
            app:selected_text_color="#333"
            app:selected_theme_color="#80cfcfcf"
            app:week_background="#fff"
            app:week_text_color="#111111"
            app:week_start_with="sun"
            app:week_view_scrollable="true"
            app:year_view_day_text_color="#333333"
            app:year_view_day_text_size="9sp"
            app:year_view_month_text_color="#ff0000"
            app:year_view_month_text_size="20sp"
            app:month_view_show_mode="mode_only_current"
            app:year_view_scheme_color="#f17706"/>

         android:id="@+id/recyclerView"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

    
    
        
    


注意红色部分month_view和week_view是你的MeizuMonthView MeiZuWeekView路径地址

剩下的就是联动id要一致

 

我的github https://github.com/woshichan/cal 可以参考一下

 
 

 

 

你可能感兴趣的:(android_haibin:calendarview的使用)