I'm trying to make a listView with progress bar exactly like the image below
I'm use android:layout_toRightOf
to display the progressBar beside the Pro-XXX-XXX
, but it display below the text .
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/ListProject" android:textStyle="bold" android:textColor="@color/black" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <ProgressBar android:id="@+id/downloadProgressBar" style="?android:attr/progressBarStyleHorizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@+id/ListProject" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/blue" android:id="@+id/ListTimeIn"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/blue" android:layout_toLeftOf="@+id/ListTimeIn" android:id="@+id/ListTimeOut"/> <TextView android:id="@+id/ListDescription" android:layout_width="wrap_content" android:textColor="@color/blue" android:layout_height="wrap_content"/> </LinearLayout>
Change to RelativeLayout
@Chintan answer
No comments:
Post a Comment