Align textview and progressbar in Android XML

fragpunch

New Member
I've already tried to align the smallprogressbar with the textview putting them into a linear layout but it doesn't work. Tryed with \[code\]android:layout_gravity="left"\[/code\] but it crashes.
aKUKO.png
\[code\]<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="10dp" android:text="@string/calibration_1" android:textColor="#33b5e5" android:textSize="16dp" android:textStyle="bold" /> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/tvNumberWaves" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="@string/calibration_2" android:textColor="#FFFFFF" android:textSize="18dp" /> <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/tvIntervalWaves" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="@string/calibration_3" android:textColor="#FFFFFF" android:textSize="18dp" /> <ProgressBar android:id="@+id/progressBar2" style="?android:attr/progressBarStyleSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> <Button android:id="@+id/bSetValues" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dp" android:text="@string/calibration_5" /> <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="10dp" android:text="@string/calibration_6" /> </ScrollView></LinearLayout>\[/code\]Code updated to match your answer. I put the whole code to show what I have.
 
Back
Top