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>1.6.5</version>
<type>apklib</type>
</dependency>
```
or Gradle:
```groovy
compile 'com.squareup:android-times-square:1.6.5@aar'
```
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
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
[snap]: https://oss.sonatype.org/content/repositories/snapshots/
没有合适的资源?快使用搜索试试~ 我知道了~
android-times-square.zip
共83个文件
xml:43个
java:17个
png:5个
需积分: 5 0 下载量 95 浏览量
2023-08-18
09:41:01
上传
评论
收藏 324KB ZIP 举报
温馨提示
android-times-square
资源推荐
资源详情
资源评论
收起资源包目录
android-times-square.zip (83个子文件)
android-times-square-master
checkstyle.xml 5KB
gradle.properties 672B
gradle
wrapper
gradle-wrapper.jar 51KB
gradle-wrapper.properties 231B
.buildscript
deploy_snapshot.sh 949B
.github
workflows
android.yml 442B
LICENSE.txt 11KB
library
gradle.properties 84B
src
test
java
com
squareup
timessquare
CalendarPickerViewTest.java 27KB
main
java
com
squareup
timessquare
CalendarCellView.java 4KB
MonthCellDescriptor.java 2KB
DayViewAdapter.java 186B
CalendarGridView.java 6KB
Logr.java 406B
DefaultDayViewAdapter.java 795B
CalendarPickerView.java 42KB
MonthView.java 7KB
MonthDescriptor.java 852B
RangeState.java 185B
CalendarRowView.java 4KB
IndexedLinkedHashMap.java 1KB
CalendarCellDecorator.java 157B
res
values-ko
strings.xml 156B
values-nl
strings.xml 143B
values-fr
strings.xml 189B
values-uk
strings.xml 195B
values-pl
strings.xml 186B
values-pt
strings.xml 174B
values-de
strings.xml 146B
values-es
strings.xml 181B
values-ja
strings.xml 198B
values-tr
strings.xml 182B
color
calendar_text_selector.xml 820B
values-sr
strings.xml 182B
values-eo
strings.xml 178B
values-ru
strings.xml 197B
values
dimens.xml 340B
colors.xml 749B
ids.xml 115B
strings.xml 474B
attrs.xml 1KB
styles.xml 1KB
layout
week.xml 1KB
month.xml 2KB
drawable
calendar_bg_selector.xml 983B
values-in
strings.xml 226B
AndroidManifest.xml 220B
build.gradle 1KB
sample
src
main
java
com
squareup
timessquare
sample
SampleDayViewAdapter.java 625B
SampleTimesSquareActivity.java 11KB
SampleDecorator.java 726B
res
drawable-mdpi
icon.png 3KB
drawable-xhdpi
icon.png 7KB
drawable-xxhdpi
icon.png 12KB
values-night
themes.xml 361B
color
custom_calendar_text_selector.xml 640B
values
dimens.xml 173B
colors.xml 499B
strings.xml 716B
attrs.xml 207B
styles.xml 514B
themes.xml 361B
layout
dialog_customized.xml 896B
dialog.xml 439B
sample_calendar_picker.xml 4KB
day_view_custom.xml 620B
dialog_digits.xml 544B
drawable
bg_circle_today.xml 528B
bg_circle_selected.xml 520B
custom_calendar_bg_selector.xml 788B
drawable-hdpi
icon.png 5KB
AndroidManifest.xml 875B
build.gradle 593B
gradlew.bat 2KB
CONTRIBUTING.md 737B
CHANGELOG.md 5KB
build.gradle 1006B
settings.gradle 37B
gradlew 5KB
timesSquareScreenshot.png 172KB
.gitignore 151B
RELEASING.md 567B
README.md 3KB
共 83 条
- 1
资源评论
hello_中年人
- 粉丝: 7
- 资源: 324
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- YOLOV4-TINY权重文件
- 以下是一个使用贪心算法解决多机调度问题的基本步骤0.txt
- 基于大数据的房产估价是近年来随着技术的发展而兴起的一种新型估价方法.txt
- 企业供应链管理系统v3.rar
- 富芮坤FR8016HA蓝牙开发板使用手册+硬件PCB图+封装库+DEMO演示软件源代码.zip
- 基于YOLOv7的芯片表面缺陷检测系统
- 京东物流 数字化供应链综合研究报告2018.rar
- 基于YOLOv7的植物虫害识别&防治系统
- 2000.1-2023.8中国经济政策不确定性指数月度数据.xlsx
- Screenshot_2024-04-21-20-42-15-443_com.tencent.mm.jpg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功