Skip to content

Commit

Permalink
Merge branch 'develop' issue #16 #17
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Jamet committed Mar 27, 2017
2 parents 943ac05 + e68ed98 commit 0c60301
Show file tree
Hide file tree
Showing 24 changed files with 527 additions and 131 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Mon Mar 27 15:43:23 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
compile project(path: ':switchdatetime')
}
2 changes: 1 addition & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:label="@string/switch_datetime_picker_name"
android:theme="@style/AppTheme.NoActionbar"
android:supportsRtl="true">
<activity
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<string name="app_name">Switch DateTime Picker</string>
<string name="switch_datetime_picker_name">Switch DateTime Picker</string>
<string name="open_datetime_dialog">Open DateTime Dialog</string>
</resources>
6 changes: 3 additions & 3 deletions switchdatetime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.prolificinteractive:material-calendarview:1.4.2'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.prolificinteractive:material-calendarview:1.4.3'
testCompile 'junit:junit:4.12'
}
1 change: 0 additions & 1 deletion switchdatetime/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

<application
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true">
</application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,19 @@
</RelativeLayout>
</RelativeLayout>

<com.prolificinteractive.materialcalendarview.MaterialCalendarView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/datePicker"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/calendar_margin_top_land"
android:layout_marginLeft="@dimen/calendar_margin_start_land"
android:layout_marginStart="@dimen/calendar_margin_start_land"
android:layout_marginRight="@dimen/calendar_margin_end_land"
android:layout_marginEnd="@dimen/calendar_margin_end_land"
android:layout_marginBottom="@dimen/calendar_margin_bottom_land"
app:mcv_showOtherDates="all"
style="@style/Theme.SwitchDateTime.Date"
/>
<FrameLayout
android:layout_width="@dimen/calendar_width_land"
android:layout_height="@dimen/calendar_height_land"
android:layout_gravity="center">
<com.prolificinteractive.materialcalendarview.MaterialCalendarView
xmlns:calendar="http://schemas.android.com/apk/res-auto"
android:id="@+id/datePicker"
android:layout_width="match_parent"
android:layout_height="match_parent"
calendar:mcv_showOtherDates="all"
style="@style/Theme.SwitchDateTime.Date"
/>
</FrameLayout>

<com.kunzisoft.switchdatetime.date.widget.ListPickerYearView
xmlns:year="http://schemas.android.com/apk/res-auto"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/datetime_picker"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/Theme.SwitchDateTime" >

<LinearLayout
android:id="@+id/section_add"
style="@style/Theme.SwitchDateTime.HeaderBackground"
android:layout_width="@dimen/header_width"
android:layout_height="match_parent"
android:orientation="vertical">

<RelativeLayout
android:id="@+id/label_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingStart="10dp"
android:paddingRight="10dp"
android:paddingEnd="10dp">

<android.support.v7.widget.AppCompatImageButton
android:id="@+id/button_switch"
style="@style/Theme.SwitchDateTime.IconDateTimeSwitch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/img_datetime"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_datetime_dialog"
style="@style/Theme.SwitchDateTime.TitleDateTimeLabelText"
android:padding="5dp"
android:gravity="end"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/button_switch" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/value_dateTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp"
android:layout_marginBottom="16dp" >

<include
android:id="@+id/time_header_values"
layout="@layout/time_header_label"
android:layout_marginBottom="22dp"
android:layout_width="@dimen/time_label_width"
android:layout_height="@dimen/time_label_height"
android:layout_gravity="center_vertical"
android:layout_alignParentEnd="true" />

<TextView
android:id="@+id/date_picker_year"
style="@style/Theme.SwitchDateTime.DateLabelYear"
android:gravity="top|start"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:includeFontPadding="false"
android:layout_below="@id/time_header_values" />

<TextView
android:id="@+id/date_picker_month_and_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
style="@style/Theme.SwitchDateTime.DateLabelMonthAndDay"
android:layout_below="@id/date_picker_year"
android:layout_alignParentStart="true"
android:layout_marginStart="6dp"
android:clickable="true" />
</RelativeLayout>
</LinearLayout>

<ViewFlipper
android:id="@+id/dateSwitcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/Theme.SwitchDateTime.ContentBackground"
android:inAnimation="@anim/dialog_enter_from_top"
android:outAnimation="@anim/dialog_leave_to_bottom"
android:layout_alignParentEnd="true"
android:layout_toEndOf="@+id/section_add"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true">
<RelativeLayout
android:id="@+id/timePicker"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_gravity="top"
android:focusable="true" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<com.kunzisoft.switchdatetime.time.RadialPickerLayout
android:id="@+id/time_picker"
style="@style/Theme.SwitchDateTime.Time"
android:layout_width="@dimen/time_circle_width"
android:layout_height="@dimen/time_circle_width"
android:layout_gravity="center"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_alignParentEnd="true"/>
</RelativeLayout>
</RelativeLayout>

<FrameLayout
android:layout_width="@dimen/calendar_width_land"
android:layout_height="@dimen/calendar_height_land"
android:layout_gravity="center">
<com.prolificinteractive.materialcalendarview.MaterialCalendarView
xmlns:calendar="http://schemas.android.com/apk/res-auto"
android:id="@+id/datePicker"
android:layout_width="match_parent"
android:layout_height="match_parent"
calendar:mcv_showOtherDates="all"
style="@style/Theme.SwitchDateTime.Date"
/>
</FrameLayout>

<com.kunzisoft.switchdatetime.date.widget.ListPickerYearView
xmlns:year="http://schemas.android.com/apk/res-auto"
android:id="@+id/yearPicker"
android:layout_width="match_parent"
android:layout_height="match_parent"
year:minYear="1970"
year:maxYear="2200"
year:defaultYear="2016"
/>
</ViewFlipper>

</RelativeLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/datetime_picker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Theme.SwitchDateTime"
android:orientation="vertical"
android:baselineAligned="false">
<LinearLayout
android:id="@+id/section_add"
style="@style/Theme.SwitchDateTime.HeaderBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<RelativeLayout
android:id="@+id/label_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingStart="10dp">

<android.support.v7.widget.AppCompatImageButton
android:id="@+id/button_switch"
style="@style/Theme.SwitchDateTime.IconDateTimeSwitch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/img_datetime"
android:src="@drawable/ic_view_carousel_black_32dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true" />

<android.support.v7.widget.AppCompatTextView
android:id="@+id/label"
style="@style/Theme.SwitchDateTime.TitleDateTimeLabelText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="end"
android:padding="5dp"
android:text="@string/label_datetime_dialog"
android:layout_toEndOf="@+id/button_switch"
android:layout_alignParentStart="true" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/value_dateTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp" >

<include
android:id="@+id/time_header_values"
layout="@layout/time_header_label"
android:layout_width="@dimen/time_label_width"
android:layout_height="@dimen/time_label_height"
android:layout_gravity="center_vertical"
android:layout_alignParentStart="true" />

<TextView
android:id="@+id/date_picker_year"
style="@style/Theme.SwitchDateTime.DateLabelYear"
android:gravity="top|end"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:includeFontPadding="false"
android:layout_above="@+id/date_picker_month_and_day" />

<TextView
android:id="@+id/date_picker_month_and_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
style="@style/Theme.SwitchDateTime.DateLabelMonthAndDay"
android:layout_below="@id/time_header_values"
android:layout_alignParentEnd="true"
android:layout_marginEnd="6dp"
android:clickable="true" />

</RelativeLayout>

</LinearLayout>
<ViewFlipper
android:id="@+id/dateSwitcher"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Theme.SwitchDateTime.ContentBackground"
android:inAnimation="@anim/dialog_enter_from_right"
android:outAnimation="@anim/dialog_leave_to_left"
android:layout_gravity="center">
<LinearLayout
android:id="@+id/timePicker"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:focusable="true" >
<com.kunzisoft.switchdatetime.time.RadialPickerLayout
android:id="@+id/time_picker"
android:layout_height="@dimen/time_circle_width"
android:layout_width="@dimen/time_circle_width"
android:layout_gravity="center"
android:focusable="true"
android:focusableInTouchMode="true"
style="@style/Theme.SwitchDateTime.Time" />
</LinearLayout>

<FrameLayout
android:layout_width="@dimen/calendar_width_portrait"
android:layout_height="@dimen/calendar_height_portrait"
android:layout_gravity="center">
<com.prolificinteractive.materialcalendarview.MaterialCalendarView
xmlns:calendar="http://schemas.android.com/apk/res-auto"
android:id="@+id/datePicker"
android:layout_width="match_parent"
android:layout_height="match_parent"
calendar:mcv_showOtherDates="all"
style="@style/Theme.SwitchDateTime.Date"
/>
</FrameLayout>


<com.kunzisoft.switchdatetime.date.widget.ListPickerYearView
xmlns:year="http://schemas.android.com/apk/res-auto"
android:id="@+id/yearPicker"
android:layout_width="match_parent"
android:layout_height="match_parent"
year:minYear="1970"
year:maxYear="2200"
year:defaultYear="2016"
/>
</ViewFlipper>
</LinearLayout>
Loading

0 comments on commit 0c60301

Please sign in to comment.