Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.firstapplication
- import androidx.appcompat.app.AppCompatActivity
- import android.os.Bundle
- import android.widget.ImageView
- import androidx.appcompat.content.res.AppCompatResources
- class MainActivity : AppCompatActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
- // this part
- val img = findViewById<ImageView>(R.id.imageView)
- img.setImageDrawable(AppCompatResources.getDrawable(this, R.drawable.images))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement