roomorama / Caldroid

A better calendar for Android
Other
1.42k stars 531 forks source link

how to change weekly View In this Module? & How to change Right and Left Arrow ? #380

Open vigneswarandavarapu opened 8 years ago

TianLiJun commented 8 years ago

You can use "Button left=caldroidFragment.getLeftArrowButton(); Button right=caldroidFragment.getRightArrowButton();left.setBackgroundResource(R.drawable.work1); right.setBackgroundResource(R.drawable.work2);" in onCaldroidViewCreated();

vigneswarandavarapu commented 8 years ago

it's giving null pointer Exception.please give me solution

Chris59160 commented 8 years ago

You need to override the style:

<style name="CaldroidCustom" parent="CaldroidDefault">
    <item name="styleCaldroidLeftArrow">@style/CaldroidCustomLeftArrow</item>
    <item name="styleCaldroidRightArrow">@style/CaldroidCustomRightArrow</item>
</style>
<style name="CaldroidCustomLeftArrow" parent="CaldroidDefaultArrowButton">
    <item name="android:background">@null</item>
</style>

<style name="CaldroidCustomRightArrow" parent="CaldroidDefaultArrowButton">
    <item name="android:background">@null</item>
</style>

I didn't want the arrow, so I set the background to @null. But if you want to use different assets, just set it to whatever you want, i.e : @drawable/my_arrow