Giter Club home page Giter Club logo

Comments (2)

yolapop avatar yolapop commented on May 10, 2024

Set the color of the date selector. By default this is the color set by ?android:attr/colorPrimary on 5.0+ or ?attr/colorPrimary from the AppCompat library.

Also, it seems on my 5.1 device, selectionColor by default picks on colorAccent rather than colorPrimary.

I was using style.xml

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">@color/teal_500</item>
    <item name="colorPrimaryDark">@color/teal_700</item>

    <item name="colorAccent">@color/teal_a200</item>
</style>

And layout_calendar.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.prolificinteractive.materialcalendarview.MaterialCalendarView
        android:id="@+id/calendar_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:showOtherDates="true"
    />

</LinearLayout>

And the result: selectionColor uses teal_a200

screenshot_2015-03-12-10-13-37 1

from material-calendarview.

dandc87 avatar dandc87 commented on May 10, 2024

Hey @yolapop, I'm sorry about both of these.

The changes for custom labels were merged to master, but not released. If you update to version 0.2.5, you should have the attributes.

For the selection color, the library uses colorAccent by default and I've update the README to indicate that. If you want to use colorPrimary, you can use app:selectionColor="?attr/colorPrimary" (or ?android:attr/colorPrimary")

from material-calendarview.

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.