mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Rename, use resources
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
a45268f398
commit
fa8a055152
6 changed files with 25 additions and 16 deletions
|
@ -290,15 +290,17 @@ class OCFileListDelegate(
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
private fun setItemLayoutBackgroundColor(file: OCFile, gridViewHolder: ListGridImageViewHolder) {
|
||||
val cornerRadius = context.resources.getDimension(R.dimen.selected_grid_container_radius)
|
||||
|
||||
val itemLayoutBackgroundColorId: Int = if (file.fileId == highlightedItem?.fileId || isCheckedFile(file)) {
|
||||
R.color.selected_item_background
|
||||
} else {
|
||||
R.color.bg_default
|
||||
}
|
||||
|
||||
gridViewHolder.itemLayout.apply {
|
||||
outlineProvider = createRoundedOutline(context, 16f)
|
||||
outlineProvider = createRoundedOutline(context, cornerRadius)
|
||||
clipToOutline = true
|
||||
setBackgroundColor(ContextCompat.getColor(context, itemLayoutBackgroundColorId))
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
android:layout_marginBottom="@dimen/grid_layout_margin_bottom"
|
||||
android:alpha="0.9"
|
||||
android:background="@drawable/rounded_rect"
|
||||
android:backgroundTint="@color/grid_background_color"
|
||||
android:backgroundTint="@color/grid_file_features_background_color"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_quarter_padding"
|
||||
android:translationZ="4dp"
|
||||
|
@ -88,7 +88,7 @@
|
|||
android:contentDescription="@string/video_overlay_icon"
|
||||
android:src="@drawable/video_white"
|
||||
android:visibility="gone"
|
||||
app:tint="@color/grid_icon_color"
|
||||
app:tint="@color/grid_file_features_icon_color"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
|
@ -98,11 +98,12 @@
|
|||
android:layout_marginEnd="@dimen/grid_layout_margin_end"
|
||||
android:contentDescription="@string/shared_icon_shared_via_link"
|
||||
android:src="@drawable/shared_via_link"
|
||||
app:tint="@color/grid_icon_color"
|
||||
app:tint="@color/grid_file_features_icon_color"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/unreadComments"
|
||||
tools:ignore="TouchTargetSizeCheck"
|
||||
android:layout_width="@dimen/grid_layout_item_size"
|
||||
android:layout_height="@dimen/grid_layout_item_size"
|
||||
android:layout_marginEnd="@dimen/grid_layout_margin_end"
|
||||
|
@ -111,20 +112,21 @@
|
|||
android:focusable="true"
|
||||
android:src="@drawable/ic_comment_grid"
|
||||
android:visibility="gone"
|
||||
app:tint="@color/grid_icon_color"
|
||||
app:tint="@color/grid_file_features_icon_color"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/grid_live_photo_indicator"
|
||||
tools:ignore="TouchTargetSizeCheck"
|
||||
android:layout_width="@dimen/grid_layout_item_size"
|
||||
android:layout_height="@dimen/grid_layout_item_size"
|
||||
android:layout_marginEnd="@dimen/grid_layout_margin_end"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/unread_comments"
|
||||
android:contentDescription="@string/grid_file_features_live_photo_content_description"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_live_photo"
|
||||
android:visibility="gone"
|
||||
app:tint="@color/grid_icon_color"
|
||||
app:tint="@color/grid_file_features_icon_color"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
|
@ -149,10 +151,11 @@
|
|||
<ImageButton
|
||||
android:id="@+id/more"
|
||||
android:layout_width="wrap_content"
|
||||
tools:ignore="TouchTargetSizeCheck"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:contentDescription="@string/ecosystem_apps_display_more"
|
||||
android:contentDescription="@string/overflow_menu"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_dots_vertical" />
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
android:layout_marginBottom="@dimen/grid_layout_margin_bottom"
|
||||
android:alpha="0.9"
|
||||
android:background="@drawable/rounded_rect"
|
||||
android:backgroundTint="@color/grid_background_color"
|
||||
android:backgroundTint="@color/grid_file_features_background_color"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/standard_quarter_padding"
|
||||
android:translationZ="4dp"
|
||||
|
@ -89,7 +89,7 @@
|
|||
android:contentDescription="@string/video_overlay_icon"
|
||||
android:src="@drawable/video_white"
|
||||
android:visibility="gone"
|
||||
app:tint="@color/grid_icon_color"
|
||||
app:tint="@color/grid_file_features_icon_color"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
|
@ -99,20 +99,21 @@
|
|||
android:layout_marginEnd="@dimen/grid_layout_margin_end"
|
||||
android:contentDescription="@string/shared_icon_shared_via_link"
|
||||
android:src="@drawable/shared_via_link"
|
||||
app:tint="@color/grid_icon_color"
|
||||
app:tint="@color/grid_file_features_icon_color"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/unreadComments"
|
||||
android:layout_width="@dimen/grid_layout_item_size"
|
||||
android:layout_height="@dimen/grid_layout_item_size"
|
||||
tools:ignore="TouchTargetSizeCheck"
|
||||
android:layout_marginEnd="@dimen/grid_layout_margin_end"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/unread_comments"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_comment_grid"
|
||||
android:visibility="gone"
|
||||
app:tint="@color/grid_icon_color"
|
||||
app:tint="@color/grid_file_features_icon_color"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
|
@ -154,9 +155,10 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:translationZ="2dp"
|
||||
tools:ignore="TouchTargetSizeCheck"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:contentDescription="@string/ecosystem_apps_display_more"
|
||||
android:contentDescription="@string/overflow_menu"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_dots_vertical" />
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
<color name="white">#ffffff</color>
|
||||
<color name="white_helper_text">#B3FFFFFF</color>
|
||||
<color name="text_color">#333333</color>
|
||||
<color name="grid_icon_color">#303034</color>
|
||||
<color name="grid_background_color">#E9E8EB</color>
|
||||
<color name="grid_file_features_icon_color">#303034</color>
|
||||
<color name="grid_file_features_background_color">#E9E8EB</color>
|
||||
<color name="drawer_text_color">@color/secondary_text_color</color>
|
||||
<color name="text_color_inverse">#ffffff</color>
|
||||
<color name="disabled_text">#ff888888</color>
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
<dimen name="notification_icon_width">24dp</dimen>
|
||||
<dimen name="notification_icon_height">24dp</dimen>
|
||||
<dimen name="grid_container_margin">4dp</dimen>
|
||||
<dimen name="selected_grid_container_radius">4dp</dimen>
|
||||
<dimen name="grid_container_width">130dp</dimen>
|
||||
<dimen name="grid_container_height">120dp</dimen>
|
||||
<dimen name="grid_filename_width">80dp</dimen>
|
||||
|
|
|
@ -808,6 +808,7 @@
|
|||
<string name="no_map_app_availble">No App available to handle maps</string>
|
||||
<string name="share_via_link_hide_download">Hide download</string>
|
||||
<string name="unread_comments">Unread comments exist</string>
|
||||
<string name="grid_file_features_live_photo_content_description">This icon indicates availability of live photo</string>
|
||||
<string name="richdocuments_failed_to_load_document">Failed to load document!</string>
|
||||
<string name="create_new_document">Create new document</string>
|
||||
<string name="create_new_spreadsheet">Create new spreadsheet</string>
|
||||
|
|
Loading…
Reference in a new issue