-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update to places SDK 4.0.0 (#746)
* fix: initialize Places SDK at the application level * fix: initialize Places SDK at the application level * fix! update to PlacesSDK 4.0.0. Upgrade dependencies. Min SDK version 23. Target SDK version 25. * feat: updates to places SDK 4.0.0 * fix: addes missing copyright headers
- Loading branch information
Showing
11 changed files
with
110 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Mar 28 15:43:44 PDT 2022 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
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
80 changes: 47 additions & 33 deletions
80
demo-kotlin/app/src/main/java/com/example/placesdemo/model/AutocompleteEditText.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 |
---|---|---|
@@ -1,33 +1,47 @@ | ||
package com.example.placesdemo.model | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.MotionEvent | ||
import androidx.appcompat.widget.AppCompatEditText | ||
|
||
class AutocompleteEditText : AppCompatEditText { | ||
constructor(context: Context?) : super(context!!) {} | ||
constructor(context: Context?, attrs: AttributeSet?) : super( | ||
context!!, attrs | ||
) { | ||
} | ||
|
||
override fun onTouchEvent(event: MotionEvent): Boolean { | ||
super.onTouchEvent(event) | ||
when (event.action) { | ||
MotionEvent.ACTION_DOWN -> return true | ||
MotionEvent.ACTION_UP -> { | ||
performClick() | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
|
||
// Because we call this from onTouchEvent, this code will be executed for both | ||
// normal touch events and for when the system calls this using Accessibility | ||
override fun performClick(): Boolean { | ||
super.performClick() | ||
return true | ||
} | ||
} | ||
// Copyright 2024 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.example.placesdemo.model | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.MotionEvent | ||
import androidx.appcompat.widget.AppCompatEditText | ||
|
||
class AutocompleteEditText : AppCompatEditText { | ||
constructor(context: Context?) : super(context!!) {} | ||
constructor(context: Context?, attrs: AttributeSet?) : super( | ||
context!!, attrs | ||
) { | ||
} | ||
|
||
override fun onTouchEvent(event: MotionEvent): Boolean { | ||
super.onTouchEvent(event) | ||
when (event.action) { | ||
MotionEvent.ACTION_DOWN -> return true | ||
MotionEvent.ACTION_UP -> { | ||
performClick() | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
|
||
// Because we call this from onTouchEvent, this code will be executed for both | ||
// normal touch events and for when the system calls this using Accessibility | ||
override fun performClick(): Boolean { | ||
super.performClick() | ||
return true | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Mar 28 15:44:27 PDT 2022 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |