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

Commit e793ce7

Browse files
committed
Rename (for tutorial)
1 parent 61fabbe commit e793ce7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

gradle/android-databinding/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<category android:name="android.intent.category.LAUNCHER" />
1919
</intent-filter>
2020
</activity>
21-
<activity android:name="org.example.kotlin.databinding.SecondActivity" />
21+
<activity android:name="org.example.kotlin.databinding.OtherActivity" />
2222
</application>
2323

2424
</manifest>

gradle/android-databinding/app/src/main/java/org/example/kotlin/databinding/MainActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ class MainActivity : AppCompatActivity() {
2626
binding.data = weather
2727
}
2828

29-
fun change(view: View) {
29+
fun changeTemperatureAndImage(view: View) {
3030
++counter
3131
weather.temperature = "$counter °C"
3232
weather.imageUrl = "http://loremflickr.com/800/600/city?random=$counter"
3333
weather.notifyChange()
3434
}
3535

3636
fun startActivity(view: View) {
37-
startActivity(Intent(this, SecondActivity::class.java))
37+
startActivity(Intent(this, OtherActivity::class.java))
3838
}
39-
}
39+
}

gradle/android-databinding/app/src/main/java/org/example/kotlin/databinding/SecondActivity.kt renamed to gradle/android-databinding/app/src/main/java/org/example/kotlin/databinding/OtherActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import android.view.LayoutInflater
1010
import android.databinding.DataBindingUtil
1111

1212

13-
class SecondActivity : AppCompatActivity() {
13+
class OtherActivity : AppCompatActivity() {
1414

1515
override fun onCreate(savedInstanceState: Bundle?) {
1616
super.onCreate(savedInstanceState)

gradle/android-databinding/app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
android:text="@string/change"
2727
android:layout_width="match_parent"
2828
android:layout_height="wrap_content"
29-
android:onClick="change" />
29+
android:onClick="changeTemperatureAndImage" />
3030

3131
<Button
3232
android:text="@string/next"
3333
android:layout_width="match_parent"
3434
android:layout_height="wrap_content"
35-
android:onClick="startActivity" />
35+
android:onClick="startOtherActivity" />
3636

3737
</LinearLayout>
3838
</layout>

0 commit comments

Comments
 (0)