Continue binding 🔨
continuous-integration/drone/push Build is passing Details

Masterdetail_Next_Step
Emre KARTAL 2 years ago
parent 8c0b5a4464
commit 284d3b564d

@ -0,0 +1,123 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
</GradleProjectSettings>
</option>
</component>
</project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

@ -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",

@ -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<ImageButton>(R.id.buttonLike)
val buttonExit = view.findViewById<ImageButton>(R.id.buttonExit)
var ImageHeader = view.findViewById<ImageView>(R.id.imageDetail)
var titleHeader = view.findViewById<TextView>(R.id.title)
val imageHeader = view.findViewById<ImageView>(R.id.imageDetail)
val titleHeader = view.findViewById<TextView>(R.id.title)
val dateEnd = view.findViewById<TextView>(R.id.dateEnd)
val dateStart = view.findViewById<TextView>(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
}
}

@ -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
}
}

@ -5,7 +5,7 @@
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="350dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/background"

@ -13,9 +13,9 @@
android:layout_marginTop="30dp"
android:scaleType="centerCrop"
android:src="@drawable/ic_launcher_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.25"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
@ -78,17 +78,17 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/background"
android:gravity="center_vertical"
android:gravity="center"
android:orientation="vertical"
android:paddingHorizontal="10dp">
<TextView
android:id="@+id/dateStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:fontFamily="@font/mulish_bold"
android:maxLines="2"
android:text="2023-04-15"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="20dp" />
@ -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" />
<View
android:layout_width="match_parent"
@ -149,17 +150,17 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/background"
android:gravity="center_vertical"
android:gravity="center"
android:orientation="vertical"
android:paddingHorizontal="10dp">
<TextView
android:id="@+id/dateEnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:fontFamily="@font/mulish_bold"
android:maxLines="3"
android:text="2023-12-15"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="20dp" />

@ -98,7 +98,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/listRecentsMatches"
android:layout_width="wrap_content"
android:layout_height="500dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewRecentMatches"

Loading…
Cancel
Save