Skip to content

Commit

Permalink
0.9 - fixes issue #2
Browse files Browse the repository at this point in the history
  • Loading branch information
hanggrian committed Oct 22, 2017
1 parent ae43555 commit 5d13d8a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-rc1'
classpath 'com.android.tools.build:gradle:3.0.0-rc2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath 'com.novoda:bintray-release:0.5.0'
}
Expand Down
3 changes: 2 additions & 1 deletion example/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".NextActivity" />
<activity
android:name=".NextActivity" />
</application>
</manifest>
3 changes: 1 addition & 2 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

ext.rxkotlin = '2.1.0'
ext.kota = '0.15'
ext.kota = '0.16'

android {
compileSdkVersion versions.sdk.target
Expand Down Expand Up @@ -44,6 +44,5 @@ dependencies {
implementation "com.android.support:design:$versions.support"

implementation "com.hendraanggrian:kota-appcompat-v7:$kota"
implementation "com.hendraanggrian:kota-design:$kota"
implementation "com.hendraanggrian:kota-preference-v7:$kota"
}
9 changes: 8 additions & 1 deletion example/src/com/example/rxactivity/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.example.rxactivity

import android.content.Intent
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v7.app.AppCompatActivity
import android.support.v7.preference.ListPreference
import android.support.v7.preference.Preference
Expand All @@ -19,11 +20,17 @@ import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity(), View.OnClickListener {

companion object {
const val TAG_RETAINED_FRAGMENT = "RetainedFragment"
}

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
setSupportActionBar(toolbar)
supportFragmentManager.replaceNow(R.id.container, Content())
if (supportFragmentManager.findNullable<Fragment>(TAG_RETAINED_FRAGMENT) == null) {
supportFragmentManager.addNow(R.id.container, Content(), TAG_RETAINED_FRAGMENT)
}
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ open class ActivityResultException : Exception {

constructor(message: String, cause: Throwable) : super(message, cause)

internal constructor(requestCode: Int, resultCode: Int, data: Intent?) : this("Activity with request code $requestCode fails expected result code check.") {
internal constructor(requestCode: Int, resultCode: Int, data: Intent?) : this("Returned Activity fails expected result code check, cast this Throwable to ActivityResultException for more information.") {
mRequestCode = requestCode
mResultCode = resultCode
mData = data
Expand Down

0 comments on commit 5d13d8a

Please sign in to comment.