adicao da taça do inter freguesias , tenho que fazer alterações , ainda so mostra dados , quero organizalos !!!!!
This commit is contained in:
@@ -69,7 +69,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
// Passing each menu ID as a set of Ids because each
|
||||
// menu should be considered as top level destinations.
|
||||
mAppBarConfiguration = new AppBarConfiguration.Builder(
|
||||
R.id.nav_home, R.id.nav_gallery, R.id.nav_definicoes,
|
||||
R.id.nav_home, R.id.nav_gallery, R.id.nav_cup, R.id.nav_definicoes,
|
||||
R.id.nav_live_games, R.id.nav_clubs, R.id.nav_top_scorers, R.id.nav_news)
|
||||
.setOpenableLayout(drawer)
|
||||
.build();
|
||||
|
||||
164
app/src/main/java/com/example/vdcscore/ui/cup/CupFragment.java
Normal file
164
app/src/main/java/com/example/vdcscore/ui/cup/CupFragment.java
Normal file
@@ -0,0 +1,164 @@
|
||||
package com.example.vdcscore.ui.cup;
|
||||
|
||||
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.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.example.vdcscore.R;
|
||||
import com.example.vdcscore.databinding.FragmentCupBinding;
|
||||
import com.example.vdcscore.ui.gallery.Match;
|
||||
import com.example.vdcscore.ui.gallery.Matchday;
|
||||
import com.example.vdcscore.ui.gallery.MatchesAdapter;
|
||||
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.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class CupFragment extends Fragment {
|
||||
|
||||
private FragmentCupBinding binding;
|
||||
private MatchesAdapter adapter;
|
||||
private DatabaseReference mDatabase;
|
||||
private List<Matchday> phasesList = new ArrayList<>(); // Reusing Matchday as generalized 'Phase'
|
||||
private int currentPhaseIndex = 0;
|
||||
private String currentCategory = "seniores";
|
||||
private ValueEventListener currentListener;
|
||||
|
||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||
ViewGroup container, Bundle savedInstanceState) {
|
||||
|
||||
binding = FragmentCupBinding.inflate(inflater, container, false);
|
||||
View root = binding.getRoot();
|
||||
|
||||
// Initialize RecyclerView with reused MatchesAdapter
|
||||
adapter = new MatchesAdapter();
|
||||
binding.recyclerPhases.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
binding.recyclerPhases.setAdapter(adapter);
|
||||
|
||||
// Setup Toggle Group
|
||||
binding.toggleGroupCategory.addOnButtonCheckedListener((group, checkedId, isChecked) -> {
|
||||
if (isChecked) {
|
||||
if (checkedId == R.id.btn_seniores) {
|
||||
currentCategory = "seniores";
|
||||
} else if (checkedId == R.id.btn_juniores) {
|
||||
currentCategory = "juniores";
|
||||
}
|
||||
fetchPhases();
|
||||
}
|
||||
});
|
||||
|
||||
// Setup Navigation Buttons
|
||||
binding.btnPrevPhase.setOnClickListener(v -> {
|
||||
if (currentPhaseIndex > 0) {
|
||||
currentPhaseIndex--;
|
||||
updateUI();
|
||||
}
|
||||
});
|
||||
|
||||
binding.btnNextPhase.setOnClickListener(v -> {
|
||||
if (currentPhaseIndex < phasesList.size() - 1) {
|
||||
currentPhaseIndex++;
|
||||
updateUI();
|
||||
}
|
||||
});
|
||||
|
||||
// Initial Fetch
|
||||
fetchPhases();
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
private void fetchPhases() {
|
||||
if (mDatabase != null && currentListener != null) {
|
||||
mDatabase.removeEventListener(currentListener);
|
||||
}
|
||||
|
||||
binding.textPhaseName.setText("Carregando...");
|
||||
mDatabase = FirebaseDatabase.getInstance().getReference("taça").child(currentCategory);
|
||||
|
||||
currentListener = new ValueEventListener() {
|
||||
@Override
|
||||
public void onDataChange(@NonNull DataSnapshot snapshot) {
|
||||
if (binding == null) return;
|
||||
|
||||
phasesList.clear();
|
||||
for (DataSnapshot phaseSnap : snapshot.getChildren()) {
|
||||
String name = phaseSnap.getKey();
|
||||
List<Match> matches = new ArrayList<>();
|
||||
|
||||
for (DataSnapshot matchSnap : phaseSnap.getChildren()) {
|
||||
Match match = matchSnap.getValue(Match.class);
|
||||
if (match != null) {
|
||||
match.setId(matchSnap.getKey());
|
||||
matches.add(match);
|
||||
}
|
||||
}
|
||||
|
||||
if (!matches.isEmpty()) {
|
||||
phasesList.add(new Matchday(name, matches));
|
||||
}
|
||||
}
|
||||
|
||||
// Sort alphabetically/chronologically as they are phrases like "1ª Fase", "Oitavos", etc.
|
||||
Collections.sort(phasesList, (p1, p2) -> p1.getName().compareTo(p2.getName()));
|
||||
|
||||
if (phasesList.isEmpty()) {
|
||||
binding.textPhaseName.setText("Sem fases");
|
||||
adapter.setMatches(new ArrayList<>());
|
||||
} else {
|
||||
if (currentPhaseIndex >= phasesList.size()) {
|
||||
currentPhaseIndex = phasesList.size() - 1;
|
||||
}
|
||||
// In case initial load or filter swap, bound index.
|
||||
if (currentPhaseIndex < 0) currentPhaseIndex = 0;
|
||||
updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(@NonNull DatabaseError error) {
|
||||
if (getContext() != null) {
|
||||
Toast.makeText(getContext(), "Erro ao carregar taça: " + error.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
mDatabase.addValueEventListener(currentListener);
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
if (phasesList.isEmpty()) return;
|
||||
|
||||
Matchday currentPhase = phasesList.get(currentPhaseIndex);
|
||||
binding.textPhaseName.setText(currentPhase.getName());
|
||||
adapter.setMatches(currentPhase.getMatches());
|
||||
|
||||
// Enable/Disable navigation buttons
|
||||
binding.btnPrevPhase.setEnabled(currentPhaseIndex > 0);
|
||||
binding.btnNextPhase.setEnabled(currentPhaseIndex < phasesList.size() - 1);
|
||||
|
||||
// Visual feedback
|
||||
binding.btnPrevPhase.setAlpha(currentPhaseIndex > 0 ? 1.0f : 0.3f);
|
||||
binding.btnNextPhase.setAlpha(currentPhaseIndex < phasesList.size() - 1 ? 1.0f : 0.3f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (mDatabase != null && currentListener != null) {
|
||||
mDatabase.removeEventListener(currentListener);
|
||||
}
|
||||
binding = null;
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@ public class Match {
|
||||
private String id;
|
||||
private String homeName;
|
||||
private String awayName;
|
||||
private Integer homeScore;
|
||||
private Integer awayScore;
|
||||
private Object homeScore;
|
||||
private Object awayScore;
|
||||
private String date;
|
||||
private String time;
|
||||
private String homeLogo;
|
||||
@@ -87,22 +87,22 @@ public class Match {
|
||||
}
|
||||
|
||||
@PropertyName("home_golos")
|
||||
public Integer getHomeScore() {
|
||||
public Object getHomeScore() {
|
||||
return homeScore;
|
||||
}
|
||||
|
||||
@PropertyName("home_golos")
|
||||
public void setHomeScore(Integer homeScore) {
|
||||
public void setHomeScore(Object homeScore) {
|
||||
this.homeScore = homeScore;
|
||||
}
|
||||
|
||||
@PropertyName("away_golos")
|
||||
public Integer getAwayScore() {
|
||||
public Object getAwayScore() {
|
||||
return awayScore;
|
||||
}
|
||||
|
||||
@PropertyName("away_golos")
|
||||
public void setAwayScore(Integer awayScore) {
|
||||
public void setAwayScore(Object awayScore) {
|
||||
this.awayScore = awayScore;
|
||||
}
|
||||
|
||||
|
||||
5
app/src/main/res/color/nav_item_bg.xml
Normal file
5
app/src/main/res/color/nav_item_bg.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="@color/brand_dim" />
|
||||
<item android:color="@android:color/transparent" />
|
||||
</selector>
|
||||
5
app/src/main/res/color/nav_item_tint.xml
Normal file
5
app/src/main/res/color/nav_item_tint.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="@color/brand" />
|
||||
<item android:color="@color/text_2" />
|
||||
</selector>
|
||||
5
app/src/main/res/color/toggle_bg_color.xml
Normal file
5
app/src/main/res/color/toggle_bg_color.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="@color/brand" />
|
||||
<item android:color="@color/bg_surface" />
|
||||
</selector>
|
||||
5
app/src/main/res/color/toggle_text_color.xml
Normal file
5
app/src/main/res/color/toggle_text_color.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="@color/bg_base" />
|
||||
<item android:color="@color/text_2" />
|
||||
</selector>
|
||||
5
app/src/main/res/drawable-night/bg_nav_header_wave.xml
Normal file
5
app/src/main/res/drawable-night/bg_nav_header_wave.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/bg_surface" />
|
||||
</shape>
|
||||
14
app/src/main/res/drawable/bg_nav_header_wave.xml
Normal file
14
app/src/main/res/drawable/bg_nav_header_wave.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="300dp"
|
||||
android:height="160dp"
|
||||
android:viewportWidth="300"
|
||||
android:viewportHeight="160">
|
||||
<!-- Background container filling (standard surface) -->
|
||||
<path
|
||||
android:fillColor="@color/bg_surface"
|
||||
android:pathData="M0,0h300v160h-300z" />
|
||||
<!-- Wave header section using our Elevated Dark Background -->
|
||||
<path
|
||||
android:fillColor="#111827"
|
||||
android:pathData="M0,0 L300,0 L300,120 C200,160 100,100 0,140 Z" />
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/brand_icon_bg.xml
Normal file
15
app/src/main/res/drawable/brand_icon_bg.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="38dp"
|
||||
android:height="38dp"
|
||||
android:viewportWidth="38"
|
||||
android:viewportHeight="38">
|
||||
<!-- Rounded Background: radius 10dp -->
|
||||
<path
|
||||
android:fillColor="@color/brand"
|
||||
android:pathData="M 6,0 A 6,6 0 0 0 0,6 L 0,32 A 6,6 0 0 0 6,38 L 32,38 A 6,6 0 0 0 38,32 L 38,6 A 6,6 0 0 0 32,0 Z" />
|
||||
<!-- Lightning Bolt Icon inside -->
|
||||
<path
|
||||
android:fillColor="@color/bg_base"
|
||||
android:pathData="M21.5,8 L11.5,19.5 L17.5,19.5 L14.5,30 L26.5,17.5 L19.5,17.5 Z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_cup.xml
Normal file
10
app/src/main/res/drawable/ic_cup.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="#FFFFFF">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,5h-2L17,3L7,3v2L5,5c-1.1,0 -2,0.9 -2,2v1c0,2.55 1.92,4.63 4.39,4.94C8.09,14.23 9.79,15.34 11,15.82L11,19L8,19v2h8v-2h-3v-3.18c1.21,-0.48 2.91,-1.59 3.61,-2.88C19.08,12.63 21,10.55 21,8L21,7c0,-1.1 -0.9,-2 -2,-2zM5,8L5,7h2v3.82C5.84,10.4 5,9.3 5,8zM19,8c0,1.3 -0.84,2.4 -2,2.82L17,7h2v1z"/>
|
||||
</vector>
|
||||
21
app/src/main/res/drawable/ic_nav_classification.xml
Normal file
21
app/src/main/res/drawable/ic_nav_classification.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<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:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M4,6a2,2 0,0 1,2 -2h12a2,2 0,0 1,2 2v2a2,2 0,0 1,-2 2h-12a2,2 0,0 1,-2 -2z" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M4,14a2,2 0,0 1,2 -2h12a2,2 0,0 1,2 2v2a2,2 0,0 1,-2 2h-12a2,2 0,0 1,-2 -2z" />
|
||||
</vector>
|
||||
14
app/src/main/res/drawable/ic_nav_clubs.xml
Normal file
14
app/src/main/res/drawable/ic_nav_clubs.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<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:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M12,3a12,12 0,0 0,8.5 3a12,12 0,0 1,-8.5 15a12,12 0,0 1,-8.5 -15a12,12 0,0 0,8.5 -3" />
|
||||
</vector>
|
||||
42
app/src/main/res/drawable/ic_nav_jornadas.xml
Normal file
42
app/src/main/res/drawable/ic_nav_jornadas.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<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:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M4,7a2,2 0,0 1,2 -2h12a2,2 0,0 1,2 2v12a2,2 0,0 1,-2 2h-12a2,2 0,0 1,-2 -2v-12" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M16,3v4" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M8,3v4" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M4,11h16" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M8,15h2v2h-2z" />
|
||||
</vector>
|
||||
14
app/src/main/res/drawable/ic_nav_live.xml
Normal file
14
app/src/main/res/drawable/ic_nav_live.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<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:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M13,3v7h6l-8,11v-7h-6z" />
|
||||
</vector>
|
||||
35
app/src/main/res/drawable/ic_nav_news.xml
Normal file
35
app/src/main/res/drawable/ic_nav_news.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<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:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M16,6h3a1,1 0,0 1,1 1v11a2,2 0,0 1,-4 0v-13a1,1 0,0 0,-1 -1h-10a1,1 0,0 0,-1 1v12a3,3 0,0 0,3 3h11" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M8,8h4" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M8,12h4" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M8,16h4" />
|
||||
</vector>
|
||||
28
app/src/main/res/drawable/ic_nav_scorers.xml
Normal file
28
app/src/main/res/drawable/ic_nav_scorers.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<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:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M3,13a1,1 0,0 1,1 -1h4a1,1 0,0 1,1 1v6a1,1 0,0 1,-1 1h-4a1,1 0,0 1,-1 -1z" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M15,9a1,1 0,0 1,1 -1h4a1,1 0,0 1,1 1v10a1,1 0,0 1,-1 1h-4a1,1 0,0 1,-1 -1z" />
|
||||
<path
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,5a1,1 0,0 1,1 -1h4a1,1 0,0 1,1 1v14a1,1 0,0 1,-1 1h-4a1,1 0,0 1,-1 -1z" />
|
||||
</vector>
|
||||
8
app/src/main/res/drawable/rank_1_badge.xml
Normal file
8
app/src/main/res/drawable/rank_1_badge.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<gradient
|
||||
android:startColor="#FFD700"
|
||||
android:endColor="#FFA000"
|
||||
android:angle="45" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/rank_2_badge.xml
Normal file
8
app/src/main/res/drawable/rank_2_badge.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<gradient
|
||||
android:startColor="#E0E0E0"
|
||||
android:endColor="#9E9E9E"
|
||||
android:angle="45" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/rank_3_badge.xml
Normal file
8
app/src/main/res/drawable/rank_3_badge.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<gradient
|
||||
android:startColor="#CD7F32"
|
||||
android:endColor="#8B4513"
|
||||
android:angle="45" />
|
||||
</shape>
|
||||
BIN
app/src/main/res/font/bebas_neue.ttf
Normal file
BIN
app/src/main/res/font/bebas_neue.ttf
Normal file
Binary file not shown.
7
app/src/main/res/font/font_bebas_neue.xml
Normal file
7
app/src/main/res/font/font_bebas_neue.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<font
|
||||
app:fontStyle="normal"
|
||||
app:fontWeight="400"
|
||||
app:font="@font/bebas_neue" />
|
||||
</font-family>
|
||||
11
app/src/main/res/font/font_ibm_plex_mono.xml
Normal file
11
app/src/main/res/font/font_ibm_plex_mono.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<font
|
||||
app:fontStyle="normal"
|
||||
app:fontWeight="400"
|
||||
app:font="@font/ibm_plex_mono" />
|
||||
<font
|
||||
app:fontStyle="normal"
|
||||
app:fontWeight="500"
|
||||
app:font="@font/ibm_plex_mono_medium" />
|
||||
</font-family>
|
||||
19
app/src/main/res/font/font_ibm_plex_sans.xml
Normal file
19
app/src/main/res/font/font_ibm_plex_sans.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<font
|
||||
app:fontStyle="normal"
|
||||
app:fontWeight="400"
|
||||
app:font="@font/ibm_plex_sans" />
|
||||
<font
|
||||
app:fontStyle="normal"
|
||||
app:fontWeight="500"
|
||||
app:font="@font/ibm_plex_sans_medium" />
|
||||
<font
|
||||
app:fontStyle="normal"
|
||||
app:fontWeight="600"
|
||||
app:font="@font/ibm_plex_sans_semibold" />
|
||||
<font
|
||||
app:fontStyle="normal"
|
||||
app:fontWeight="700"
|
||||
app:font="@font/ibm_plex_sans_bold" />
|
||||
</font-family>
|
||||
BIN
app/src/main/res/font/ibm_plex_mono.ttf
Normal file
BIN
app/src/main/res/font/ibm_plex_mono.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/ibm_plex_mono_medium.ttf
Normal file
BIN
app/src/main/res/font/ibm_plex_mono_medium.ttf
Normal file
Binary file not shown.
1483
app/src/main/res/font/ibm_plex_sans.ttf
Normal file
1483
app/src/main/res/font/ibm_plex_sans.ttf
Normal file
File diff suppressed because one or more lines are too long
1483
app/src/main/res/font/ibm_plex_sans_bold.ttf
Normal file
1483
app/src/main/res/font/ibm_plex_sans_bold.ttf
Normal file
File diff suppressed because one or more lines are too long
1483
app/src/main/res/font/ibm_plex_sans_medium.ttf
Normal file
1483
app/src/main/res/font/ibm_plex_sans_medium.ttf
Normal file
File diff suppressed because one or more lines are too long
1483
app/src/main/res/font/ibm_plex_sans_semibold.ttf
Normal file
1483
app/src/main/res/font/ibm_plex_sans_semibold.ttf
Normal file
File diff suppressed because one or more lines are too long
39
app/src/main/res/layout/dialog_team_selector.xml
Normal file
39
app/src/main/res/layout/dialog_team_selector.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_bottom_sheet_curve"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<!-- Handle visual cue -->
|
||||
<View
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/custom_progress_bg"
|
||||
android:backgroundTint="@color/border" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:fontFamily="@font/font_bebas_neue"
|
||||
android:letterSpacing="0.05"
|
||||
android:text="Selecionar Adversário"
|
||||
android:textColor="@color/text_1"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_comparison_teams"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="8dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
</LinearLayout>
|
||||
137
app/src/main/res/layout/fragment_cup.xml
Normal file
137
app/src/main/res/layout/fragment_cup.xml
Normal file
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:orientation="vertical"
|
||||
android:background="@color/bg_base"
|
||||
tools:context=".ui.cup.CupFragment">
|
||||
|
||||
<!-- Section Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/font_bebas_neue"
|
||||
android:text="TAÇA"
|
||||
android:textSize="28sp"
|
||||
android:textColor="@color/text_1"
|
||||
android:letterSpacing="0.04" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/font_ibm_plex_sans"
|
||||
android:text="Fases eliminatórias e confronto direto."
|
||||
android:textColor="@color/text_2"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="4dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Category Toggle -->
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:id="@+id/toggle_group_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
app:singleSelection="true"
|
||||
app:selectionRequired="true"
|
||||
app:checkedButton="@+id/btn_seniores">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_seniores"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/font_ibm_plex_sans"
|
||||
android:text="Seniores"
|
||||
android:textColor="@color/toggle_text_color"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="@color/toggle_bg_color"
|
||||
app:strokeColor="@color/border"
|
||||
app:strokeWidth="1dp"
|
||||
app:cornerRadius="8dp"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_juniores"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/font_ibm_plex_sans"
|
||||
android:text="Juniores"
|
||||
android:textColor="@color/toggle_text_color"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="@color/toggle_bg_color"
|
||||
app:strokeColor="@color/border"
|
||||
app:strokeWidth="1dp"
|
||||
app:cornerRadius="8dp"
|
||||
android:textAllCaps="false" />
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
||||
<!-- Phase Navigation -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:background="@color/bg_surface"
|
||||
android:paddingVertical="10dp"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_prev_phase"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/bg_circle_light_gray"
|
||||
android:src="@android:drawable/ic_media_previous"
|
||||
android:contentDescription="Anterior"
|
||||
app:tint="@color/text_2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_phase_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Carregando..."
|
||||
android:fontFamily="@font/font_bebas_neue"
|
||||
android:textSize="18sp"
|
||||
android:letterSpacing="0.04"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_1" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_next_phase"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/bg_circle_light_gray"
|
||||
android:src="@android:drawable/ic_media_next"
|
||||
android:contentDescription="Próxima"
|
||||
app:tint="@color/text_2" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/border"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_phases"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="16dp"
|
||||
tools:listitem="@layout/item_match"/>
|
||||
|
||||
</LinearLayout>
|
||||
58
app/src/main/res/layout/item_comparison_selector.xml
Normal file
58
app/src/main/res/layout/item_comparison_selector.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="6dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:cardBackgroundColor="@color/bg_elevated"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="@color/border">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/img_team_logo"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@color/bg_base"
|
||||
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:src="@mipmap/ic_launcher_round" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_team_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/font_ibm_plex_sans"
|
||||
android:text="Nome da Equipa"
|
||||
android:textColor="@color/text_1"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_team_position"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/font_ibm_plex_mono"
|
||||
android:text="1º"
|
||||
android:textColor="@color/brand"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -16,6 +16,10 @@
|
||||
android:id="@+id/nav_gallery"
|
||||
android:icon="@drawable/ic_nav_jornadas"
|
||||
android:title="@string/menu_gallery" />
|
||||
<item
|
||||
android:id="@+id/nav_cup"
|
||||
android:icon="@drawable/ic_cup"
|
||||
android:title="Taça" />
|
||||
<item
|
||||
android:id="@+id/nav_live_games"
|
||||
android:icon="@drawable/ic_nav_live"
|
||||
|
||||
@@ -125,4 +125,9 @@
|
||||
app:argType="integer" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_cup"
|
||||
android:name="com.example.vdcscore.ui.cup.CupFragment"
|
||||
android:label="Taça"
|
||||
tools:layout="@layout/fragment_cup" />
|
||||
</navigation>
|
||||
49
app/src/main/res/values-night/colors.xml
Normal file
49
app/src/main/res/values-night/colors.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
|
||||
<!-- Target Mockup Dark Palette -->
|
||||
<color name="bg_base">#0a0e1a</color>
|
||||
<color name="bg_surface">#111827</color>
|
||||
<color name="bg_elevated">#1a2235</color>
|
||||
<color name="bg_overlay">#243047</color>
|
||||
|
||||
<color name="brand">#22c55e</color>
|
||||
<color name="brand_dim">#1E22C55E</color> <!-- rgba(34, 197, 94, 0.12) -->
|
||||
<color name="brand_border">#4022C55E</color> <!-- rgba(34, 197, 94, 0.25) -->
|
||||
|
||||
<color name="accent">#3b82f6</color>
|
||||
<color name="danger">#ef4444</color>
|
||||
<color name="warning">#f59e0b</color>
|
||||
|
||||
<color name="text_1">#f9fafb</color>
|
||||
<color name="text_2">#9ca3af</color>
|
||||
<color name="text_3">#4b5563</color>
|
||||
|
||||
<color name="border">#1e2d45</color>
|
||||
<color name="border_active">#22c55e</color>
|
||||
|
||||
<!-- Compatibilty with existing styles -->
|
||||
<color name="primary_color">#22c55e</color> <!-- Brand Verde -->
|
||||
<color name="primary_light">#1a2235</color>
|
||||
<color name="primary_dark">#0a0e1a</color>
|
||||
|
||||
<color name="secondary_color">#111827</color>
|
||||
<color name="secondary_light">#1a2235</color>
|
||||
<color name="secondary_dark">#0a0e1a</color>
|
||||
|
||||
<color name="live_indicator">#22c55e</color>
|
||||
<color name="live_time">#22c55e</color>
|
||||
|
||||
<color name="background_light">#0a0e1a</color> <!-- Native Dark Mode forced -->
|
||||
<color name="surface_light">#111827</color>
|
||||
<color name="surface_card">#111827</color>
|
||||
|
||||
<color name="text_primary">#f9fafb</color>
|
||||
<color name="text_secondary">#9ca3af</color>
|
||||
<color name="text_on_primary">#0a0e1a</color>
|
||||
|
||||
<color name="divider">#1e2d45</color>
|
||||
<color name="input_background">#111827</color>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user