mudança ecra de clubes
This commit is contained in:
@@ -9,20 +9,17 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.example.vdcscore.R;
|
||||
import com.example.vdcscore.databinding.FragmentClubDetailBinding;
|
||||
import com.example.vdcscore.models.Club;
|
||||
import com.example.vdcscore.models.Player;
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ClubDetailFragment extends Fragment {
|
||||
|
||||
private FragmentClubDetailBinding binding;
|
||||
@@ -49,13 +46,18 @@ public class ClubDetailFragment extends Fragment {
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
binding.recyclerPlayers.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
|
||||
if (clubId != null) {
|
||||
mDatabase = FirebaseDatabase.getInstance().getReference().child("clubes").child(clubId); // Updated to
|
||||
// 'clubes'
|
||||
mDatabase = FirebaseDatabase.getInstance().getReference().child("clubes").child(clubId);
|
||||
loadClubDetails();
|
||||
}
|
||||
|
||||
binding.btnPlayers.setOnClickListener(v -> {
|
||||
if (clubId != null) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("clubId", clubId);
|
||||
Navigation.findNavController(view).navigate(R.id.action_nav_club_detail_to_nav_club_players, bundle);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void loadClubDetails() {
|
||||
@@ -67,12 +69,11 @@ public class ClubDetailFragment extends Fragment {
|
||||
binding.textDetailClubName.setText(club.getName());
|
||||
binding.textDetailFoundation.setText(String.valueOf(club.getFoundationYear()));
|
||||
binding.textDetailPresident.setText(club.getPresident());
|
||||
binding.textDetailStadium.setText(club.getStadium());
|
||||
binding.textDetailAddress.setText(club.getAddress());
|
||||
// binding.textDetailStadium.setText(club.getStadium()); // Hidden for now
|
||||
|
||||
List<Player> playerList = club.getPlayersList();
|
||||
PlayerAdapter adapter = new PlayerAdapter(playerList);
|
||||
binding.recyclerPlayers.setAdapter(adapter);
|
||||
// Load Logo (Default for now as requested)
|
||||
binding.imageDetailLogo.setImageResource(R.mipmap.ic_launcher_round);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.example.vdcscore.ui.clubs;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.example.vdcscore.databinding.FragmentClubPlayersBinding;
|
||||
import com.example.vdcscore.models.Club;
|
||||
import com.example.vdcscore.models.Player;
|
||||
import com.google.firebase.database.DataSnapshot;
|
||||
import com.google.firebase.database.DatabaseError;
|
||||
import com.google.firebase.database.DatabaseReference;
|
||||
import com.google.firebase.database.FirebaseDatabase;
|
||||
import com.google.firebase.database.ValueEventListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ClubPlayersFragment extends Fragment {
|
||||
|
||||
private FragmentClubPlayersBinding binding;
|
||||
private DatabaseReference mDatabase;
|
||||
private String clubId;
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
clubId = getArguments().getString("clubId");
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
binding = FragmentClubPlayersBinding.inflate(inflater, container, false);
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
binding.recyclerPlayersList.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
binding.progressBarPlayers.setVisibility(View.VISIBLE);
|
||||
|
||||
if (clubId != null) {
|
||||
mDatabase = FirebaseDatabase.getInstance().getReference().child("clubes").child(clubId);
|
||||
loadPlayers();
|
||||
} else {
|
||||
binding.progressBarPlayers.setVisibility(View.GONE);
|
||||
binding.textNoPlayers.setVisibility(View.VISIBLE);
|
||||
binding.textNoPlayers.setText("Erro: Clube não identificado.");
|
||||
}
|
||||
}
|
||||
|
||||
private void loadPlayers() {
|
||||
mDatabase.addListenerForSingleValueEvent(new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(@NonNull DataSnapshot snapshot) {
|
||||
Club club = snapshot.getValue(Club.class);
|
||||
binding.progressBarPlayers.setVisibility(View.GONE);
|
||||
|
||||
if (club != null) {
|
||||
List<Player> playerList = club.getPlayersList();
|
||||
if (playerList != null && !playerList.isEmpty()) {
|
||||
PlayerAdapter adapter = new PlayerAdapter(playerList);
|
||||
binding.recyclerPlayersList.setAdapter(adapter);
|
||||
binding.textNoPlayers.setVisibility(View.GONE);
|
||||
} else {
|
||||
binding.textNoPlayers.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
binding.textNoPlayers.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(@NonNull DatabaseError error) {
|
||||
if (getContext() != null) {
|
||||
Toast.makeText(getContext(), "Failed to load players.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
binding.progressBarPlayers.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
}
|
||||
10
app/src/main/res/drawable/ic_calendar.xml
Normal file
10
app/src/main/res/drawable/ic_calendar.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,4h-1V2h-2v2H8V2H6v2H5c-1.11,0 -1.99,0.9 -1.99,2L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2zM19,20H5V10h14v10zM19,8H5V6h14v2z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_location.xml
Normal file
10
app/src/main/res/drawable/ic_location.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_person.xml
Normal file
10
app/src/main/res/drawable/ic_person.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_soccer.xml
Normal file
10
app/src/main/res/drawable/ic_soccer.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM18.92,8h-2.95c-0.32,-0.96 -0.78,-1.85 -1.35,-2.68 1.69,0.25 3.19,1.21 4.3,2.68zM14.53,7.69c-0.23,-0.69 -0.52,-1.36 -0.86,-1.99 -0.87,-0.3 -1.8,-0.48 -2.77,-0.48 -0.41,0 -0.81,0.04 -1.2,0.1 0.72,0.92 1.25,2.02 1.51,3.22h3.32zM8.33,5.32c-0.58,0.83 -1.04,1.72 -1.35,2.68H4.08c1.11,-1.47 2.61,-2.43 4.25,-2.68zM4.26,16h3.1c0.41,1.12 1.05,2.15 1.87,3.01 -1.97,-0.47 -3.67,-1.55 -4.97,-3.01zM4,12c0,-1.39 0.42,-2.68 1.13,-3.76 0.18,0.07 0.36,0.13 0.53,0.21 0.42,1.38 1.1,2.63 2,3.7 -0.85,1.02 -1.5,2.2 -1.92,3.5 0,0 -0.01,0 -0.01,0 -1.05,-1.03 -1.73,-2.45 -1.73,-4.06zM11.9,16.5c-1.3,0 -2.48,-0.62 -3.26,-1.59 0.73,-0.89 1.27,-1.93 1.57,-3.06h3.76l0,0c0.3,1.13 0.85,2.17 1.56,3.06 -0.78,0.97 -1.96,1.59 -3.26,1.59zM14.77,19.01c0.82,-0.86 1.46,-1.89 1.88,-3.01h3.1c-1.3,1.46 -3.01,2.54 -4.98,3.01zM17.16,11.94c0.42,-1.29 1.07,-2.48 1.92,-3.5 1.04,1.06 1.72,2.49 1.72,4.06 0,0.15 -0.01,0.29 -0.02,0.44 -1.13,-1.47 -2.62,-2.55 -4.26,-2.81 -0.19,0.64 -0.46,1.25 -0.78,1.82 0.5,0.38 0.98,0.81 1.42,1.29v-1.3z"/>
|
||||
</vector>
|
||||
@@ -4,84 +4,229 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:background="@color/white"
|
||||
tools:context=".ui.clubs.ClubDetailFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="24dp">
|
||||
|
||||
<!-- Club Logo (Circular) -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardLogo"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
app:cardCornerRadius="100dp"
|
||||
app:cardElevation="8dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_detail_logo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:padding="0dp"
|
||||
tools:src="@mipmap/ic_launcher_round"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- CLUBE Label -->
|
||||
<TextView
|
||||
android:id="@+id/label_club"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CLUBE:"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#616161"
|
||||
android:layout_marginTop="32dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardLogo"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<!-- Club Name -->
|
||||
<TextView
|
||||
android:id="@+id/text_detail_club_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Inter Freguesias Vila do Conde"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#0D47A1"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_club"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<!-- President Section -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_president"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_detail_club_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_person"
|
||||
app:tint="#455A64"
|
||||
android:background="@drawable/circle_edit_background"
|
||||
android:backgroundTint="#ECEFF1"
|
||||
android:padding="8dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_detail_club_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Club Name"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
android:layout_marginStart="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Fundado em:"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:id="@+id/text_detail_foundation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1900"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
android:text="PRESIDENTE:"
|
||||
android:textSize="12sp"
|
||||
android:textColor="#616161"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Presidente:"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:id="@+id/text_detail_president"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Nome do Presidente"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
tools:text="João Silva"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#263238"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Address Section -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_president"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_location"
|
||||
app:tint="#455A64"
|
||||
android:background="@drawable/circle_edit_background"
|
||||
android:backgroundTint="#ECEFF1"
|
||||
android:padding="8dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Estádio:"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:id="@+id/text_detail_stadium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Nome do Estádio"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
android:text="MORADA:"
|
||||
android:textSize="12sp"
|
||||
android:textColor="#616161"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Morada:"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:id="@+id/text_detail_address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Morada do Clube"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
tools:text="Rua Desportiva 123"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#263238"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Foundation Section -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_foundation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_address"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_calendar"
|
||||
app:tint="#455A64"
|
||||
android:background="@drawable/circle_edit_background"
|
||||
android:backgroundTint="#ECEFF1"
|
||||
android:padding="8dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Jogadores"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
android:text="ANO DE FUNDAÇÃO:"
|
||||
android:textSize="12sp"
|
||||
android:textColor="#616161"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_players"
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/text_detail_foundation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"/>
|
||||
|
||||
tools:text="1995"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#263238"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Stadium Section (Hidden per screenshot but kept in model, or should I show it?)
|
||||
The screenshot doesn't explicitly show Stadium but the code had it.
|
||||
I will hide it for now to match screenshot strictly or add it if plenty space?
|
||||
The user said "appears like this", implies following the screenshot.
|
||||
But previously stadium was shown. I will add it as well for completeness if it fits,
|
||||
or just omit if the screenshot is strict.
|
||||
Screenshot: CLUBE, PRESIDENTE, MORADA, ANO DE FUNDACAO. No Stadium.
|
||||
I will omit Stadium from UI to match unique request "like this".
|
||||
-->
|
||||
|
||||
<!-- Players Button -->
|
||||
<Button
|
||||
android:id="@+id/btn_players"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:text="JOGADORES\n(Ver Lista)"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="12dp"
|
||||
android:backgroundTint="#1976D2"
|
||||
app:icon="@drawable/ic_soccer"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="32dp"
|
||||
app:iconTint="@color/white"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="40dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_foundation"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
android:layout_marginBottom="20dp"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
41
app/src/main/res/layout/fragment_club_players.xml
Normal file
41
app/src/main/res/layout/fragment_club_players.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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="#F5F5F5"
|
||||
tools:context=".ui.clubs.ClubPlayersFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_players_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="8dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_no_players"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sem jogadores inscritos"
|
||||
android:textSize="18sp"
|
||||
android:textColor="#757575"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBarPlayers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -57,6 +57,19 @@
|
||||
<argument
|
||||
android:name="clubId"
|
||||
app:argType="string" />
|
||||
<action
|
||||
android:id="@+id/action_nav_club_detail_to_nav_club_players"
|
||||
app:destination="@id/nav_club_players" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_club_players"
|
||||
android:name="com.example.vdcscore.ui.clubs.ClubPlayersFragment"
|
||||
android:label="Jogadores"
|
||||
tools:layout="@layout/fragment_club_players">
|
||||
<argument
|
||||
android:name="clubId"
|
||||
app:argType="string" />
|
||||
</fragment>
|
||||
|
||||
</navigation>
|
||||
Reference in New Issue
Block a user