Skip to content

Commit 2095158

Browse files
Merge pull request #16806 from nextcloud/style/unified-search-center-load-more
style(unified-search): center load more button
2 parents a76fc19 + 4428aef commit 2095158

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

app/src/main/java/com/owncloud/android/ui/adapter/UnifiedSearchFooterViewHolder.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ import com.afollestad.sectionedrecyclerview.SectionedViewHolder
1212
import com.owncloud.android.databinding.UnifiedSearchFooterBinding
1313
import com.owncloud.android.ui.interfaces.UnifiedSearchListInterface
1414
import com.owncloud.android.ui.unifiedsearch.UnifiedSearchSection
15+
import com.owncloud.android.utils.theme.ViewThemeUtils
1516

1617
class UnifiedSearchFooterViewHolder(
1718
val binding: UnifiedSearchFooterBinding,
1819
val context: Context,
20+
private val viewThemeUtils: ViewThemeUtils,
1921
private val listInterface: UnifiedSearchListInterface
2022
) : SectionedViewHolder(binding.root) {
2123

2224
fun bind(section: UnifiedSearchSection) {
25+
viewThemeUtils.material.colorMaterialTextButton(binding.unifiedSearchFooterLayout)
2326
binding.unifiedSearchFooterLayout.setOnClickListener {
2427
listInterface.onLoadMoreClicked(section.providerID)
2528
}

app/src/main/java/com/owncloud/android/ui/adapter/UnifiedSearchListAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class UnifiedSearchListAdapter(
120120
parent,
121121
false
122122
)
123-
UnifiedSearchFooterViewHolder(binding, context, listInterface)
123+
UnifiedSearchFooterViewHolder(binding, context, viewThemeUtils, listInterface)
124124
}
125125

126126
VIEW_TYPE_ITEM -> {

app/src/main/res/layout/unified_search_footer.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
~ SPDX-FileCopyrightText: 2026 Alper Ozturk <alper.ozturk@nextcloud.com>
66
~ SPDX-License-Identifier: AGPL-3.0-or-later
77
-->
8-
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
8+
<com.google.android.material.button.MaterialButton
9+
xmlns:android="http://schemas.android.com/apk/res/android"
910
android:id="@+id/unified_search_footer_layout"
11+
style="@style/Widget.Material3.Button.TextButton"
1012
android:layout_width="match_parent"
1113
android:layout_height="@dimen/min_list_item_size"
12-
android:gravity="center_vertical"
13-
android:paddingStart="@dimen/standard_list_item_size"
14-
android:paddingEnd="@dimen/standard_quarter_padding"
15-
android:text="@string/load_more_results"
16-
android:textColor="@color/secondary_text_color" />
14+
android:gravity="center"
15+
android:text="@string/load_more_results" />

0 commit comments

Comments
 (0)