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-times-square Android日历部件(程序源码).zip
共42个文件
xml:19个
java:10个
png:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 177 浏览量
2023-03-17
08:49:00
上传
评论
收藏 246KB ZIP 举报
温馨提示
免责声明:资料部分来源于合法的互联网渠道收集和整理,部分自己学习积累成果,供大家学习参考与交流。收取的费用仅用于收集和整理资料耗费时间的酬劳。 本人尊重原创作者或出版方,资料版权归原作者或出版方所有,本人不对所涉及的版权问题或内容负法律责任。如有侵权,请举报或通知本人删除。
资源推荐
资源详情
资源评论
收起资源包目录
天气日历&时间选择 android-times-square Android日历部件(程序源码).zip (42个子文件)
android-times-square-master
checkstyle.xml 5KB
.travis.yml 388B
pom.xml 5KB
LICENSE.txt 11KB
library
project.properties 382B
pom.xml 3KB
src
com
squareup
timessquare
CalendarCellView.java 3KB
MonthCellDescriptor.java 2KB
CalendarGridView.java 4KB
Logr.java 406B
CalendarPickerView.java 28KB
MonthView.java 3KB
MonthDescriptor.java 859B
CalendarRowView.java 3KB
res
values-v9
strings.xml 156B
color
calendar_text_selector.xml 699B
values
dimens.xml 340B
colors.xml 689B
strings.xml 277B
attrs.xml 510B
styles.xml 1KB
layout
week.xml 2KB
month.xml 2KB
drawable
calendar_bg_selector.xml 951B
test
com
squareup
timessquare
CalendarPickerViewTest.java 23KB
AndroidManifest.xml 292B
sample
project.properties 400B
pom.xml 1KB
src
com
squareup
timessquare
sample
SampleTimesSquareActivity.java 6KB
res
drawable-mdpi
icon.png 3KB
drawable-xhdpi
icon.png 7KB
drawable-xxhdpi
icon.png 12KB
values
strings.xml 121B
layout
dialog.xml 439B
sample_calendar_picker.xml 2KB
drawable-hdpi
icon.png 5KB
AndroidManifest.xml 940B
CONTRIBUTING.md 737B
CHANGELOG.md 491B
timesSquareScreenshot.png 172KB
.gitignore 142B
README.md 2KB
共 42 条
- 1
资源评论
金枝玉叶9
- 粉丝: 124
- 资源: 7640
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功