Last active
January 4, 2016 14:09
-
-
Save ankushg/8632729 to your computer and use it in GitHub Desktop.
TimesSquare for Android: A standalone Android widget for picking a single date from a calendar view.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void onCreate (Bundle savedInstanceState){ | |
Calendar nextYear = Calendar.getInstance(); | |
nextYear.add(Calendar.YEAR, 1); | |
CalendarPickerView calendar = (CalendarPickerView) findViewById(R.id.calendar_view); | |
Date today = new Date(); | |
calendar.init(today, nextYear.getTime()) | |
.withSelectedDate(today); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<com.squareup.timessquare.CalendarPickerView | |
android:id="@+id/calendar_view" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>com.squareup</groupId> | |
<artifactId>android-times-square</artifactId> | |
<version>1.0.3</version> | |
<type>apklib</type> | |
</dependency> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment