skedgo / DateTimeRangePicker

A date time range picker for android written in Kotlin
MIT License
504 stars 75 forks source link

Activity not found exception #19

Open rsd96 opened 6 years ago

rsd96 commented 6 years ago

val intent = newIntent( this, TimeZone.getDefault(), DateTime.now().millis, DateTime.now().plusDays(2).millis ) this.startActivityForResult(intent, RQC_PICK_DATE_TIME_RANGE)

above code gave me actvity not found error :

android.content.ActivityNotFoundException: Unable to find explicit activity class {/skedgo.datetimerangepicker.DateTimeRangePickerActivity}; have you declared this activity in your AndroidManifest.xml?

kyaw-san-oo commented 6 years ago

Use companion intent in your call to day picker and not forget to add DayRangePickerActivity.kt within in the mainifest of the DayRangePicker library. In the calling Activity, intent = TestDayRangePickerActivity.Companion.newIntent(YourCallActivity.this, TimeZone.getDefault(), DateTime.now().millis, DateTime.now().plusDays(2).millis); startActivityForResult(intent, RQC_PICK_DATE_TIME_RANGE); In the Mainifest.xml in DayPicker Module, add the code. android:name=".DayRangePickerActivity" with activity tag within the application tag.

rsd96 commented 6 years ago

thanks for the reply. I am not able to add DayRangePickerActivity as an activity in the manifest... i did try calling the intent with Companion but that didn't help