This repository was archived by the owner on Jan 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
gradle/android-databinding/app/src/main
java/org/example/kotlin/databinding Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import android.view.LayoutInflater
1010import android.databinding.DataBindingUtil
1111
1212
13- class SecondActivity : AppCompatActivity () {
13+ class OtherActivity : AppCompatActivity () {
1414
1515 override fun onCreate (savedInstanceState : Bundle ? ) {
1616 super .onCreate(savedInstanceState)
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments