TimesSquare for Android
==========================
Standalone Android widget for picking a single date from a calendar view.
![Screenshot](timesSquareScreenshot.png)
Usage
-----
Include `CalendarPickerView` in your layout XML.
```xml
<com.squareup.timessquare.CalendarPickerView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
```
This is a fairly large control so it is wise to give it ample space in your layout. On small
devices it is recommended to use a dialog, full-screen fragment, or dedicated activity. On larger
devices like tablets, displaying full-screen is not recommended. A fragment occupying part of the
layout or a dialog is a better choice.
In the `onCreate` of your activity/dialog or the `onCreateView` of your fragment, initialize the
view with a range of valid dates as well as the currently selected date.
```java
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);
```
The default mode of the view is to have one selectable date. If you want the user to be able to
select multiple dates or a date range, use the inMode() method:
```java
calendar.init(today, nextYear.getTime())
.inMode(RANGE);
```
Download
--------
The latest version can be downloaded in [zip][zip] and referenced by your application as a library
project.
You can also depend on the library through Maven:
```xml
<dependency>
<groupId>com.squareup</groupId>
<artifactId>android-times-square</artifactId>
<version>(insert latest version)</version>
<type>apklib</type>
</dependency>
```
License
-------
Copyright 2012 Square, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
[zip]: https://github.com/square/android-times-square/archive/master.zip
没有合适的资源?快使用搜索试试~ 我知道了~
Android应用源码之android-times-square Android日历部件.zip项目安卓应用源码下载
共84个文件
xml:38个
java:20个
png:10个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 101 浏览量
2022-03-07
21:40:36
上传
评论
收藏 531KB ZIP 举报
温馨提示
Android应用源码之android-times-square Android日历部件.zip项目安卓应用源码下载Android应用源码之android-times-square Android日历部件.zip项目安卓应用源码下载 1.适合学生毕业设计研究参考 2.适合个人学习研究参考 3.适合公司开发项目技术参考
资源推荐
资源详情
资源评论
收起资源包目录
Android应用源码之android-times-square Android日历部件.zip (84个子文件)
Android应用源码之android-times-square Android日历部件
Android应用源码之android-times-square Android日历部件
android-times-square-master
.travis.yml 388B
pom.xml 5KB
sample
pom.xml 1KB
res
drawable-hdpi
icon.png 5KB
drawable-xhdpi
icon.png 7KB
drawable-xxhdpi
icon.png 12KB
values
strings.xml 121B
drawable-mdpi
icon.png 3KB
layout
dialog.xml 439B
sample_calendar_picker.xml 2KB
src
com
squareup
timessquare
sample
SampleTimesSquareActivity.java 6KB
project.properties 400B
AndroidManifest.xml 940B
checkstyle.xml 5KB
library
pom.xml 3KB
res
drawable
calendar_bg_selector.xml 951B
color
calendar_text_selector.xml 699B
values
colors.xml 689B
strings.xml 277B
attrs.xml 510B
styles.xml 1KB
dimens.xml 340B
layout
month.xml 2KB
week.xml 2KB
values-v9
strings.xml 156B
test
com
squareup
timessquare
CalendarPickerViewTest.java 23KB
src
com
squareup
timessquare
MonthDescriptor.java 859B
MonthView.java 3KB
CalendarPickerView.java 28KB
CalendarGridView.java 4KB
CalendarRowView.java 3KB
Logr.java 406B
CalendarCellView.java 3KB
MonthCellDescriptor.java 2KB
project.properties 382B
AndroidManifest.xml 292B
CONTRIBUTING.md 737B
.gitignore 142B
CHANGELOG.md 491B
README.md 2KB
timesSquareScreenshot.png 172KB
LICENSE.txt 11KB
Android应用源码之android-times-square Android日历部件
android-times-square-master
.travis.yml 388B
pom.xml 5KB
sample
pom.xml 1KB
res
drawable-hdpi
icon.png 5KB
drawable-xhdpi
icon.png 7KB
drawable-xxhdpi
icon.png 12KB
values
strings.xml 121B
drawable-mdpi
icon.png 3KB
layout
dialog.xml 439B
sample_calendar_picker.xml 2KB
src
com
squareup
timessquare
sample
SampleTimesSquareActivity.java 6KB
project.properties 400B
AndroidManifest.xml 940B
checkstyle.xml 5KB
library
pom.xml 3KB
res
drawable
calendar_bg_selector.xml 951B
color
calendar_text_selector.xml 699B
values
colors.xml 689B
strings.xml 277B
attrs.xml 510B
styles.xml 1KB
dimens.xml 340B
layout
month.xml 2KB
week.xml 2KB
values-v9
strings.xml 156B
test
com
squareup
timessquare
CalendarPickerViewTest.java 23KB
src
com
squareup
timessquare
MonthDescriptor.java 859B
MonthView.java 3KB
CalendarPickerView.java 28KB
CalendarGridView.java 4KB
CalendarRowView.java 3KB
Logr.java 406B
CalendarCellView.java 3KB
MonthCellDescriptor.java 2KB
project.properties 382B
AndroidManifest.xml 292B
CONTRIBUTING.md 737B
.gitignore 142B
CHANGELOG.md 491B
README.md 2KB
timesSquareScreenshot.png 172KB
LICENSE.txt 11KB
共 84 条
- 1
资源评论
yxkfw
- 粉丝: 82
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功