| |||||||
Das Thema "ScrollView - Layoutproblem -> dringend!" befindet sich unter Android App Entwicklung auf Android-Hilfe.de.
![]() |
| | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Android-Hilfe.de Mitglied | ich muss "schnell" ne neue version fertig stellen und hab folgendes problem: In meinem (root -linear) layout habe ich eine ScrollView und kurz darauf noch eine TextView. Beide haben das Attribut wrap_content, das LinearLayout hat fill_parent. Das Problem: da ich innerhalb der ScrollView über den javaCode neue Komponenten anhänge, geht die ScrollView bis zum unteren Ende des displays und die TextView ist nicht mehr sichtbar. =( kurzfassung der xml (abstrakt): <linear fill_parent> <ScrollView> <Table>//im javacode werden neue rows geaddet </Table> </ScrollView> <TextView /> //nicht sichtbar! </linear> code: Code: <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearRoot"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView android:id="@+id/ScrollView"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableLayout android:id="@+id/TableLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:stretchColumns="1">
</TableLayout>
</ScrollView>
<TextView android:text="Footer" android:id="@+id/Footer"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:padding="8dip">
</TextView>
</LinearLayout> Code: TableLayout oTable = null; oTable = (TableLayout) findViewById(R.id.TableLayout); oTable.addView(myRow);
__________________ Geändert von Chaoz (09.04.2010 um 14:37 Uhr) |
| | |
| | #2 (permalink) |
| Neuer Benutzer Registriert seit: 12.03.2010
Beiträge: 18
Abgegebene Danke: 1
Erhielt 2 Danke für 2 Beiträge
|
schau mal hier, der macht da glaube ich sowas ähnliches
|
| | |
| Folgender Benutzer bedankt sich bei fugu2.0 für diesen Beitrag: | Chaoz (09.04.2010) |
| | #3 (permalink) |
| Android-Hilfe.de Mitglied Modell: Immer noch das gute Magic. Ungerootet und trotzdem zufrieden :). Registriert seit: 29.09.2009
Beiträge: 54
Abgegebene Danke: 4
Erhielt 2 Danke für 2 Beiträge
| |
| | |
| Folgender Benutzer bedankt sich bei TheFlatz|Veit für diesen Beitrag: | Chaoz (09.04.2010) |
| | #4 (permalink) |
| Android Guru Modell: Samsung Galaxy S (I9000) Registriert seit: 21.12.2009
Beiträge: 2.523
Abgegebene Danke: 73
Erhielt 495 Danke für 286 Beiträge
|
hm, aber welchen Sinn hat denn ein Element unter einer ScrollView? Irgendwie kommt mir das extrem sinnlos vor... Klär mich bitte auf! jup, hab mir mal den ersten link angeschaut, macht wohl doch Sinn.
__________________ Meine Apps: GTalk Widget free Filehosting mit direkt download links & ohne werbung Geändert von Fr4gg0r (09.04.2010 um 16:08 Uhr) |
| | |
| | #6 (permalink) | |
| Android-Hilfe.de Mitglied | Zitat:
Ist bei mir designVorgabe vom chef, kann ich nix für. ^^
__________________ | |
| | |
| | #8 (permalink) |
| Android-Hilfe.de Mitglied |
Hrhr... das erinnert mich unfreiwillig an viele kiddy-foren, wo erstmal totgefragt wird warum man es denn "so" machen wolle und wie doof das eigtl sei. xD Die wenigstens haben wirklich ahnung von halbwes professioneller softwareentwicklung und versuchen sich nur zu profilieren oder andere schlecht dastehen zu lassen, ohne (wichtig!) dabei das problem zu lösen. ...zum glück ist das hier nicht so. :-)
__________________ |
| | |
| | #9 (permalink) |
| Neuer Benutzer Registriert seit: 11.06.2009
Beiträge: 12
Abgegebene Danke: 0
Erhielt 1 Danke für 1 Beitrag
|
Hmm not really a elegant solution for the button at the bottom. A nice solution would be the following: Code: <ScrollView
android:id="@+id/ScrollView01"
android:layout_height="1dip"
android:layout_width="fill_parent"
android:layout_weight="1">
<RadioGroup android:id="@+id/RadioGroup01" android:layout_width="wrap_content" android:layout_height="wrap_content">
<RadioButton android:id="@+id/RadioButton01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
<RadioButton android:id="@+id/RadioButton11" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button....." />
</RadioGroup>
</ScrollView>
<Button
android:id="@+id/Button01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="A button that should always be at the bottom"/> This is easy and good :-) Greets VIDEN
__________________ HTC G1 ADP1 / Archos 5 IT HTC Tattoo / Motorola Milestone Google Nexus One |
| | |
![]() |
|
| Themen-Optionen | |
| Ansicht | |
| |
| ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Dringend - Kaufentscheidung VF - Unbranden | Trinity9999 | Root / Hacking / Modding für Motorola Milestone | 13 | 18.02.2010 20:28 |
| suche dringend hilfe! | Hectic | T-Mobile Pulse Forum | 6 | 12.12.2009 00:35 |
| Dringend: Telefon stumm! | rootbox | Samsung Galaxy (I7500) Forum | 1 | 18.11.2009 16:25 |
| G1 brauch dringend Hlfe | Sonic_-Lov3 | T-Mobile G1 Forum | 4 | 10.08.2009 00:22 |