Moving refresh button to the right side

sorry carlos
This commit is contained in:
Jay 2020-05-06 18:26:43 -04:00
parent 33d15b0814
commit a9ec02caac
2 changed files with 32 additions and 32 deletions

View File

@ -34,7 +34,6 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.view.gone
import eu.kanade.tachiyomi.util.view.invisible
import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.util.view.visInvisIf
import eu.kanade.tachiyomi.util.view.visible
import eu.kanade.tachiyomi.util.view.visibleIf
import kotlinx.android.synthetic.main.library_category_header_item.*
@ -193,7 +192,7 @@ class LibraryHeaderItem(
expandImage.visibleIf(!adapter.isSingleCategory)
catProgress.gone()
checkboxImage.gone()
updateButton.visInvisIf(category.id ?: 0 > -1 && !adapter.isSingleCategory)
updateButton.visibleIf(category.id ?: 0 > -1 && !adapter.isSingleCategory)
}
}
}

View File

@ -54,33 +54,6 @@
app:constraint_referenced_ids="start_space,collapse_arrow,checkbox"
/>
<ImageView
android:id="@+id/update_button"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:clickable="true"
android:focusable="true"
android:padding="5dp"
android:src="@drawable/ic_refresh_white_24dp"
android:tint="?attr/colorAccent"
app:layout_constraintBottom_toBottomOf="@id/category_title"
app:layout_constraintEnd_toStartOf="@id/category_title"
app:layout_constraintStart_toEndOf="@+id/start_barrier"
app:layout_constraintTop_toTopOf="@id/category_title"
app:rippleColor="@color/fullRippleColor" />
<ProgressBar
android:id="@+id/cat_progress"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="5dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/update_button"
app:layout_constraintEnd_toEndOf="@id/update_button"
app:layout_constraintStart_toStartOf="@id/update_button"
app:layout_constraintTop_toTopOf="@id/update_button"
tools:visibility="visible" />
<Space
android:id="@+id/space"
android:layout_width="0dp"
@ -111,7 +84,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/space"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/update_button"
app:layout_constraintStart_toEndOf="@+id/start_barrier"
app:layout_constraintTop_toTopOf="parent"
tools:text="Title dfdsfsfsfsfsfdsfsfsfs" />
@ -120,7 +93,7 @@
android:id="@+id/category_sort"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
android:layout_marginEnd="0dp"
android:background="@drawable/square_ripple"
android:clickable="true"
android:drawableEnd="@drawable/ic_sort_white_24dp"
@ -138,9 +111,37 @@
android:textStyle="normal"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="@id/category_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@id/update_button"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@id/space"
app:layout_constraintTop_toTopOf="@id/category_title"
tools:text="Drag and Drop" />
<ImageView
android:id="@+id/update_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:padding="4dp"
android:layout_marginEnd="6dp"
style="@style/Theme.Widget.CustomImageButton"
android:src="@drawable/ic_refresh_white_24dp"
android:tint="@color/gray_button"
app:layout_constraintBottom_toBottomOf="@id/category_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/category_sort"
app:layout_constraintTop_toTopOf="@id/category_title" />
<ProgressBar
android:id="@+id/cat_progress"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="5dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/update_button"
app:layout_constraintEnd_toEndOf="@id/update_button"
app:layout_constraintStart_toStartOf="@id/update_button"
app:layout_constraintTop_toTopOf="@id/update_button"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>