forked from osmandapp/OsmAnd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding custom SearchResultsFragmentUI
- Loading branch information
1 parent
efaeb83
commit e8f48ee
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/searchResultsCustom" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintBottom_toTopOf="@+id/searchResultsHeading"/> | ||
|
||
<TextView | ||
android:id="@+id/searchResultsHeading" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Search Results" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/searchResultsCustom" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
21 changes: 21 additions & 0 deletions
21
OsmAnd/src/net/osmand/plus/settings/fragments/search/SearchResultsFragmentUI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package net.osmand.plus.settings.fragments.search; | ||
|
||
import android.view.View; | ||
|
||
import androidx.annotation.LayoutRes; | ||
import androidx.recyclerview.widget.RecyclerView; | ||
|
||
import net.osmand.plus.R; | ||
|
||
class SearchResultsFragmentUI implements de.KnollFrank.lib.settingssearch.search.ui.SearchResultsFragmentUI { | ||
|
||
@Override | ||
public @LayoutRes int getRootViewId() { | ||
return R.layout.custom_searchresults_fragment; | ||
} | ||
|
||
@Override | ||
public RecyclerView getSearchResultsView(final View rootView) { | ||
return rootView.findViewById(R.id.searchResultsCustom); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters