Skip to content

Commit

Permalink
chore: comments from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso committed Aug 11, 2023
1 parent 15643e4 commit 8d6cb16
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
android:name=".StreetViewActivity"
android:exported="false"/>
<activity
android:name=".CustomLocationButtonActivity"
android:name=".CustomControlsActivity"
android:exported="false"/>

<!-- Used by createComponentActivity() for unit testing -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

class CustomLocationButtonActivity : ComponentActivity() {
class CustomControlsActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand All @@ -65,7 +65,7 @@ class CustomLocationButtonActivity : ComponentActivity() {
"This is a custom location button",
onClick = {
Toast.makeText(
this@CustomLocationButtonActivity,
this@CustomControlsActivity,
"Click on my location",
Toast.LENGTH_SHORT
).show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ class LocationTrackingActivity : AppCompatActivity() {
onMapLoaded = {
isMapLoaded = true
},
// This listener overrides the behavior for the location button. It is intended to be used when a
// custom behavior is needed.
onMyLocationButtonClick = { Log.d(TAG,"Overriding the onMyLocationButtonClick with this Log"); true },
locationSource = locationSource,
properties = mapProperties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class MainActivity : ComponentActivity() {
Spacer(modifier = Modifier.padding(5.dp))
Button(
onClick = {
context.startActivity(Intent(context, CustomLocationButtonActivity::class.java))
context.startActivity(Intent(context, CustomControlsActivity::class.java))
}) {
Text(getString(R.string.custom_location_button))
}
Expand Down

0 comments on commit 8d6cb16

Please sign in to comment.