Mercurial
view gara/android/tutorial/src/main/java/com/example/bazel/MainActivity.java @ 52:636eab07809d
Fixed dowa memory problems. Add few more utility functions.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Fri, 19 Dec 2025 13:30:30 -0800 |
| parents | b9a40c633c93 |
| children |
line wrap: on
line source
package com.example.bazel; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.Button; import android.widget.TextView; /** * Main class for the Bazel Android "Hello, World" app. */ public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.v("Bazel", "Hello, Android"); setContentView(R.layout.activity_main); Button clickMeButton = findViewById(R.id.clickMeButton); TextView helloBazelTextView = findViewById(R.id.helloBazelTextView); Greeter greeter = new Greeter(); clickMeButton.setOnClickListener(v -> helloBazelTextView.setText(greeter.sayHello())); } }