Activity / Application fundamentals

thif

Mitglied
Hallo, ich bin neu in der android Entwicklung und habe eine allgemeine Frage.

An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).

und

An activity represents a single screen with a user interface.

so heißt es auf developer.android.com

Soll das heißen für jede GUI die dem User präsentiert wird eine neue Activity starten?

Z.B. Ich programmiere ein Quiz Wer wird Millionär (nur als Beispiel): Die Seite ändert kaum das Aussehen, also eine TextView für die Fragestellung und vier Buttons mit den Antworten.
Bei Wer wird Millionär gibt es 15 Fragen also 15 Activities? Oder ist es besser wenn ich eine FragenActivity habe und dann eben die TextView und die Buttons austausche?

Mit freundlichen Grüßen
 

tvr

Mitglied
Nein das kannst du alles in einer activity machen es bedeutet nur, dass du nicht wie im normalen Java mehrere Frames aus einer Anwendung starten kannst
 

schlingel

Gesperrter Benutzer
Was tvr sagt stimmt.

Bei Wer wird Millionär gibt es 15 Fragen also 15 Activities? Oder ist es besser wenn ich eine FragenActivity habe und dann eben die TextView und die Buttons austausche?
Bitte nur den Text und nicht die ganze Grafik. :) Und aufpassen wenn du das in den Play Store gibst, auf Who wants to be a millionare gibt's sicher allmöglichen Rechte.
 

thif

Mitglied
Jo, danke. jetzt nach einmal drüber schlafen, sehe ich das auch so. Wer Wird Reich ist schon ein sehr guter Klon von dem berühmten Quiz mit Günther Jauch, mit einem weiteren ähnlichen Spiel dürfte nicht mehr viel zu holen sein. Es war aber sowieso nur ein Beispiel.
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
W JSONARRAY per Intent an andere Activity übergeben und umwandeln ggbf. Android & Cross-Platform Mobile Apps 1
M Activity einer anderen App mit result Android & Cross-Platform Mobile Apps 2
CT9288 Methode von Fragment durch Activity rufen scheitert Android & Cross-Platform Mobile Apps 7
ruutaiokwu Android Daten von "Activity A" nach "Activity B" umleiten? Android & Cross-Platform Mobile Apps 13
L Android Lockscreen-Sperrmuster activity verwenden Android & Cross-Platform Mobile Apps 1
J Android App stürzt ab wenn neue activity gestartet Android & Cross-Platform Mobile Apps 6
D Android Activity wechseln per Button Android & Cross-Platform Mobile Apps 3
P Android Android-App Crash - Unable to start activity ComponentInfo Android & Cross-Platform Mobile Apps 2
S Neue Activity lässt sich nicht starten Android & Cross-Platform Mobile Apps 28
B Android Activity nach gedrückte Returntaste weiterlaufen lassen Android & Cross-Platform Mobile Apps 2
J Probleme mit ViewPager und Activity Android & Cross-Platform Mobile Apps 1
B Android In einem View der ersten Activity zweite anzeigen Android & Cross-Platform Mobile Apps 2
G Accelerometer ohne Activity Android & Cross-Platform Mobile Apps 8
J Android BroadcastHandler extends BroadcastReceiver; auf Activity zugreifen? Android & Cross-Platform Mobile Apps 5
K Android Übergeordnete Activity herausfinden? Android & Cross-Platform Mobile Apps 7
W Android Designfrage / Layout / Activity / Fragments Android & Cross-Platform Mobile Apps 2
B Login Activity Android & Cross-Platform Mobile Apps 1
M Android Suche Activity/View Namen Android & Cross-Platform Mobile Apps 1
K Unbekannte Menge von Daten (Strings oder Ints) an Activity übergeben Android & Cross-Platform Mobile Apps 0
M Fehler ohne Sinn? java.lang.RuntimeException: Unable to start activity ComponentInfo Android & Cross-Platform Mobile Apps 11
S Android Eclipse erstellt keine main Activity Android & Cross-Platform Mobile Apps 4
B java.lang.RuntimeException: Unable to start activity ComponentInfo Android & Cross-Platform Mobile Apps 2
K Android Activity for result aus Dialog Android & Cross-Platform Mobile Apps 1
S Android "Weiches wechseln" zwischen Views in einer Activity Android & Cross-Platform Mobile Apps 3
D Android Activity mit mehreren Views "spliten" Android & Cross-Platform Mobile Apps 10
G Activity-Wechsel bitte ohne Notification Android & Cross-Platform Mobile Apps 6
G eine Methode einer anderen Activity aufrufen Android & Cross-Platform Mobile Apps 9
D Android Neue Activity im TabWidget laden Android & Cross-Platform Mobile Apps 8
S Android In Service überprüfen ob eine Activity gebunden ist? Android & Cross-Platform Mobile Apps 6
T Android Activity finished testen Android & Cross-Platform Mobile Apps 5
M Activity wechseln aus List View mit Android & Cross-Platform Mobile Apps 2
G extends Activity für Berechnungen? Android & Cross-Platform Mobile Apps 7
G Daten von einer Activity zur nächsten übergeben Android & Cross-Platform Mobile Apps 6
G selbes Menü auf jeder Activity Android & Cross-Platform Mobile Apps 4
C Activity ohne Aktion starten Android & Cross-Platform Mobile Apps 8
C Android Kommunikation zwischen Service und Activity Android & Cross-Platform Mobile Apps 8
Maxim6394 [ Android ] Activity ändern Android & Cross-Platform Mobile Apps 9
A Activity Intent 'source not found' Android & Cross-Platform Mobile Apps 4
A Android Activity Variablen-Initialisierung Android & Cross-Platform Mobile Apps 8
A Beenden einer 2ten Activity Android & Cross-Platform Mobile Apps 3
W Standard Gallery Activity? Android & Cross-Platform Mobile Apps 22
schlingel Android: Overlay in Activity Android & Cross-Platform Mobile Apps 3
G Activity beenden Android & Cross-Platform Mobile Apps 2
D c programm als java application aufs nokia 6230 Android & Cross-Platform Mobile Apps 2

Ähnliche Java Themen

Neue Themen


Oben