-
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.
* Add mvp searchview functionality with rxjava * Route Options searchview ui * Addressing requested changes * Adding MaxHeightListView commenting * More commenting * SearchInput focus on lower API versions * More states for SearchView * Search State changes * Update map slightly * Resolving conflicts * MapSupport is now a MapView Co-authored-by: connorreinhold <cyreinhold@gmail.com>
- Loading branch information
1 parent
3a681ab
commit ce816b8
Showing
9 changed files
with
96 additions
and
20 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
Binary file not shown.
Binary file not shown.
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
60 changes: 60 additions & 0 deletions
60
app/src/main/java/com/example/ithaca_transit_android_v2/MapFragment.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,60 @@ | ||
package com.example.ithaca_transit_android_v2 | ||
|
||
import android.os.Bundle | ||
import android.util.Log | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.fragment.app.Fragment | ||
import com.example.ithaca_transit_android_v2.R.id.map_fragment | ||
import com.google.android.gms.common.GooglePlayServicesRepairableException | ||
import com.google.android.gms.maps.GoogleMap | ||
import com.google.android.gms.maps.MapView | ||
import com.google.android.gms.maps.model.LatLng | ||
import com.google.android.gms.maps.CameraUpdateFactory | ||
import com.google.android.gms.maps.OnMapReadyCallback | ||
|
||
|
||
class MapFragment: Fragment() , OnMapReadyCallback{ | ||
private lateinit var mapView: MapView | ||
private lateinit var map: GoogleMap | ||
|
||
|
||
override fun onCreateView(inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle?): View? { | ||
|
||
var v = inflater.inflate(R.layout.fragment_map, container, false) | ||
mapView = v.findViewById(R.id.mapView2) | ||
mapView.onCreate(savedInstanceState) | ||
mapView.getMapAsync { this } | ||
return v | ||
} | ||
|
||
override fun onMapReady(googleMap: GoogleMap) { | ||
map = googleMap | ||
map.uiSettings.isMyLocationButtonEnabled = false | ||
map.isMyLocationEnabled = true | ||
mapView.onResume() | ||
} | ||
override fun onResume() { | ||
mapView.onResume() | ||
super.onResume() | ||
} | ||
|
||
|
||
override fun onPause() { | ||
super.onPause() | ||
mapView.onPause() | ||
} | ||
|
||
override fun onDestroy() { | ||
super.onDestroy() | ||
mapView.onDestroy() | ||
} | ||
|
||
override fun onLowMemory() { | ||
super.onLowMemory() | ||
mapView.onLowMemory() | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<com.google.android.gms.maps.MapView | ||
android:id="@+id/mapView2" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
</com.google.android.gms.maps.MapView> | ||
|
||
|
||
</LinearLayout> |