Compare commits

...

2 Commits

Author SHA1 Message Date
Alexis1663 f7991a0a0f merge Alexis into master
2 years ago
Alexis1663 85f3c8ce5e ajout dernière modif bouton retour manquant
2 years ago

@ -5,6 +5,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@ -44,6 +45,14 @@ class InfoUserFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val buttonBack: Button = view.findViewById(R.id.backButton)
buttonBack.setOnClickListener {
val fragmentManager = requireActivity().supportFragmentManager
fragmentManager.beginTransaction()
.replace(R.id.homeLayout, MainFragment())
.commit()
}
// Read the SSL certificate for the request
val certificateStream : InputStream = resources.openRawResource(R.raw.sni_cloudflaressl_com)

@ -10,6 +10,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.Button
import android.widget.Spinner
class OptionFragment : Fragment() {
@ -57,6 +58,14 @@ class OptionFragment : Fragment() {
}
}
}
})
})*/
val buttonRetour: Button = view.findViewById(R.id.backButton)
buttonRetour.setOnClickListener {
val fragmentManager = requireActivity().supportFragmentManager
fragmentManager.beginTransaction()
.replace(R.id.homeLayout, MainFragment())
.commit()
}
}
}

@ -2,6 +2,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/backButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Retour"
android:layout_margin="2mm"
/>
<LinearLayout
android:layout_width="match_parent"

@ -7,28 +7,31 @@
tools:context=".OptionFragment">
<LinearLayout
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/backButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/retour"
/>
<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/difficulty"/>
android:gravity="center"
android:text="Difficulty"/>
<Spinner
android:id="@+id/spinnerDifficulty"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="1mm"
/>
<Button
android:id="@+id/backButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Retour"
android:layout_margin="2mm"
/>
</LinearLayout>
</FrameLayout>
Loading…
Cancel
Save