Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
ui: tweak download button
Browse files Browse the repository at this point in the history
* increase button margin
* reduce loading indicator size
* use vector icon
  • Loading branch information
rocka committed Aug 14, 2017
1 parent 19c323e commit 29a262e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_file_download.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z" />
</vector>
16 changes: 9 additions & 7 deletions app/src/main/res/layout/item_rom_package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,32 @@
<ProgressBar
android:id="@+id/progress_circle_download"
style="?android:attr/progressBarStyle"
android:layout_width="@dimen/download_btn_width"
android:layout_height="@dimen/download_btn_width"
android:layout_marginEnd="@dimen/download_btn_margin"
android:layout_width="@dimen/download_idc_width"
android:layout_height="@dimen/download_idc_width"
android:layout_marginBottom="@dimen/download_btn_margin"
android:layout_marginEnd="13dp"
android:layout_marginTop="@dimen/download_btn_margin"
android:alpha="0.0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@android:drawable/stat_sys_download" />
app:layout_constraintTop_toTopOf="parent" />

<ImageButton
android:id="@+id/button_download"
android:layout_width="@dimen/download_btn_width"
android:layout_height="@dimen/download_btn_width"
android:layout_marginBottom="@dimen/download_btn_margin"
android:layout_marginEnd="@dimen/download_btn_margin"
android:layout_marginTop="@dimen/download_btn_margin"
android:background="@android:color/transparent"
android:clickable="true"
android:contentDescription="@string/desc_download_btn"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:padding="8dp"
android:tint="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@android:drawable/stat_sys_download" />
app:srcCompat="@drawable/ic_file_download" />
</android.support.constraint.ConstraintLayout>
</layout>
3 changes: 2 additions & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<resources>
<dimen name="fab_margin">16dp</dimen>
<dimen name="download_btn_width">40dp</dimen>
<dimen name="download_btn_width">42dp</dimen>
<dimen name="download_idc_width">32dp</dimen>
<dimen name="download_btn_margin">8dp</dimen>
</resources>

0 comments on commit 29a262e

Please sign in to comment.