Button geht net...

tomovic

Bekanntes Mitglied
hallo,
möchte gerne eine Button erstellen:
Dazu ziehe ich den Button in mein Display:
Java:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/game"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <Button  
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_marginBottom="26dp"
        android:layout_marginRight="40dp"
        android:text="Button" />    <---------------Hardcoded sting "Button",shold use @string resource

</RelativeLayout>

In dem Tut kommt kein Ausrufezeichen.Ich mache irgend wo ein Denkfehler.
 

anti-held

Bekanntes Mitglied
Das ist kein Fehler, sondern nur eine Warnung!
Du gibst an, dass dein Button den Text "Button" enthalten soll. (und das immer)
Das ist unschön, denn so lässt du keine automatische Übersetzung zu.
Sieh dir hierzu doch folgende links an:
String Resource
Localization
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
T Android Studio: Einen Button in einer For Schleife verwenden Android & Cross-Platform Mobile Apps 2
W App deinstallieren per Button & Andere App Öffnen per Button Android & Cross-Platform Mobile Apps 24
W Apk automatisch installieren per Button Android & Cross-Platform Mobile Apps 55
W aus Fragmente in andere Klasse wechseln mit Button Android & Cross-Platform Mobile Apps 3
T App updaten via Button Android & Cross-Platform Mobile Apps 10
AGW Android Teilen Button ändern Android & Cross-Platform Mobile Apps 14
A Button in SurfaceView integrieren Android & Cross-Platform Mobile Apps 10
J Android App - Browser öffnen und Text eingeben/Button click auslösen Android & Cross-Platform Mobile Apps 10
L Button zum Quadrad zwingen Android & Cross-Platform Mobile Apps 2
S Android Absoluter Neuling: EditText zur Laufzeit verändern bzw. über Button Android & Cross-Platform Mobile Apps 2
L Dialog anzeigen wenn auf Button gedrückt wird. Android & Cross-Platform Mobile Apps 4
S Android ListFragment & ArrayAdapter - Button-Werte werden vergessen Android & Cross-Platform Mobile Apps 0
B Android Abfragen wie lang ein Button gedrückt wurde Android & Cross-Platform Mobile Apps 2
J Android button mithilfe einer Methode automatisch erstellen Android & Cross-Platform Mobile Apps 6
A AlertDialog Enable Button Android & Cross-Platform Mobile Apps 1
J Button array ID Problem Android & Cross-Platform Mobile Apps 2
D Android Activity wechseln per Button Android & Cross-Platform Mobile Apps 3
B Android ringProgressDialog nach Erfolg Button einfärben Android & Cross-Platform Mobile Apps 2
A Android Menü Button oben links Android & Cross-Platform Mobile Apps 1
B Mit Button GeräteEinstellung des Handys öffnen Android & Cross-Platform Mobile Apps 3
M Android Android "Up-Button" extra definieren? Android & Cross-Platform Mobile Apps 1
K Problem mit arraylist und button Android & Cross-Platform Mobile Apps 16
T Button aktivieren per Qullcode... Android & Cross-Platform Mobile Apps 3
D Man sieht nicht ob Button gedrückt wurde! Android & Cross-Platform Mobile Apps 10
K Grafik Tablerow, Button erstreckt sich in der gesamten Breite trotz Beschrenkung durch (max)width Android & Cross-Platform Mobile Apps 2
G Button ein Wert zuweisen Android & Cross-Platform Mobile Apps 5
M 20 Image Button für jede Auflösung positionieren Android & Cross-Platform Mobile Apps 3
B Android Button erstellen nach Vorlage Android & Cross-Platform Mobile Apps 4
L Android Button mit Pfeil nach rechts Android & Cross-Platform Mobile Apps 1
M Einzel Verarbeitung welcher Button angeklickt wurde? Android & Cross-Platform Mobile Apps 6
G Back-Button Methode überschreiben Android & Cross-Platform Mobile Apps 2
P Android Option Button Android & Cross-Platform Mobile Apps 4
G Check Button ist unchecked trotz setChecked(true) Android & Cross-Platform Mobile Apps 6
G Android Button mit Bild Android & Cross-Platform Mobile Apps 4
W Android App Programmierung - Button ganz transparent machen Android & Cross-Platform Mobile Apps 3
L Custom Dialog Button event Android & Cross-Platform Mobile Apps 2
J Button rechtsbündig Android & Cross-Platform Mobile Apps 5
A Android Button Array? Android & Cross-Platform Mobile Apps 6
P Android Button mit bild versehen Android & Cross-Platform Mobile Apps 4
J "Button" auf List erstellen Android & Cross-Platform Mobile Apps 4
U Fire button und Command.BACK, 1 kommen sich in die quere Android & Cross-Platform Mobile Apps 2
W Android Wieso geht getApplicationContext() bei Toast, aber nicht bei AlertDialog.Builder? Android & Cross-Platform Mobile Apps 36
K Log.v geht nicht Android & Cross-Platform Mobile Apps 4
J R.string.(variable) geht das Android & Cross-Platform Mobile Apps 3
B Timer geht nicht Android & Cross-Platform Mobile Apps 2
L Android Apache POI: Datei speichern geht nicht Android & Cross-Platform Mobile Apps 1
D Hilfe! es geht um Buttons und Sounds Android & Cross-Platform Mobile Apps 14
S Android LogCat Ausgaben in Schleife geht nicht? Android & Cross-Platform Mobile Apps 2
K Android Alarm Manager (Wakelock? ) geht nicht Android & Cross-Platform Mobile Apps 4
N Android Hilfe string to float geht nicht... Android & Cross-Platform Mobile Apps 4
P Android Programm stürzt ab - Es geht um Netzwerk Android & Cross-Platform Mobile Apps 5
D wie geht Klassenvererbung von Canvas Klassen Android & Cross-Platform Mobile Apps 2
R Meine arctan-Methode geht nicht Android & Cross-Platform Mobile Apps 6
X Anfängerfrage : Form und CommandListener - Warum geht das nicht? Android & Cross-Platform Mobile Apps 5

Ähnliche Java Themen

Neue Themen


Oben