| | |
| | | import android.widget.ImageView |
| | | import android.widget.TextView |
| | | import androidx.appcompat.widget.AppCompatTextView |
| | | import androidx.core.content.ContextCompat |
| | | import androidx.core.app.ActivityCompat |
| | | import androidx.core.os.bundleOf |
| | | import androidx.core.view.isVisible |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | |
| | | val fragment = supportFragmentManager.findFragmentById(R.id.mMapView) as ConsumerMapFragment |
| | | fragment.getConsumerGoogleMapAsync(object : ConsumerGoogleMap.ConsumerMapReadyCallback() { |
| | | override fun onConsumerMapReady(consumerGoogleMap: ConsumerGoogleMap) { |
| | | if (ContextCompat.checkSelfPermission( |
| | | if (ActivityCompat.checkSelfPermission( |
| | | this@TripActivity, |
| | | Manifest.permission.ACCESS_FINE_LOCATION |
| | | ) == PackageManager.PERMISSION_GRANTED || |
| | | ContextCompat.checkSelfPermission( |
| | | ) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission( |
| | | this@TripActivity, |
| | | Manifest.permission.ACCESS_COARSE_LOCATION |
| | | ) == PackageManager.PERMISSION_GRANTED |
| | | ) != PackageManager.PERMISSION_GRANTED |
| | | ) { |
| | | return |
| | | } |