Mercurial
annotate gara/android/tutorial/src/main/java/com/example/bazel/MainActivity.java @ 106:daf2d393741a
Debugging in server.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Sat, 03 Jan 2026 10:46:58 -0800 |
| parents | b9a40c633c93 |
| children |
| rev | line source |
|---|---|
|
46
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
1 package com.example.bazel; |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
2 |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
3 import android.app.Activity; |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
4 import android.os.Bundle; |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
5 import android.util.Log; |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
6 import android.widget.Button; |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
7 import android.widget.TextView; |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
8 |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
9 /** |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
10 * Main class for the Bazel Android "Hello, World" app. |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
11 */ |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
12 public class MainActivity extends Activity { |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
13 @Override |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
14 public void onCreate(Bundle savedInstanceState) { |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
15 super.onCreate(savedInstanceState); |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
16 Log.v("Bazel", "Hello, Android"); |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
17 |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
18 setContentView(R.layout.activity_main); |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
19 |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
20 Button clickMeButton = findViewById(R.id.clickMeButton); |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
21 TextView helloBazelTextView = findViewById(R.id.helloBazelTextView); |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
22 |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
23 Greeter greeter = new Greeter(); |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
24 |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
25 clickMeButton.setOnClickListener(v -> helloBazelTextView.setText(greeter.sayHello())); |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
26 } |
|
b9a40c633c93
[Gara] Adding sample android app which will be use C logic for peer to peer connection.
MrJuneJune <me@mrjunejune.com>
parents:
diff
changeset
|
27 } |