-
-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18793 from osmandapp/search_aa
Clean up search and android auto screens
- Loading branch information
Showing
60 changed files
with
465 additions
and
386 deletions.
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
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
31 changes: 0 additions & 31 deletions
31
OsmAnd/src/net/osmand/plus/auto/BaseOsmAndAndroidAutoSearchScreen.kt
This file was deleted.
Oops, something went wrong.
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
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
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
28 changes: 28 additions & 0 deletions
28
OsmAnd/src/net/osmand/plus/auto/screens/BaseSearchScreen.kt
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,28 @@ | ||
package net.osmand.plus.auto.screens | ||
|
||
import androidx.car.app.CarContext | ||
import androidx.car.app.constraints.ConstraintManager | ||
import net.osmand.plus.auto.SearchHelper | ||
import net.osmand.plus.auto.SearchHelper.SearchHelperListener | ||
import net.osmand.search.core.SearchCoreFactory.MAX_DEFAULT_SEARCH_RADIUS | ||
|
||
abstract class BaseSearchScreen(carContext: CarContext) : BaseAndroidAutoScreen(carContext), | ||
SearchHelperListener { | ||
|
||
protected var loading = false | ||
protected val searchHelper: SearchHelper by lazy(::createSearchHelper) | ||
|
||
override fun getConstraintLimitType(): Int { | ||
return ConstraintManager.CONTENT_LIMIT_TYPE_PLACE_LIST | ||
} | ||
|
||
private fun createSearchHelper(): SearchHelper { | ||
val searchHelper = SearchHelper( | ||
app, true, contentLimit, 2, | ||
MAX_DEFAULT_SEARCH_RADIUS, false | ||
) | ||
searchHelper.listener = this | ||
searchHelper.setupSearchSettings(true) | ||
return searchHelper | ||
} | ||
} |
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
Oops, something went wrong.