I am trying to create something similar to Google Calendar drop down month widget.
Any help would be really appreciated.
So far I have an idea that I need to use Toolbar with expandable animation but not sure that's the right direction to move into.
Search for the Google Calendar app and tap it. To customize your widget size, swipe left. Tap Add widget. In the top right, tap Done.
I was also trying to create something similar to the Google Calendar app. I've come with this implementation:
I use the CompactCalendarView library for the month widget. And CollapsingToolbarLayout for the drop down.
You can view the source of this implementation at GitHub: https://github.com/GerritHoekstra/CompactCalendarViewToolbar
The main layout can be found here.
I hope this helps you further.
May you want to take a look to CollapsingToolbarLayout
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsingToolbarLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:expandedTitleMarginStart="64dp"
app:contentScrim="?attr/colorPrimary">
<CalendarView
android:layout_width="match_parent"
android:layout_height="256dp"></CalendarView>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_collapseMode="pin"/>
</android.support.design.widget.CollapsingToolbarLayout>
I recommend you to follow this awesome tutorial to implement this and other interesting things about Design Library. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With