Commit c9cd4ed5 authored by Ricki Hirner's avatar Ricki Hirner

Take title/color from Intent when adding calendars; library updates

parent f10d338a
......@@ -19,6 +19,11 @@ import at.bitfire.icsdroid.R
class AddCalendarActivity: AppCompatActivity() {
companion object {
val EXTRA_TITLE = "title"
val EXTRA_COLOR = "color"
}
override fun onCreate(inState: Bundle?) {
super.onCreate(inState)
setContentView(R.layout.fragment_container)
......
......@@ -24,6 +24,8 @@ import at.bitfire.icsdroid.Constants
import at.bitfire.icsdroid.R
import at.bitfire.icsdroid.db.CalendarCredentials
import at.bitfire.icsdroid.db.LocalCalendar
import at.bitfire.icsdroid.ui.AddCalendarActivity.Companion.EXTRA_COLOR
import at.bitfire.icsdroid.ui.AddCalendarActivity.Companion.EXTRA_TITLE
class AddCalendarDetailsFragment: Fragment(), TitleColorFragment.OnChangeListener {
......@@ -63,8 +65,10 @@ class AddCalendarDetailsFragment: Fragment(), TitleColorFragment.OnChangeListene
if (inState != null) {
title = inState.getString(STATE_TITLE)
color = inState.getInt(STATE_COLOR)
} else
title = info.calendarName
} else {
title = activity?.intent?.getStringExtra(EXTRA_TITLE) ?: info.calendarName
color = activity?.intent?.getIntExtra(EXTRA_COLOR, LocalCalendar.DEFAULT_COLOR) ?: LocalCalendar.DEFAULT_COLOR
}
val fragTitleColor = TitleColorFragment()
val args = Bundle(3)
......
......@@ -7,7 +7,7 @@
*/
buildscript {
ext.kotlin_version = '1.1.51'
ext.kotlin_version = '1.1.61'
repositories {
jcenter()
......@@ -16,7 +16,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
......
Subproject commit bbf5d8c8ac53f0fee34cc80e66bdae172a2fa5b0
Subproject commit c2c0e7f222fa18e7246d950b5cc680c564e7a047
Subproject commit 4604c15faf2024267cbee4f911831622855c5ad6
Subproject commit bff8e5b8857605da0ac754c99eaed603a71f7bcb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment