parent
a5c4189c92
commit
3d198fac54
@ -0,0 +1,16 @@
|
||||
package fr.iut.cinecool.API.OpenStreetMap
|
||||
|
||||
import retrofit2.Call
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Headers
|
||||
import retrofit2.http.Query
|
||||
|
||||
interface ApiService {
|
||||
@Headers("User-Agent: MyApp")
|
||||
@GET("search")
|
||||
fun searchCinemas(
|
||||
@Query("q") query: String,
|
||||
@Query("format") format: String = "json",
|
||||
@Query("limit") limit: Int = 10
|
||||
): Call<List<Cinema>>
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package fr.iut.cinecool.API.OpenStreetMap
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Cinema(
|
||||
@SerializedName("place_id")
|
||||
val placeId: Long,
|
||||
|
||||
@SerializedName("lat")
|
||||
val latitude: Double,
|
||||
|
||||
@SerializedName("lon")
|
||||
val longitude: Double,
|
||||
|
||||
@SerializedName("display_name")
|
||||
val displayName: String
|
||||
)
|
@ -0,0 +1,34 @@
|
||||
package fr.iut.cinecool.API.OpenStreetMap
|
||||
|
||||
import android.location.Location
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
|
||||
class Repository {
|
||||
private fun fetchNearbyCinemas(location: Location) {
|
||||
val retrofit = Retrofit.Builder()
|
||||
.baseUrl("https://nominatim.openstreetmap.org/")
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.build()
|
||||
|
||||
val nominatimService = retrofit.create(NominatimService::class.java)
|
||||
val call = nominatimService.searchCinemas("cinema near ${location.latitude},${location.longitude}")
|
||||
call.enqueue(object : Callback<List<Cinema>> {
|
||||
override fun onResponse(call: Call<List<Cinema>>, response: Response<List<Cinema>>) {
|
||||
if (response.isSuccessful) {
|
||||
val cinemas = response.body() ?: emptyList()
|
||||
displayCinemas(cinemas)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<List<Cinema>>, t: Throwable) {
|
||||
// Gérer l'erreur
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package fr.iut.cinecool.API
|
||||
package fr.iut.cinecool.API.THMDB
|
||||
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
@ -1,4 +1,4 @@
|
||||
package fr.iut.cinecool.API
|
||||
package fr.iut.cinecool.API.THMDB
|
||||
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Query
|
@ -1,4 +1,4 @@
|
||||
package fr.iut.cinecool.API
|
||||
package fr.iut.cinecool.API.THMDB
|
||||
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
@ -1,4 +1,4 @@
|
||||
package fr.iut.cinecool.API
|
||||
package fr.iut.cinecool.API.THMDB
|
||||
|
||||
class Repository {
|
||||
private val apiService = ApiClient.apiService
|
@ -1,32 +1,61 @@
|
||||
package fr.iut.cinecool
|
||||
|
||||
import android.content.Intent
|
||||
import android.Manifest
|
||||
import android.content.pm.PackageManager
|
||||
import android.location.Location
|
||||
import android.os.Bundle
|
||||
import android.widget.EditText
|
||||
import android.widget.ImageView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.google.android.gms.location.FusedLocationProviderClient
|
||||
import com.google.android.gms.location.LocationServices
|
||||
import fr.iut.cinecool.fragments.CinemaListFragment
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var fusedLocationClient: FusedLocationProviderClient
|
||||
private val locationPermissionRequestCode = 1
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
val loginButton = findViewById<ImageView>(R.id.loginButton)
|
||||
loginButton.setOnClickListener(){
|
||||
login()
|
||||
|
||||
fusedLocationClient = LocationServices.getFusedLocationProviderClient(this)
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
supportFragmentManager.beginTransaction()
|
||||
.add(R.id.fragment_container, CinemaListFragment())
|
||||
.commit()
|
||||
}
|
||||
|
||||
requestLocationPermission()
|
||||
}
|
||||
|
||||
/*ActivityCompat.requestPermissions(this,
|
||||
arrayOf(Manifest.permission.ACCESS_FINE_LOCATION,1)
|
||||
)*/
|
||||
private fun requestLocationPermission() {
|
||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
!= PackageManager.PERMISSION_GRANTED
|
||||
) {
|
||||
ActivityCompat.requestPermissions(
|
||||
this,
|
||||
arrayOf(Manifest.permission.ACCESS_FINE_LOCATION),
|
||||
locationPermissionRequestCode
|
||||
)
|
||||
}
|
||||
fun login(){
|
||||
val name = findViewById<EditText>(R.id.name).text
|
||||
if (name.isNotEmpty()){
|
||||
val intent = Intent(applicationContext,CinemaActivity::class.java)
|
||||
startActivity(intent)
|
||||
System.out.println(name)
|
||||
}
|
||||
|
||||
override fun onRequestPermissionsResult(
|
||||
requestCode: Int,
|
||||
permissions: Array<out String>,
|
||||
grantResults: IntArray
|
||||
) {
|
||||
if (requestCode == locationPermissionRequestCode) {
|
||||
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
// La permission de localisation a été accordée, vous pouvez effectuer les actions correspondantes
|
||||
} else {
|
||||
// La permission de localisation a été refusée, vous devez gérer ce cas
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,43 @@
|
||||
package fr.iut.cinecool.adapter
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import fr.iut.cinecool.API.OpenStreetMap.Cinema
|
||||
import fr.iut.cinecool.R
|
||||
|
||||
class CinemaAdapter(private val onCinemaClickListener: (Cinema) -> Unit) :
|
||||
RecyclerView.Adapter<CinemaAdapter.CinemaViewHolder>() {
|
||||
|
||||
private val cinemas = mutableListOf<Cinema>()
|
||||
|
||||
fun updateCinemas(newCinemas: List<Cinema>) {
|
||||
cinemas.clear()
|
||||
cinemas.addAll(newCinemas)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CinemaViewHolder {
|
||||
val itemView = LayoutInflater.from(parent.context).inflate(R.layout.item_cinema, parent, false)
|
||||
return CinemaViewHolder(itemView, onCinemaClickListener)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: CinemaViewHolder, position: Int) {
|
||||
holder.bind(cinemas[position])
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = cinemas.size
|
||||
|
||||
class CinemaViewHolder(itemView: View, private val onCinemaClickListener: (Cinema) -> Unit) :
|
||||
RecyclerView.ViewHolder(itemView) {
|
||||
|
||||
private val cinemaNameTextView: TextView = itemView.findViewById(R.id.cinemaNameTextView)
|
||||
|
||||
fun bind(cinema: Cinema) {
|
||||
cinemaNameTextView.text = cinema.displayName
|
||||
itemView.setOnClickListener { onCinemaClickListener(cinema) }
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package fr.iut.cinecool.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import fr.iut.cinecool.API.OpenStreetMap.Cinema
|
||||
import fr.iut.cinecool.R
|
||||
import fr.iut.cinecool.adapter.MovieAdapter
|
||||
|
||||
class CinemaDetailFragment : Fragment() {
|
||||
|
||||
private lateinit var cinemaNameTextView: TextView
|
||||
private lateinit var recyclerView: RecyclerView
|
||||
private lateinit var adapter: MovieAdapter
|
||||
private lateinit var cinema: Cinema
|
||||
|
||||
companion object {
|
||||
private const val ARG_CINEMA = "cinema"
|
||||
|
||||
fun newInstance(cinema: Cinema): CinemaDetailFragment {
|
||||
val fragment = CinemaDetailFragment()
|
||||
val args = Bundle()
|
||||
args.putParcelable(ARG_CINEMA, cinema)
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
cinema = arguments?.getParcelable(ARG_CINEMA) ?: throw IllegalStateException("Cinema not provided")
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
return inflater.inflate(R.layout.fragment_cinema_detail, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
cinemaNameTextView = view.findViewById(R.id.cinemaNameTextView)
|
||||
recyclerView = view.findViewById(R.id.recyclerView)
|
||||
recyclerView.layoutManager = LinearLayoutManager(requireContext())
|
||||
|
||||
adapter = MovieAdapter()
|
||||
recyclerView.adapter = adapter
|
||||
|
||||
cinemaNameTextView.text = cinema.displayName
|
||||
|
||||
// Récupérez et affichez la liste des films à l'affiche pour le cinéma sélectionné
|
||||
}
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
package fr.iut.cinecool
|
||||
package fr.iut.cinecool.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import fr.iut.cinecool.R
|
||||
|
||||
|
||||
class CinemaFragment : Fragment() {
|
@ -0,0 +1,45 @@
|
||||
package fr.iut.cinecool.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.gms.location.FusedLocationProviderClient
|
||||
import com.google.android.gms.location.LocationServices
|
||||
import fr.iut.cinecool.R
|
||||
import fr.iut.cinecool.adapter.CinemaAdapter
|
||||
|
||||
class CinemaListFragment : Fragment() {
|
||||
|
||||
private lateinit var recyclerView: RecyclerView
|
||||
private lateinit var adapter: CinemaAdapter
|
||||
private lateinit var fusedLocationClient: FusedLocationProviderClient
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
return inflater.inflate(R.layout.fragment_cinema_list, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
recyclerView = view.findViewById(R.id.recyclerView)
|
||||
recyclerView.layoutManager = LinearLayoutManager(requireContext())
|
||||
|
||||
adapter = CinemaAdapter { cinema ->
|
||||
val fragment = CinemaDetailFragment.newInstance(cinema)
|
||||
requireActivity().supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fragment_container, fragment)
|
||||
.addToBackStack(null)
|
||||
.commit()
|
||||
}
|
||||
|
||||
recyclerView.adapter = adapter
|
||||
|
||||
fusedLocationClient = LocationServices.getFusedLocationProviderClient(requireActivity())
|
||||
|
||||
// Récupérez la position de l'utilisateur et affichez les cinémas à proximité
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package fr.iut.cinecool.fragments
|
||||
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
//import androidx.lifecycle.viewmodel.CreationExtras.Empty.map
|
||||
import com.google.android.gms.maps.CameraUpdateFactory
|
||||
import com.google.android.gms.maps.GoogleMap
|
||||
import com.google.android.gms.maps.SupportMapFragment
|
||||
import com.google.android.gms.maps.model.LatLng
|
||||
import com.google.android.gms.maps.model.MarkerOptions
|
||||
|
||||
class MapFragment : Fragment() {
|
||||
/*
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.fragment_map)
|
||||
|
||||
map = findViewById(R.id.map)
|
||||
|
||||
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)
|
||||
mapFragment.getMapAsync(this)
|
||||
}
|
||||
|
||||
override fun onMapReady(googleMap: GoogleMap) {
|
||||
this.gMap = googleMap
|
||||
|
||||
val mapIndia = LatLng(20.5937, 789629)
|
||||
this.gMap.addMarker(MarkerOptions().position(mapIndia).title("Marker in India"))
|
||||
this.gMap.moveCamera(CameraUpdateFactory.newLatLng(mapIndia))
|
||||
}
|
||||
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
|
||||
}
|
||||
|
||||
// TODO https://youtu.be/JzxjNNCYt_o
|
||||
// https://console.cloud.google.com/apis/credentials?hl=fr&project=upbeat-grammar-382309
|
||||
*/
|
||||
}
|
@ -1,12 +1,7 @@
|
||||
package fr.iut.cinecool
|
||||
package fr.iut.cinecool.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import fr.iut.cinecool.API.Movie
|
||||
|
||||
// import fr.iut.cinecool.databinding.FragmentMovieDetailBinding
|
||||
|
||||
class MovieDetailFragment : Fragment() {
|
@ -1,11 +1,11 @@
|
||||
package fr.iut.cinecool
|
||||
package fr.iut.cinecool.viewModel
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import kotlinx.coroutines.launch
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import fr.iut.cinecool.API.Movie
|
||||
import fr.iut.cinecool.API.Repository
|
||||
import fr.iut.cinecool.API.THMDB.Movie
|
||||
import fr.iut.cinecool.API.THMDB.Repository
|
||||
|
||||
class MovieViewModel : ViewModel() {
|
||||
private val repository = Repository()
|
@ -1,65 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Background"
|
||||
android:layout_width="3000px"
|
||||
android:layout_height="3000px"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/background" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300sp"
|
||||
android:background="@drawable/login_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.821">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="17"
|
||||
android:inputType="textPersonName"
|
||||
android:text="Name"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.49"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.235" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/loginButton"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName"
|
||||
app:srcCompat="@drawable/connection_button" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Logo"
|
||||
android:background="@color/white"
|
||||
android:layout_width="189dp"
|
||||
android:layout_height="199dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/cinema" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cinema_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="Cinema Name" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/movie_recyclerview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="8dp"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintTop_toBottomOf="@id/cinema_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:listitem="@layout/movie_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/cinema_recyclerview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="8dp"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:listitem="@layout/item_cinema" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/map"
|
||||
android:name="com.google.android.gms.maps.SupportMapFragment"
|
||||
tools:context=".MainActivity"/>
|
||||
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cinemaNameTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cinema Name"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/movie_title"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<osmdroid>
|
||||
<preference name="osmdroid.basePath" value="osmdroid" />
|
||||
<preference name="osmdroid.cachePath" value="tiles" />
|
||||
</osmdroid>
|
Loading…
Reference in new issue