2
289133
Gast
Hey Community,
ich bin gerade dabei, eine Art Quiz zu programmieren.
Zunächst wollte ich die Antwortauswahl per Buttons lösen. Da ich aber zum Teil recht langen Text habe, haute das nicht hin.
Also habe ich mich für RadioButtons entschieden. Da ich deren Text ebenso wie die Buttons nicht scrollen konnte, dachte ich, ich setze einfach rechts daneben jeweils eine TextView mit "android:scrollHorizontally="true" " und fertig. Satz mit X ...
Momentan sieht es in der XML so aus:
Die TextView wird mir jedoch zum Einen nur so breit dargestellt (trotz fester breite / match_parent bring auch nichts), wie auch der Text ist, zum Anderen wird es mit dem scrollen nichts.
Ich habe jetzt schon in einigen Foren nachgeschaut und verschiedene Möglichkeiten probiert, aber alle ohne Erfolg.
Gibt es einen Trick vlt. den Text der RadioButtons zu scrollen oder ist das mit TextViews besser und wie bringe ich das dann zum Laufen ?
Schonmal Vielen Dank für alle Antworten
Gruß Mr.DH
ich bin gerade dabei, eine Art Quiz zu programmieren.
Zunächst wollte ich die Antwortauswahl per Buttons lösen. Da ich aber zum Teil recht langen Text habe, haute das nicht hin.
Also habe ich mich für RadioButtons entschieden. Da ich deren Text ebenso wie die Buttons nicht scrollen konnte, dachte ich, ich setze einfach rechts daneben jeweils eine TextView mit "android:scrollHorizontally="true" " und fertig. Satz mit X ...
Momentan sieht es in der XML so aus:
Code:
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080] [LEFT]<[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]HorizontalScrollView[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:id[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@+id/scrollView2"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"match_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"wrap_content"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]
<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]TextView[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:id[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@+id/TextView20"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"463dp"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"30dp"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:layout_marginBottom[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"8dp"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:background[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@color/antworten"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:fontFamily[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"arial"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:gravity[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"left|center"[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:paddingLeft[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"5dp"[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:paddingRight[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"5dp"[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:singleLine[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"true"[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:text[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Antwort1"[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[U][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I][/U] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:textColor[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@color/textViewText"[/COLOR][/SIZE][/COLOR][/SIZE][/I][/LEFT]
[I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE][/COLOR][/SIZE][/I] [LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f] android:textSize[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"17sp"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]
[/COLOR][/SIZE][/COLOR][/SIZE] [LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080] </[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]TextView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]HorizontalScrollView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>
[/COLOR][/SIZE][/COLOR][/SIZE]
Ich habe jetzt schon in einigen Foren nachgeschaut und verschiedene Möglichkeiten probiert, aber alle ohne Erfolg.
Gibt es einen Trick vlt. den Text der RadioButtons zu scrollen oder ist das mit TextViews besser und wie bringe ich das dann zum Laufen ?
Schonmal Vielen Dank für alle Antworten
Gruß Mr.DH