Jetzt kostenlos registrieren. Mitglieder surfen ohne Werbung auf Android-Hilfe.de!
Zurück   Android-Hilfe.de > Android Developer > Android App Entwicklung

Anordnung von Daten

Das Thema "Anordnung von Daten" befindet sich unter Android App Entwicklung auf Android-Hilfe.de.


Antwort

 

Themen-Optionen Ansicht
Alt 26.06.2011, 22:10   #1 (permalink)
Neuer Benutzer

Registriert seit: 09.02.2011
Beiträge: 18
Abgegebene Danke: 0
Erhielt 0 Danke für 0 Beiträge
Standard Anordnung von Daten

Hiho!
Ich einige Daten, die ich übersichtlich auf einer Activity an ordnern will. Aber irgendwie klappt das nicht wie ich das möchte. Bis jetzt nutze ich ein Tablelayout, vielleicht ist das aber auch einfach das falsche.
Ich habe:
1. Tabelle
1. Zeile: 2 Spalten
2. Tabelle
1. Zeile: 1 Spalte
2. Zeile: 4 Spalten
3. Zeile: 1 Spalte
4. Zeile: 4 Spalten

bei den 4 Spalten handelt es sich um eine TextView, ImageView, TextView, ImageView.
Also ich nur die TextView hatte habe ich diese per Gravity Center angeordnet und dann war auch alles immer schön mittig, aber jetzt mit der Imageview bekomme ich es nicht mehr schon zentriert hin.
Anbei mal ein Bild wie es aussehen soll. Ist das das Tabellyout das richtige für?

und hier noch mein Quellcode, ich denke mal durchschauen muss man ihn nicht unbedingt um mir zuhelfen.
Code:
    <TableLayout 
    android:stretchColumns="0,1"
    android:layout_height="wrap_content" 
    android:id="@+id/tableLayout1" 
    android:layout_width="fill_parent">
        <TableRow android:layout_gravity="center" 
        android:id="@+id/tableRow1" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content">
            <TextView android:textAppearance="?android:attr/textAppearanceLarge" android:layout_gravity="center" android:text="" android:id="@+id/heim_m" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
            <TextView android:textAppearance="?android:attr/textAppearanceLarge" android:layout_width="wrap_content" android:text="" android:layout_height="wrap_content" android:layout_gravity="center" android:id="@+id/gast_m"></TextView>
        </TableRow>
        </TableLayout>
            <ScrollView android:id="@+id/scrollView1" 
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content">
                <LinearLayout 
                android:id="@+id/linearLayout1" 
                android:layout_width="fill_parent" 
                android:layout_height="fill_parent" 
                android:orientation="vertical">
                    <TableLayout  
                    android:stretchColumns="0,2" 
                    android:layout_height="wrap_content" 
                    android:id="@+id/tableLayout2" 
                    android:layout_width="fill_parent">
                        <TableRow 
                        android:id="@+id/tableRow2" 
                        android:layout_width="fill_parent" 
                        android:layout_height="wrap_content">
                            <TextView 
                            android:layout_gravity="center" 
                            android:layout_span="4" 
                            android:layout_width="wrap_content" 
                            android:text="@string/table" 
                            android:textAppearance="?android:attr/textAppearanceLarge" 
                            android:layout_height="wrap_content" 
                            android:id="@+id/textView1"></TextView>
                          </TableRow>
                        <TableRow 
                        android:id="@+id/row_tabellenplatz" 
                        android:layout_width="wrap_content" 
                        android:layout_height="wrap_content">
                            <TextView 
                            android:layout_gravity="center" 
                            android:text="" android:id="@+id/tv_tabellenplatz_h" 
                            android:layout_width="wrap_content" 
                            android:layout_height="wrap_content"></TextView>
                            <ImageView 
                            android:layout_gravity="center" 
                            android:layout_height="wrap_content" 
                            
                            android:layout_width="wrap_content" 
                            android:id="@+id/iv_tabellenplatz_h"></ImageView>
                            <TextView android:layout_gravity="center" 
                            android:text="" 
                            android:id="@+id/tv_tabellenplatz_g" 
                            android:layout_width="wrap_content" 
                            android:layout_height="wrap_content"></TextView>
                            <ImageView 
                            android:layout_gravity="center" 
                            android:layout_height="wrap_content" 
                            
                            android:layout_width="wrap_content" 
                            android:id="@+id/iv_tabellenplatz_g"></ImageView>
                        </TableRow>
                        <TableRow 
                        android:id="@+id/tableRow2" 
                        android:layout_width="fill_parent" 
                        android:layout_height="wrap_content">
                            <TextView 
                            android:layout_gravity="center" 
                            android:layout_span="4" 
                            android:layout_width="wrap_content" 
                            android:text="@string/table_h_g" 
                            android:textAppearance="?android:attr/textAppearanceLarge" 
                            android:layout_height="wrap_content" 
                            android:id="@+id/textView1"></TextView>
                          </TableRow>
                        
                        <TableRow android:id="@+id/row_tabellenplatz_h_g" android:layout_width="wrap_content" android:layout_height="wrap_content">
                            <TextView android:layout_gravity="center" android:text="" android:id="@+id/tv_tabellenplatz_heim_h" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
                            <TextView android:layout_gravity="center" android:text="" android:id="@+id/tv_tabellenplatz_gast_g" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
                        </TableRow>
                        <TableRow android:id="@+id/row_trend" android:layout_width="wrap_content" android:layout_height="wrap_content">
                            <TextView android:layout_gravity="center" android:text="" android:id="@+id/textView5" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
                            <TextView android:layout_gravity="center" android:text="" android:id="@+id/textView6" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
                        </TableRow>
                        <TableRow android:id="@+id/tableRow6" android:layout_width="wrap_content" android:layout_height="wrap_content"></TableRow>
                    </TableLayout>
                </LinearLayout>
            </ScrollView>
Miniaturansicht angehängter Grafiken
Anordnung von Daten-tabelle.png  
baeckerman83 ist offline   Mit Zitat antworten
Antwort

Stichworte
-

Themen-Optionen
Ansicht


Ähnliche Themen

Thema Autor Forum Antworten Letzter Beitrag
Menü-Anordnung ironnie HTC Legend Forum 3 08.11.2010 12:19
Anordnung im Menü pesce Samsung Galaxy S (I9000) Forum 3 12.09.2010 10:34
X10 min pro, Fragen zur Übernahme von Daten von SIM Karte aus altem Handy rolohandy Sony Ericsson Xperia X10 Mini / Mini Pro 7 26.07.2010 14:52
T9 von Better Keyboard Anordnung verändern Laodcyber Motorola Milestone Forum 0 26.06.2010 08:42
Anordnung im Menü Joloh Sonstige Apps & Widgets 9 30.05.2010 09:25




Du liest gerade: "Anordnung von Daten" unter "Android App Entwicklung" auf Android-Hilfe.de.


Powered by vBulletin®
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
© Android-Hilfe.de 2012 - All rights reserved.