Comments (2)
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
from material-calendarview.
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)
- Can only add Version 1.4.3
- Saving and accessing decorators
- first time initialize the calendar, selected circle will expand to parent width and height HOT 1
- LTR && RTL
- that possible to add multiple spans? HOT 1
- Can I add labels on dates? HOT 1
- How to increase height of row to display more info
- I want to disable RTL. HOT 1
- How to change the background
- MVC not rendering on xml design view, messed up HOT 5
- Why selector drawable doesn't work?
- on CalendarMode.WEEKS i want to show two week
- Labelling Calendar with Events
- The problem that addspan of DayViewDecorator is not maintained when the month changes
- Can't control the accessibility of each day number HOT 2
- Selected Date Not Working
- Using material-calendarview in jetpack compose HOT 1
- Multiple dot span to one date HOT 2
- Persian Localization Issue
- Not able to convert Month name into Hindi If device language is Hindi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-calendarview.