Commit a55d4aaf by Jllamas02

HAL

parent 49a09a81
......@@ -33,6 +33,7 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
......@@ -49,4 +50,8 @@ dependencies {
implementation 'com.squareup.okhttp3:logging-interceptor:4.6.0'
implementation 'com.google.okhttp:okhttp:20120626'
implementation 'com.squareup.okio:okio:2.6.0'
//Dialogos
implementation 'com.google.android.material:material:1.2.0-alpha06'
//Search
implementation 'com.github.mancj:MaterialSearchBar:0.8.5'
}
......@@ -7,7 +7,7 @@
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
......
///////////////////////
///////////////////////
Para que funcione correctamente, se debe cambiar el DoubleArray por List<Double>, el problema es que da error al ejecutar,
problema el cual no pude resolver, muy aparte de eso, la app está muy incompleta, el uso de APIs me costó bastante y
se notó ya por el erro anterior nombrado...
//////////////////////
\ No newline at end of file
......@@ -12,7 +12,7 @@ interface ApiMarker {
val instance:MarcadorApi by lazy{
val builder_pedido = Retrofit.Builder()
.baseUrl("https://productospy.org/api/vendors")
.baseUrl("https://productospy.org/api/vendors/")
.addConverterFactory(GsonConverterFactory.create())
val client = OkHttpClient.Builder()
......
package com.example.pruebamaps.Menu
data class Coordenadas (val type: String, val features: List<Feature>)
data class Feature (val type: FeatureType, val geometry: Geometry, val properties: Properties)
data class Geometry (val type: GeometryType, val coordinates: List<Double>)
data class Geometry (val type: GeometryType, val coordinates: DoubleArray)
enum class GeometryType { Point }
data class Properties (val nombre: String, val contacto: String, val comentarios: String)
data class Properties (val nombre: String, val contacto: String, val comentarios: String, val productos: List<Productos>)
data class Productos (val product_name: String, val product_type: String)
enum class FeatureType { Feature }
\ No newline at end of file
enum class FeatureType { Feature }
package com.example.pruebamaps.Menu
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.example.pruebamaps.R
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
/**
* A simple [Fragment] subclass.
* Use the [FragmentDetalle.newInstance] factory method to
* create an instance of this fragment.
*/
class FragmentDetalle : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_detalle, container, false)
}
companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentDetalle.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
FragmentDetalle().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
}
}
}
package com.example.pruebamaps.Menu
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.example.pruebamaps.R
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
/**
* A simple [Fragment] subclass.
* Use the [FragmentFav.newInstance] factory method to
* create an instance of this fragment.
*/
class FragmentFav : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_fav, container, false)
}
companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentFav.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
FragmentFav().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
}
}
}
package com.example.pruebamaps.Menu
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.example.pruebamaps.R
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
/**
* A simple [Fragment] subclass.
* Use the [FragmentFiltro.newInstance] factory method to
* create an instance of this fragment.
*/
class FragmentFiltro : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_filtro, container, false)
}
companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentFiltro.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
FragmentFiltro().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
}
}
}
package com.example.pruebamaps.Menu
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.example.pruebamaps.R
import kotlinx.android.synthetic.main.fragment_info.*
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
/**
* A simple [Fragment] subclass.
* Use the [FragmentInfo.newInstance] factory method to
* create an instance of this fragment.
*/
class FragmentInfo : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_info, container, false)
}
companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment FragmentInfo.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
FragmentInfo().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
}
}
}
......@@ -23,7 +23,7 @@ interface MarcadorApi {
companion object {
val stackClient by lazy { MarcadorApi.invoke("https://productospy.org/api/vendors/") }
val stackClient by lazy { MarcadorApi("https://productospy.org/api/vendors/") }
private val loggingInterceptor = HttpLoggingInterceptor().apply {
......@@ -34,9 +34,7 @@ interface MarcadorApi {
val client = OkHttpClient.Builder().apply {
/**addNetworkInterceptor(StethoInterceptor()) */
addNetworkInterceptor(loggingInterceptor)
connectTimeout(10, java.util.concurrent.TimeUnit.MINUTES)
readTimeout(10, java.util.concurrent.TimeUnit.MINUTES)
writeTimeout(10, java.util.concurrent.TimeUnit.MINUTES)
}.build()
return Retrofit.Builder()
......
package com.example.pruebamaps.Menu
import android.content.Intent
import android.content.pm.PackageManager
import android.location.Location
import android.net.Uri
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.text.Editable
import android.text.TextWatcher
import android.widget.ArrayAdapter
import android.widget.ListView
import android.widget.Toast
import androidx.annotation.RequiresApi
import androidx.core.app.ActivityCompat
......@@ -20,11 +26,14 @@ import com.google.android.gms.maps.model.BitmapDescriptorFactory
import com.google.android.gms.maps.model.LatLng
import com.google.android.gms.maps.model.Marker
import com.google.android.gms.maps.model.MarkerOptions
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.mancj.materialsearchbar.MaterialSearchBar
import kotlinx.android.synthetic.main.activity_principal.*
import kotlinx.android.synthetic.main.fragment_info.*
import kotlinx.android.synthetic.main.fragment_info.view.*
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
class Principal : AppCompatActivity(), OnMapReadyCallback, GoogleMap.OnMarkerClickListener {
......@@ -32,10 +41,23 @@ class Principal : AppCompatActivity(), OnMapReadyCallback, GoogleMap.OnMarkerCli
private lateinit var lastLocation : Location
private var selectedMarker:Marker?=null
companion object {
private const val LOCATION_PERMISSION_REQUEST_CODE = 1
}
private val markerClickListener = object: GoogleMap.OnMarkerClickListener{
override fun onMarkerClick(marker: Marker?):Boolean{
if(marker == selectedMarker){
selectedMarker=null
return true
}
selectedMarker =marker
return false
}
}
override fun onMarkerClick(p0: Marker?) = false
private lateinit var map: GoogleMap
......@@ -43,30 +65,89 @@ class Principal : AppCompatActivity(), OnMapReadyCallback, GoogleMap.OnMarkerCli
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_principal)
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
val mapFragment = supportFragmentManager
.findFragmentById(R.id.map) as SupportMapFragment
mapFragment.getMapAsync(this)
val lv = findViewById(R.id.listview) as ListView
val searchBar = findViewById(R.id.editText) as MaterialSearchBar
searchBar.setHint("Buscar Producto> ")
searchBar.setSpeechMode(true)
searchBar.addTextChangeListener(object : TextWatcher {
override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {
}
override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {
//SEARCH FILTER
}
override fun afterTextChanged(editable: Editable) {
}
})
fusedLocationClient = LocationServices.getFusedLocationProviderClient(this)
txt_filtro.setOnClickListener {
val dialog = BottomSheetDialog(this@Principal)
val view = layoutInflater.inflate(R.layout.fragment_filtro, null)
dialog.setContentView(view)
dialog.show()
}
imgfav.setOnClickListener {
val dialog = BottomSheetDialog(this@Principal)
val view = layoutInflater.inflate(R.layout.fragment_fav,null)
dialog.setContentView(view)
dialog.show()
}
imginfo.setOnClickListener {
val dialog = BottomSheetDialog(this@Principal)
val view = layoutInflater.inflate(R.layout.fragment_info,null)
dialog.setContentView(view)
dialog.show()
view.txt_terminos.setOnClickListener {
val url = "https://productospy.org/disclaimer"
val i = Intent(Intent.ACTION_VIEW)
i.data = Uri.parse(url)
startActivity(i)
}
view.txt_vendedor.setOnClickListener {
val url = "https://productospy.org/vendor"
val i = Intent(Intent.ACTION_VIEW)
i.data = Uri.parse(url)
startActivity(i)
}
view.txt_code.setOnClickListener {
val url = "https://phoebe.roshka.com/gitlab/"
val i = Intent(Intent.ACTION_VIEW)
i.data = Uri.parse(url)
startActivity(i)
}
}
}
/**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just add a marker near Sydney, Australia.
* If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app.
*/
override fun onMapReady(googleMap: GoogleMap) {
map = googleMap
map.setOnMarkerClickListener(this)
setUpMap()
map.setOnMarkerClickListener(this)
map.uiSettings.isZoomControlsEnabled = true
MarcadorApi.stackClient.getMarker(15, 0).enqueue(
object: Callback<Coordenadas> {
override fun onFailure(call: Call<Coordenadas>, t: Throwable) {
......@@ -76,29 +157,24 @@ class Principal : AppCompatActivity(), OnMapReadyCallback, GoogleMap.OnMarkerCli
@RequiresApi(Build.VERSION_CODES.O)
override fun onResponse(call: Call<Coordenadas>, response: Response<Coordenadas>) {
if (response.isSuccessful) {
val listaobjetos = response.body()
val objetosmarkers = listaobjetos!!.features
val mark = response.body()
val coor = mark!!.features
for( item in objetosmarkers.indices ){
for( item in coor.indices ){
var pos =mark.features[item].geometry.coordinates
var nombre=mark.features[item].properties.nombre
var name=listaobjetos.features[item].properties.nombre
var contacto=listaobjetos.features[item].properties.contacto
var comentarios=listaobjetos.features[item].properties.comentarios
var lat =listaobjetos.features[item].geometry.coordinates
map.addMarker(
MarkerOptions()
.position(LatLng(lat[1],lat[0]))
.title(name)
.snippet(contacto)
.icon(
BitmapDescriptorFactory.fromResource(R.drawable.imgmarkernormal)
.position(LatLng(pos[1],pos[0]))
.title(nombre)
.icon(BitmapDescriptorFactory.fromResource(R.drawable.imgmarkernormal)
)
)
map.setOnMarkerClickListener { marker ->
var marcador = marker.snippet
Toast.makeText(this@Principal, "Este es el marker $marcador", Toast.LENGTH_SHORT).show()
var marcador = marker.position
true
}
......@@ -106,33 +182,32 @@ class Principal : AppCompatActivity(), OnMapReadyCallback, GoogleMap.OnMarkerCli
}else{
Toast.makeText(this@Principal, "Fallo", Toast.LENGTH_SHORT).show()
Toast.makeText(this@Principal, "Error", Toast.LENGTH_SHORT).show()
}
}
}
)
setUpMap()
}
private fun setUpMap() {
if (ActivityCompat.checkSelfPermission(this,
android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
if(ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){
ActivityCompat.requestPermissions(this,
arrayOf(android.Manifest.permission.ACCESS_FINE_LOCATION), LOCATION_PERMISSION_REQUEST_CODE)
arrayOf(android.Manifest.permission.ACCESS_FINE_LOCATION),LOCATION_PERMISSION_REQUEST_CODE)
return
}
map.isMyLocationEnabled = true
map.isMyLocationEnabled= true
fusedLocationClient.lastLocation.addOnSuccessListener(this) { location ->
fusedLocationClient.lastLocation.addOnSuccessListener(this){ location ->
if (location != null) {
if(location != null){
lastLocation = location
val currentLatLng = LatLng(location.latitude, location.longitude)
val currentLatLong = LatLng(location.latitude, location.longitude)
map.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLong, 18f))
map.animateCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, 6f))
}
}
}
}
//TY4A.
\ No newline at end of file
......@@ -12,7 +12,7 @@
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="580dp"
android:layout_height="630dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
......@@ -20,7 +20,7 @@
<View
android:id="@+id/arriba2"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_height="100dp"
android:background="#ffffff"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -30,7 +30,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TODOS los Productos"
android:textSize="20sp"
android:textSize="15sp"
android:textColor="@color/Blue"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......@@ -42,33 +42,35 @@
/>
<ImageButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imgfav"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:background="#ffffff"
android:scaleType="fitCenter"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/btnfav"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="10dp"/>
app:srcCompat="@drawable/btnfav" />
<ImageButton
android:id="@+id/imageButton2"
android:background="#ffffff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toStartOf="@+id/imageButton"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/btninfo"
android:id="@+id/imginfo"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"/>
android:background="#ffffff"
android:scaleType="fitCenter"
app:layout_constraintEnd_toStartOf="@+id/imgfav"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/btninfo" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="15dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
......@@ -80,30 +82,38 @@
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="20dp"
android:text="Productos PY"
android:textColor="@color/Blue"
android:textSize="30sp"
android:textSize="15sp"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="30dp"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"/>
app:layout_constraintTop_toTopOf="parent" />
<EditText
<com.mancj.materialsearchbar.MaterialSearchBar
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginStart="30dp"
android:layout_marginLeft="30dp"
android:layout_marginEnd="30dp"
android:layout_marginRight="30dp"
android:background="#F6F6F6"
android:ems="10"
android:inputType="textPersonName"
android:text="Name"
android:layout_marginStart="30dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginEnd="30dp"
app:layout_constraintBottom_toTopOf="@+id/map"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" />
<ListView
android:id="@+id/listview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/editText"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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=".Menu.FragmentDetalle"
android:background="#ffffff">
<TextView
android:id="@+id/txt_nomdetalle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:textColor="@color/Blue"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/txt_descdetalle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:textColor="#000000"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_nomdetalle" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="50dp"
android:text="Agregar como favorito"
android:textColor="@color/cardview_dark_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ImageButton
android:id="@+id/imageButton"
android:layout_width="49dp"
android:layout_height="53dp"
android:layout_marginBottom="20dp"
android:src="@drawable/imgfavdetalle"
app:layout_constraintBottom_toTopOf="@+id/textView7"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/btn_llegar"
android:layout_width="304dp"
android:layout_height="wrap_content"
android:layout_marginBottom="80dp"
android:background="@drawable/button"
android:text="CÓMO LLEGAR"
app:layout_constraintBottom_toTopOf="@+id/imageButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/btn_contacto"
android:layout_width="304dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:background="@drawable/button"
android:text="CONTACTO"
app:layout_constraintBottom_toTopOf="@+id/btn_llegar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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=".Menu.FragmentFav"
android:background="#ffffff">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Mis favoritos"
android:textColor="@color/Blue"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:src="@drawable/btnfav"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="409dp"
android:layout_height="675dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
android:background="#dbdbdb"
tools:context=".Menu.FragmentFiltro">
<CheckBox
android:id="@+id/cb_comidados"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Comida dulce/salada"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:layout_constraintTop_toTopOf="@+id/guideline10" />
<TextView
android:id="@+id/txt_filtro"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Que deseas encontrar:"
android:textColor="#000000"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/cb_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:checked="true"
android:text="Todos los productos"
android:textColor="#000000"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_filtro" />
<CheckBox
android:id="@+id/cb_frutas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="Frutas"
android:textColor="#000000"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent" />
<CheckBox
android:id="@+id/cb_agua"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginEnd="100dp"
android:layout_marginRight="100dp"
android:text="Agua"
android:textColor="#000000"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:layout_constraintTop_toBottomOf="@+id/cb_all"
app:layout_constraintVertical_bias="1.0" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="162dp" />
<CheckBox
android:id="@+id/cb_gel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Alcohol en Gel"
android:textColor="#000000"
app:layout_constraintBottom_toTopOf="@id/guideline4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cb_frutas" />
<CheckBox
android:id="@+id/cb_rec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Alcohol Rectificado"
android:textColor="#000000"
app:layout_constraintBottom_toTopOf="@+id/guideline4"
app:layout_constraintStart_toStartOf="@+id/guideline5" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="204dp" />
<CheckBox
android:id="@+id/cb_hipoclorito"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Hipoclorito de Sodio"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cb_gel" />
<CheckBox
android:id="@+id/cb_tapabocas"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginEnd="64dp"
android:layout_marginRight="64dp"
android:text="Tapabocas"
android:textColor="#000000"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:layout_constraintTop_toTopOf="@+id/guideline4" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="244dp" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="246dp" />
<CheckBox
android:id="@+id/cb_verduras"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Verduras"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline6" />
<CheckBox
android:id="@+id/cb_papel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Papel"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:layout_constraintTop_toBottomOf="@+id/cb_tapabocas" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="288dp" />
<CheckBox
android:id="@+id/cb_toalla"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Toalla"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline7" />
<CheckBox
android:id="@+id/cb_jabon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Jabón de Coco"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:layout_constraintTop_toTopOf="@+id/guideline7" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="330dp" />
<CheckBox
android:id="@+id/cb_guantes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Guantes"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline8" />
<CheckBox
android:id="@+id/cb_cocido"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Cocido Quemado"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:layout_constraintTop_toTopOf="@+id/guideline8" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="372dp" />
<CheckBox
android:id="@+id/cb_canasta"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Canasta Básica"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline9" />
<CheckBox
android:id="@+id/cb_costurero"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Costurero/a"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:layout_constraintTop_toTopOf="@+id/guideline9" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="414dp" />
<CheckBox
android:id="@+id/cb_servicios"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Servicios"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline10" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="454dp" />
<CheckBox
android:id="@+id/cb_negocios"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Negocios"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline11" />
<CheckBox
android:id="@+id/cb_ropa"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Ropa, vestimenta"
android:textColor="#000000"
app:layout_constraintStart_toStartOf="@+id/guideline5"
app:layout_constraintTop_toTopOf="@+id/guideline11" />
<ImageButton
android:id="@+id/imgcerrar"
android:layout_width="40dp"
android:layout_height="40dp"
android:scaleType="centerCrop"
android:src="@drawable/imgcerrar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
android:background="#ffffff"
tools:context=".Menu.FragmentInfo">
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="52dp"
android:src="@drawable/imglogogrande"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/txt_Productos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Productos PY"
android:textColor="@color/Blue"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
<TextView
android:id="@+id/txt_terminos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:text="Términos de Uso"
android:textColor="@color/Blue"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_Productos" />
<TextView
android:id="@+id/txt_vendedor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Registrarse como Vendedor"
android:textColor="@color/Blue"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_terminos" />
<TextView
android:id="@+id/textView4"
android:layout_width="252dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="Está APP fue desarollada por José"
android:textColor="#000000"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.503"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_vendedor" />
<TextView
android:id="@+id/txt_roshka"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Roshka S.A."
android:textColor="#000000"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
<TextView
android:id="@+id/textView6"
android:layout_width="271dp"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:gravity="center"
android:text="El código fuente de está aplcación está disponible bajo la licencia GPLv3"
android:textColor="@color/cardview_dark_background"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_roshka" />
<TextView
android:id="@+id/txt_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Resvisá el código en GitHub"
android:textColor="@color/Blue"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.493"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView6"
app:layout_constraintVertical_bias="0.061" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<resources>
<string name="app_name">PruebaMaps</string>
<string name="title_activity_principal">Map</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
......@@ -20,7 +20,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment