Increment: Setup file item to show status of transfer

3 possible states: To be sent (wait icon) -> sending (progress bar) -> sent (check icon)
This commit is contained in:
Aditya-Sood 2019-06-26 00:20:31 +05:30
parent f90ba10b75
commit 4b82f254e2
4 changed files with 61 additions and 7 deletions

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
</vector>

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path android:pathData="M0,0h24v24H0V0z M 0,0"/>
<path
android:fillColor="#FF000000"
android:pathData="M12,2C6.5,2 2,6.5 2,12s4.5,10 10,10 10,-4.5 10,-10S17.5,2 12,2zM16.2,16.2L11,13L11,7h1.5v5.2l4.5,2.7 -0.8,1.3z"/>
</group>
</vector>

View File

@ -2,20 +2,51 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:padding="10dp">
<TextView
android:id="@+id/text_view_file_item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="File Name"
android:text="File Name"
android:gravity="center_vertical"
android:textColor="#000000"
android:textSize="16sp"
android:fontFamily="sans-serif-medium"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingLeft="5dp"
android:paddingRight="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"/>
app:layout_constraintLeft_toLeftOf="parent" />
<ProgressBar
android:id="@+id/progress_bar_transferring_file"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/text_view_file_item_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="gone"/>
<ImageView
android:id="@+id/image_view_file_transferred"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:srcCompat="@drawable/ic_baseline_wait_24px"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/text_view_file_item_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -15,6 +15,7 @@
android:textStyle="bold"
android:textSize="17sp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"/>
@ -27,8 +28,9 @@
android:text="Status"
android:tooltipText="Device Status"
android:textSize="17sp"
android:paddingTop="1dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingBottom="1dp"/>
</LinearLayout>
</LinearLayout>