diff --git a/src/.idea/codeStyles/Project.xml b/src/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..7643783 --- /dev/null +++ b/src/.idea/codeStyles/Project.xml @@ -0,0 +1,123 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/.idea/codeStyles/codeStyleConfig.xml b/src/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/src/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/src/app/.idea/.gitignore b/src/app/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/src/app/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/src/app/.idea/gradle.xml b/src/app/.idea/gradle.xml new file mode 100644 index 0000000..b898c0a --- /dev/null +++ b/src/app/.idea/gradle.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/src/app/.idea/misc.xml b/src/app/.idea/misc.xml new file mode 100644 index 0000000..6ff4d26 --- /dev/null +++ b/src/app/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/app/.idea/vcs.xml b/src/app/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/src/app/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/app/src/main/java/uca/iut/clermont/data/StubData.kt b/src/app/src/main/java/uca/iut/clermont/data/StubData.kt index ff47bc5..bff247b 100644 --- a/src/app/src/main/java/uca/iut/clermont/data/StubData.kt +++ b/src/app/src/main/java/uca/iut/clermont/data/StubData.kt @@ -343,7 +343,7 @@ class StubData : DataManager() { 2, "FC Barcelona", "BAR", - "https://upload.wikimedia.org/wikipedia/fr/thumb/a/a1/Logo_FC_Barcelona.svg/1200px-Logo_FC_Barcelona.svg.png", + "https://crests.football-data.org/109.svg", "Carrer d'Aristides Maillol, s/n, 08028 Barcelona, Spain", "https://www.fcbarcelona.com/", "1899", diff --git a/src/app/src/main/java/uca/iut/clermont/view/DetailFragment.kt b/src/app/src/main/java/uca/iut/clermont/view/DetailFragment.kt index 1207f2b..b92e5c0 100644 --- a/src/app/src/main/java/uca/iut/clermont/view/DetailFragment.kt +++ b/src/app/src/main/java/uca/iut/clermont/view/DetailFragment.kt @@ -13,6 +13,7 @@ import androidx.navigation.fragment.findNavController import com.bumptech.glide.Glide import uca.iut.clermont.R import uca.iut.clermont.model.Competition +import java.text.SimpleDateFormat class DetailFragment : Fragment() { @@ -38,8 +39,10 @@ class DetailFragment : Fragment() { private fun initializeView(view: View) { val button = view.findViewById(R.id.buttonLike) val buttonExit = view.findViewById(R.id.buttonExit) - var ImageHeader = view.findViewById(R.id.imageDetail) - var titleHeader = view.findViewById(R.id.title) + val imageHeader = view.findViewById(R.id.imageDetail) + val titleHeader = view.findViewById(R.id.title) + val dateEnd = view.findViewById(R.id.dateEnd) + val dateStart = view.findViewById(R.id.dateStart) buttonExit.setOnClickListener { findNavController().navigate(R.id.favoriteFragment) @@ -53,9 +56,22 @@ class DetailFragment : Fragment() { Glide.with(view.context) .load(competition.emblem) .error(R.drawable.imagenotfound) - .into(ImageHeader) + .into(imageHeader) titleHeader.text = competition.name + var date = competition.currentSeason.endDate + + var formatter = SimpleDateFormat("dd-MM-yyyy") + var formattedDate = formatter.format(date.time) + + dateEnd.text = formattedDate + + date = competition.currentSeason.startDate + + formatter = SimpleDateFormat("dd-MM-yyyy") + formattedDate = formatter.format(date.time) + + dateStart.text = formattedDate } } \ No newline at end of file diff --git a/src/app/src/main/java/uca/iut/clermont/view/SampleGlideModule.kt b/src/app/src/main/java/uca/iut/clermont/view/SampleGlideModule.kt new file mode 100644 index 0000000..b2138de --- /dev/null +++ b/src/app/src/main/java/uca/iut/clermont/view/SampleGlideModule.kt @@ -0,0 +1,13 @@ +package uca.iut.clermont.view + +import com.bumptech.glide.annotation.GlideModule +import com.bumptech.glide.module.AppGlideModule + +@GlideModule +class SampleGlideModule : AppGlideModule() { + + override fun isManifestParsingEnabled(): Boolean { + return false + } + +} \ No newline at end of file diff --git a/src/app/src/main/res/layout/cellule_match.xml b/src/app/src/main/res/layout/cellule_match.xml index 4356ced..9670074 100644 --- a/src/app/src/main/res/layout/cellule_match.xml +++ b/src/app/src/main/res/layout/cellule_match.xml @@ -5,7 +5,7 @@ android:layout_height="wrap_content"> @@ -114,6 +114,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:gravity="center" android:orientation="vertical" android:paddingHorizontal="10dp"> @@ -125,7 +126,7 @@ android:maxLines="1" android:text="14" android:textColor="@color/black" - android:textSize="20dp" /> + android:textSize="26dp" /> diff --git a/src/app/src/main/res/layout/fragment_home.xml b/src/app/src/main/res/layout/fragment_home.xml index a56f969..531ea9b 100644 --- a/src/app/src/main/res/layout/fragment_home.xml +++ b/src/app/src/main/res/layout/fragment_home.xml @@ -98,7 +98,7 @@