Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

lib version refresh + button text size #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:0.1-SNAPSHOT'
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
apply plugin: 'com.android.application'
Expand All @@ -22,12 +22,12 @@ repositories {

dependencies {
compile files('libs/android-support-v4.jar')
compile 'org.jetbrains.kotlin:kotlin-stdlib:0.1-SNAPSHOT'
compile 'org.jetbrains.kotlin:kotlin-stdlib:0.12.1230'
}

android {
compileSdkVersion 19
buildToolsVersion "19.1"
compileSdkVersion 23
buildToolsVersion "23.0.0"

defaultConfig {
minSdkVersion 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@ open class MainActivity2 : Activity() {
setContentView(R.layout.activity_main2)

var next: Button = findViewById(R.id.Button02) as Button
next.setOnClickListener(object : View.OnClickListener {
public override fun onClick(view: View) {
val intent: Intent = Intent()
setResult(Activity.RESULT_OK, intent)
finish()
}
})

// next.setOnClickListener(object : View.OnClickListener {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just delete it if it is not needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. It works perfectly without the commented code. I'd already removed this fragment, changed the app name (it wasn't displayed correctly in the app launcher - Activity name was taken instead). I've also added kotlin icon instead of the default Android one.

// public override fun onClick(view: View) {
// val intent: Intent = Intent()
// setResult(Activity.RESULT_OK, intent)
// finish()
// }
// })

next.setOnClickListener { finish() }

}

public override fun onCreateOptionsMenu(menu: Menu?): Boolean {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main_activity2, menu)
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
android:text="Activity 1" />

<Button android:text="Next"
android:id="@+id/Button01"
android:layout_width="250px"
android:textSize="18px"
android:layout_height="55px">
android:id="@+id/Button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp">
</Button>

</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
android:layout_height="wrap_content"
android:text="Activity 2" />

<Button android:text="Next"
<Button android:text="Close"
android:id="@+id/Button02"
android:layout_width="250px"
android:textSize="18px"
android:layout_height="55px">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp">
</Button>

</LinearLayout>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue May 05 20:30:27 MSK 2015
#Mon Sep 14 15:13:35 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip