This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using R.layout.activity_main from the main source set | |
import kotlinx.android.synthetic.main.activity_main.* | |
public class MyActivity : Activity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
textView.setText("Hello, world!") // Instead of findView(R.id.textView) as TextView | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SplashView extends View { | |
private Bitmap bitmap; | |
public SplashView(Context context) { | |
super(context); | |
init(); | |
} | |
private void init() { | |
bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.logo); |
NewerOlder