Skip to content
Snippets Groups Projects
Commit 85174370 authored by Aymane Ismail's avatar Aymane Ismail
Browse files

partie3

parent a727f4be
No related branches found
No related tags found
No related merge requests found
...@@ -116,11 +116,19 @@ public class MainActivity extends AppCompatActivity { ...@@ -116,11 +116,19 @@ public class MainActivity extends AppCompatActivity {
TextView limiteDate = findViewById(R.id.date); TextView limiteDate = findViewById(R.id.date);
Date date = candidatures[active].limite; Date date = candidatures[active].limite;
limiteDate.setText(date.toString()); limiteDate.setText(date.toString());
}
public void onClick(View v) {
String url = candidatures[active].web;
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
} }
public void next(View view) { public void next(View view) {
if (active < candidatures.length -1) { if (active < candidatures.length -1) {
active++; active++;
......
...@@ -114,6 +114,19 @@ ...@@ -114,6 +114,19 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.273" /> app:layout_constraintVertical_bias="0.273" />
<Button
android:id="@+id/web"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onClick"
android:text="web"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.922"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.382" />
<Button <Button
android:id="@+id/Prev" android:id="@+id/Prev"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment