amigos melhora
This commit is contained in:
60
.idea/caches/deviceStreaming.xml
generated
60
.idea/caches/deviceStreaming.xml
generated
@@ -580,6 +580,30 @@
|
|||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2400" />
|
<option name="screenY" value="2400" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="33" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="c1qksw" />
|
||||||
|
<option name="id" value="c1qksw" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy Note 20 5G" />
|
||||||
|
<option name="screenDensity" value="450" />
|
||||||
|
<option name="screenX" value="1080" />
|
||||||
|
<option name="screenY" value="2400" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="33" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="c2q" />
|
||||||
|
<option name="id" value="c2q" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy Note20 Ultra 5G" />
|
||||||
|
<option name="screenDensity" value="560" />
|
||||||
|
<option name="screenX" value="1440" />
|
||||||
|
<option name="screenY" value="3088" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="34" />
|
<option name="api" value="34" />
|
||||||
<option name="brand" value="google" />
|
<option name="brand" value="google" />
|
||||||
@@ -760,6 +784,18 @@
|
|||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="36" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="e1s" />
|
||||||
|
<option name="id" value="e1s" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy S24" />
|
||||||
|
<option name="screenDensity" value="480" />
|
||||||
|
<option name="screenX" value="1080" />
|
||||||
|
<option name="screenY" value="2340" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="36" />
|
<option name="api" value="36" />
|
||||||
<option name="brand" value="samsung" />
|
<option name="brand" value="samsung" />
|
||||||
@@ -1278,6 +1314,18 @@
|
|||||||
<option name="screenX" value="1440" />
|
<option name="screenX" value="1440" />
|
||||||
<option name="screenY" value="3200" />
|
<option name="screenY" value="3200" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="35" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="p3s" />
|
||||||
|
<option name="id" value="p3s" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy S21 Ultra 5G" />
|
||||||
|
<option name="screenDensity" value="600" />
|
||||||
|
<option name="screenX" value="1440" />
|
||||||
|
<option name="screenY" value="3200" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="36" />
|
<option name="api" value="36" />
|
||||||
<option name="brand" value="samsung" />
|
<option name="brand" value="samsung" />
|
||||||
@@ -1664,6 +1712,18 @@
|
|||||||
<option name="screenX" value="1440" />
|
<option name="screenX" value="1440" />
|
||||||
<option name="screenY" value="3200" />
|
<option name="screenY" value="3200" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="33" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="z3q" />
|
||||||
|
<option name="id" value="z3q" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy S20 Ultra 5G" />
|
||||||
|
<option name="screenDensity" value="560" />
|
||||||
|
<option name="screenX" value="1440" />
|
||||||
|
<option name="screenY" value="3200" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -421,8 +421,8 @@ public class InicioFragment extends Fragment {
|
|||||||
for (int i = 0; i < 7; i++) {
|
for (int i = 0; i < 7; i++) {
|
||||||
View node = LayoutInflater.from(getContext()).inflate(R.layout.item_day_node, progressPathContainer, false);
|
View node = LayoutInflater.from(getContext()).inflate(R.layout.item_day_node, progressPathContainer, false);
|
||||||
|
|
||||||
View topConnector = node.findViewById(R.id.topConnector);
|
View leftConnector = node.findViewById(R.id.leftConnector);
|
||||||
View bottomConnector = node.findViewById(R.id.bottomConnector);
|
View rightConnector = node.findViewById(R.id.rightConnector);
|
||||||
View nodeCircle = node.findViewById(R.id.nodeCircle);
|
View nodeCircle = node.findViewById(R.id.nodeCircle);
|
||||||
TextView nodeDayInitial = node.findViewById(R.id.nodeDayInitial);
|
TextView nodeDayInitial = node.findViewById(R.id.nodeDayInitial);
|
||||||
TextView nodeDayLabel = node.findViewById(R.id.nodeDayLabel);
|
TextView nodeDayLabel = node.findViewById(R.id.nodeDayLabel);
|
||||||
@@ -432,8 +432,8 @@ public class InicioFragment extends Fragment {
|
|||||||
nodeDayInitial.setText(initials[i]);
|
nodeDayInitial.setText(initials[i]);
|
||||||
|
|
||||||
// Hide connectors at ends
|
// Hide connectors at ends
|
||||||
if (i == 0) topConnector.setVisibility(View.INVISIBLE);
|
if (i == 0) leftConnector.setVisibility(View.INVISIBLE);
|
||||||
if (i == 6) bottomConnector.setVisibility(View.INVISIBLE);
|
if (i == 6) rightConnector.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
// Style based on state
|
// Style based on state
|
||||||
if (i < currentDayIndex) {
|
if (i < currentDayIndex) {
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ import com.google.firebase.firestore.ListenerRegistration;
|
|||||||
|
|
||||||
public class ProfileFragment extends Fragment {
|
public class ProfileFragment extends Fragment {
|
||||||
|
|
||||||
private TextView tvProfileName, tvProfileTitle, tvProfileBio;
|
private TextView tvProfileName, tvProfileHandle, tvProfileSince, tvProfileBio;
|
||||||
|
private TextView tvStatTopXP, tvStatFollowing, tvStatFollowers, tvStatActiveDays;
|
||||||
private GridLayout badgesGrid;
|
private GridLayout badgesGrid;
|
||||||
private LinearLayout friendsListContainer;
|
private LinearLayout friendsListContainer;
|
||||||
private ListenerRegistration userListener, friendsListener;
|
private ListenerRegistration userListener, friendsListener;
|
||||||
@@ -39,8 +40,13 @@ public class ProfileFragment extends Fragment {
|
|||||||
|
|
||||||
private void initViews(View view) {
|
private void initViews(View view) {
|
||||||
tvProfileName = view.findViewById(R.id.tvProfileName);
|
tvProfileName = view.findViewById(R.id.tvProfileName);
|
||||||
tvProfileTitle = view.findViewById(R.id.tvProfileTitle);
|
tvProfileHandle = view.findViewById(R.id.tvProfileHandle);
|
||||||
|
tvProfileSince = view.findViewById(R.id.tvProfileSince);
|
||||||
tvProfileBio = view.findViewById(R.id.tvProfileBio);
|
tvProfileBio = view.findViewById(R.id.tvProfileBio);
|
||||||
|
tvStatTopXP = view.findViewById(R.id.tvStatTopXP);
|
||||||
|
tvStatFollowing = view.findViewById(R.id.tvStatFollowing);
|
||||||
|
tvStatFollowers = view.findViewById(R.id.tvStatFollowers);
|
||||||
|
tvStatActiveDays = view.findViewById(R.id.tvStatActiveDays);
|
||||||
badgesGrid = view.findViewById(R.id.badgesGrid);
|
badgesGrid = view.findViewById(R.id.badgesGrid);
|
||||||
friendsListContainer = view.findViewById(R.id.friendsListContainer);
|
friendsListContainer = view.findViewById(R.id.friendsListContainer);
|
||||||
}
|
}
|
||||||
@@ -50,13 +56,18 @@ public class ProfileFragment extends Fragment {
|
|||||||
startActivity(new Intent(getActivity(), SettingsActivity.class));
|
startActivity(new Intent(getActivity(), SettingsActivity.class));
|
||||||
});
|
});
|
||||||
|
|
||||||
view.findViewById(R.id.btnManageFriends).setOnClickListener(v -> {
|
View btnAddFriends = view.findViewById(R.id.btnAddFriends);
|
||||||
startActivity(new Intent(getActivity(), MyFriendsActivity.class));
|
if (btnAddFriends != null) {
|
||||||
});
|
btnAddFriends.setOnClickListener(v -> startActivity(new Intent(getActivity(), MyFriendsActivity.class)));
|
||||||
|
}
|
||||||
view.findViewById(R.id.btnViewStatsDetails).setOnClickListener(v -> {
|
View btnViewAllFriends = view.findViewById(R.id.btnViewAllFriends);
|
||||||
startActivity(new Intent(getActivity(), StatisticsActivity.class));
|
if (btnViewAllFriends != null) {
|
||||||
});
|
btnViewAllFriends.setOnClickListener(v -> startActivity(new Intent(getActivity(), MyFriendsActivity.class)));
|
||||||
|
}
|
||||||
|
View btnFindFriends = view.findViewById(R.id.btnFindFriends);
|
||||||
|
if (btnFindFriends != null) {
|
||||||
|
btnFindFriends.setOnClickListener(v -> startActivity(new Intent(getActivity(), MyFriendsActivity.class)));
|
||||||
|
}
|
||||||
|
|
||||||
view.findViewById(R.id.btnLogout).setOnClickListener(v -> {
|
view.findViewById(R.id.btnLogout).setOnClickListener(v -> {
|
||||||
AuthManager.getInstance().logout();
|
AuthManager.getInstance().logout();
|
||||||
@@ -73,20 +84,26 @@ public class ProfileFragment extends Fragment {
|
|||||||
if (getContext() == null || view == null) return;
|
if (getContext() == null || view == null) return;
|
||||||
updateStats(view, user);
|
updateStats(view, user);
|
||||||
tvProfileName.setText(user.usuario);
|
tvProfileName.setText(user.usuario);
|
||||||
tvProfileBio.setText(user.bio.isEmpty() ? "Sem bio definida." : user.bio);
|
tvProfileHandle.setText(user.handle);
|
||||||
tvProfileTitle.setText(determineTitle(user));
|
String year = (user.created_at != null && user.created_at.length() >= 4) ? user.created_at.substring(0, 4) : "2024";
|
||||||
|
tvProfileSince.setText("Aqui desde " + year);
|
||||||
|
tvProfileBio.setText(user.bio == null || user.bio.isEmpty() ? "Sem bio definida." : user.bio);
|
||||||
|
|
||||||
|
tvStatTopXP.setText(String.valueOf(user.xp));
|
||||||
|
tvStatFollowing.setText(String.valueOf(user.following));
|
||||||
|
tvStatFollowers.setText(String.valueOf(user.followers));
|
||||||
|
tvStatActiveDays.setText(String.valueOf(user.dias_ativos));
|
||||||
|
|
||||||
renderBadges(user);
|
renderBadges(user);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateStats(View view, Usuario user) {
|
private void updateStats(View view, Usuario user) {
|
||||||
setStat(view.findViewById(R.id.statXP), "⚡", String.valueOf(user.xp), "Total XP");
|
|
||||||
setStat(view.findViewById(R.id.statStreak), "🔥", String.valueOf(user.streak), "Ofensiva");
|
setStat(view.findViewById(R.id.statStreak), "🔥", String.valueOf(user.streak), "Ofensiva");
|
||||||
setStat(view.findViewById(R.id.statLevel), "⭐", String.valueOf(user.level), "Nível");
|
setStat(view.findViewById(R.id.statLeague), "🏆", user.league != null ? user.league : "Bronze", "Liga");
|
||||||
setStat(view.findViewById(R.id.statTasks), "✅", String.valueOf(user.total_tasks_concluidas), "Tarefas");
|
setStat(view.findViewById(R.id.statXP), "⚡", String.valueOf(user.xp), "Total XP");
|
||||||
setStat(view.findViewById(R.id.statFocusTime), "⏱️", user.tempo_foco_total + "m", "Foco");
|
setStat(view.findViewById(R.id.statFocusTime), "⏱️", user.tempo_foco_total + "m", "Foco");
|
||||||
setStat(view.findViewById(R.id.statSessions), "🎯", String.valueOf(user.sessoes_foco_completas), "Sessões");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setStat(View statView, String icon, String value, String label) {
|
private void setStat(View statView, String icon, String value, String label) {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class TrophiesActivity extends AppCompatActivity {
|
|||||||
tvLeagueTimeRemaining.setText(daysLeft + " dias " + hoursLeft + "h restantes");
|
tvLeagueTimeRemaining.setText(daysLeft + " dias " + hoursLeft + "h restantes");
|
||||||
|
|
||||||
int progress = (7 - daysLeft) * 100 / 7;
|
int progress = (7 - daysLeft) * 100 / 7;
|
||||||
pbWeeklyProgress.setProgress(progress);
|
animateProgressBar(progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void observeUserData() {
|
private void observeUserData() {
|
||||||
@@ -142,6 +142,13 @@ public class TrophiesActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void animateProgressBar(int progress) {
|
||||||
|
android.animation.ObjectAnimator animation = android.animation.ObjectAnimator.ofInt(pbWeeklyProgress, "progress", 0, progress);
|
||||||
|
animation.setDuration(1500);
|
||||||
|
animation.setInterpolator(new android.view.animation.DecelerateInterpolator());
|
||||||
|
animation.start();
|
||||||
|
}
|
||||||
|
|
||||||
private void addRankingItem(int pos, Usuario user, String myUid) {
|
private void addRankingItem(int pos, Usuario user, String myUid) {
|
||||||
View view = getLayoutInflater().inflate(R.layout.item_ranking_user, rankingContainer, false);
|
View view = getLayoutInflater().inflate(R.layout.item_ranking_user, rankingContainer, false);
|
||||||
|
|
||||||
@@ -152,13 +159,26 @@ public class TrophiesActivity extends AppCompatActivity {
|
|||||||
ImageView ivAvatar = view.findViewById(R.id.ivRankingAvatar);
|
ImageView ivAvatar = view.findViewById(R.id.ivRankingAvatar);
|
||||||
androidx.cardview.widget.CardView card = view.findViewById(R.id.cardRankingUser);
|
androidx.cardview.widget.CardView card = view.findViewById(R.id.cardRankingUser);
|
||||||
|
|
||||||
tvPos.setText("#" + pos);
|
if (pos == 1) {
|
||||||
|
tvPos.setText("🥇");
|
||||||
|
tvPos.setTextSize(18f);
|
||||||
|
card.setCardBackgroundColor(android.graphics.Color.parseColor("#FFFDE7")); // Light gold
|
||||||
|
} else if (pos == 2) {
|
||||||
|
tvPos.setText("🥈");
|
||||||
|
tvPos.setTextSize(18f);
|
||||||
|
} else if (pos == 3) {
|
||||||
|
tvPos.setText("🥉");
|
||||||
|
tvPos.setTextSize(18f);
|
||||||
|
} else {
|
||||||
|
tvPos.setText("#" + pos);
|
||||||
|
}
|
||||||
|
|
||||||
tvName.setText(user.usuario);
|
tvName.setText(user.usuario);
|
||||||
tvXP.setText(user.xp_semanal + " XP");
|
tvXP.setText(user.xp_semanal + " XP");
|
||||||
|
|
||||||
if (user.id_usuario.equals(myUid)) {
|
if (user.id_usuario.equals(myUid)) {
|
||||||
tvTu.setVisibility(View.VISIBLE);
|
tvTu.setVisibility(View.VISIBLE);
|
||||||
card.setCardBackgroundColor(getResources().getColor(R.color.background_light));
|
card.setCardBackgroundColor(android.graphics.Color.parseColor("#F3E5F5")); // Light purple
|
||||||
card.setCardElevation(4f);
|
card.setCardElevation(4f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,13 +197,19 @@ public class TrophiesActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateUserProgressCard(int myPos, Usuario me, Usuario aboveMe) {
|
private void updateUserProgressCard(int myPos, Usuario me, Usuario aboveMe) {
|
||||||
|
androidx.cardview.widget.CardView cardUserProgress = findViewById(R.id.cardUserProgress);
|
||||||
|
|
||||||
if (myPos <= 3) {
|
if (myPos <= 3) {
|
||||||
tvUserRankingStatus.setText("Estás na zona de promoção! 🎉");
|
tvUserRankingStatus.setText("🎉 Estás na zona de promoção!");
|
||||||
tvXPToNextPosition.setText("Mantém o foco para subir de liga.");
|
tvUserRankingStatus.setTextColor(getResources().getColor(R.color.success_green));
|
||||||
|
tvXPToNextPosition.setText("Mantém o foco para subir de divisão e ganhar recompensas!");
|
||||||
|
cardUserProgress.setCardBackgroundColor(android.graphics.Color.parseColor("#E8F5E9")); // Light green
|
||||||
} else {
|
} else {
|
||||||
int needed = (aboveMe != null) ? (aboveMe.xp_semanal - me.xp_semanal + 1) : 0;
|
int needed = (aboveMe != null) ? (aboveMe.xp_semanal - me.xp_semanal + 1) : 0;
|
||||||
tvUserRankingStatus.setText("Faltam " + needed + " XP para subires de posição");
|
tvUserRankingStatus.setText("Faltam " + needed + " XP para subires de posição");
|
||||||
tvXPToNextPosition.setText("Estás em #" + myPos);
|
tvUserRankingStatus.setTextColor(getResources().getColor(R.color.text_primary));
|
||||||
|
tvXPToNextPosition.setText("Estás em #" + myPos + " com " + me.xp_semanal + " XP");
|
||||||
|
cardUserProgress.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ public class Usuario {
|
|||||||
public String titulo = "Iniciante";
|
public String titulo = "Iniciante";
|
||||||
public int achievementsCount = 0;
|
public int achievementsCount = 0;
|
||||||
public int trophiesCount = 0;
|
public int trophiesCount = 0;
|
||||||
|
public int followers = 0;
|
||||||
|
public int following = 0;
|
||||||
public int tasks_concluidas_hoje = 0;
|
public int tasks_concluidas_hoje = 0;
|
||||||
public int total_tasks_concluidas = 0;
|
public int total_tasks_concluidas = 0;
|
||||||
public int meta_diaria_tarefas = 3;
|
public int meta_diaria_tarefas = 3;
|
||||||
|
|||||||
@@ -52,31 +52,33 @@
|
|||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="16dp"
|
||||||
app:cardCornerRadius="16dp"
|
app:cardCornerRadius="20dp"
|
||||||
app:cardElevation="2dp">
|
app:cardBackgroundColor="@color/primary_purple"
|
||||||
|
app:cardElevation="4dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="20dp"
|
android:padding="24dp"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ivLeagueBadge"
|
android:id="@+id/ivLeagueBadge"
|
||||||
android:layout_width="80dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="100dp"
|
||||||
android:src="@drawable/ic_trophy_bronze"
|
android:src="@drawable/ic_trophy_bronze"
|
||||||
android:layout_marginBottom="12dp"/>
|
android:layout_marginBottom="12dp"
|
||||||
|
app:tint="@color/white" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvLeagueName"
|
android:id="@+id/tvLeagueName"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Divisão Bronze"
|
android:text="Divisão Bronze"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/white"
|
||||||
android:textSize="22sp"
|
android:textSize="26sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -85,18 +87,19 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:text="2 dias 14h restantes"
|
android:text="2 dias 14h restantes"
|
||||||
android:textColor="@color/text_secondary"
|
android:textColor="#E0E0E0"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/pbWeeklyProgress"
|
android:id="@+id/pbWeeklyProgress"
|
||||||
style="?android:attr/progressBarStyleHorizontal"
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="8dp"
|
android:layout_height="12dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="20dp"
|
||||||
android:max="100"
|
android:max="100"
|
||||||
android:progress="60"
|
android:progress="60"
|
||||||
android:progressDrawable="@drawable/progress_bar_duo" />
|
android:progressTint="@color/reward_yellow"
|
||||||
|
android:progressBackgroundTint="#4DFFFFFF" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
@@ -105,59 +108,29 @@
|
|||||||
android:id="@+id/tvLeagueObjective"
|
android:id="@+id/tvLeagueObjective"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Fica no TOP 3 para subir para Prata"
|
android:text="🚀 Fica no TOP 3 para subir para Prata"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/primary_purple"
|
android:textColor="@color/primary_purple"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="16sp"
|
android:textSize="18sp"
|
||||||
android:layout_marginBottom="24dp"/>
|
|
||||||
|
|
||||||
<!-- 8. 👥 FILTRO DE RANKING -->
|
|
||||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
|
||||||
android:id="@+id/toggleRankingFilter"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
app:singleSelection="true"
|
|
||||||
app:checkedButton="@+id/btnRankingGlobal">
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btnRankingGlobal"
|
|
||||||
style="?attr/materialButtonOutlinedStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Global"
|
|
||||||
android:textSize="12sp"/>
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btnRankingAmigos"
|
|
||||||
style="?attr/materialButtonOutlinedStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Amigos"
|
|
||||||
android:textSize="12sp"/>
|
|
||||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
|
||||||
|
|
||||||
<!-- 3. 📊 RANKING DA SEMANA -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/rankingContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginBottom="24dp"/>
|
android:layout_marginBottom="24dp"/>
|
||||||
|
|
||||||
<!-- 5. ⚡ PROGRESSO DO UTILIZADOR -->
|
<!-- 5. ⚡ PROGRESSO DO UTILIZADOR -->
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/cardUserProgress"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
app:cardCornerRadius="16dp"
|
app:cardCornerRadius="16dp"
|
||||||
app:cardElevation="2dp">
|
app:cardElevation="2dp"
|
||||||
|
app:cardBackgroundColor="@color/white">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp">
|
android:padding="20dp"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvUserRankingStatus"
|
android:id="@+id/tvUserRankingStatus"
|
||||||
@@ -166,19 +139,59 @@
|
|||||||
android:text="Faltam 120 XP para entrares no TOP 3"
|
android:text="Faltam 120 XP para entrares no TOP 3"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="14sp"/>
|
android:textAlignment="center"
|
||||||
|
android:textSize="16sp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvXPToNextPosition"
|
android:id="@+id/tvXPToNextPosition"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="Diferença para o próximo: 45 XP"
|
android:text="Diferença para o próximo: 45 XP"
|
||||||
android:textColor="@color/text_secondary"
|
android:textColor="@color/text_secondary"
|
||||||
android:textSize="12sp"/>
|
android:textAlignment="center"
|
||||||
|
android:textSize="14sp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<!-- 8. 👥 FILTRO DE RANKING -->
|
||||||
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||||
|
android:id="@+id/toggleRankingFilter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
app:singleSelection="true"
|
||||||
|
app:selectionRequired="true"
|
||||||
|
app:checkedButton="@+id/btnRankingGlobal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnRankingGlobal"
|
||||||
|
style="?attr/materialButtonOutlinedStyle"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="Global"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="14sp"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnRankingAmigos"
|
||||||
|
style="?attr/materialButtonOutlinedStyle"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="Amigos"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="14sp"/>
|
||||||
|
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||||
|
|
||||||
|
<!-- 3. 📊 RANKING DA SEMANA -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/rankingContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginBottom="32dp"/>
|
||||||
|
|
||||||
<!-- 6. 🎁 RECOMPENSAS DA SEMANA -->
|
<!-- 6. 🎁 RECOMPENSAS DA SEMANA -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -187,40 +200,78 @@
|
|||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
android:layout_marginBottom="12dp"/>
|
android:layout_marginBottom="16dp"/>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="24dp"
|
android:orientation="horizontal"
|
||||||
app:cardCornerRadius="16dp"
|
android:weightSum="3"
|
||||||
app:cardElevation="1dp">
|
android:layout_marginBottom="32dp">
|
||||||
|
|
||||||
<LinearLayout
|
<!-- 1º Lugar -->
|
||||||
android:layout_width="match_parent"
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:orientation="vertical"
|
android:layout_height="match_parent"
|
||||||
android:padding="12dp">
|
android:layout_weight="1"
|
||||||
<TextView
|
android:layout_marginEnd="4dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardBackgroundColor="#FFF8E1"
|
||||||
|
app:cardElevation="1dp">
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="🥇 1º lugar: +300 XP + Badge Exclusiva"
|
android:orientation="vertical"
|
||||||
android:padding="8dp"
|
android:padding="16dp"
|
||||||
android:textColor="@color/text_primary"/>
|
android:gravity="center">
|
||||||
<TextView
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="🥇" android:textSize="32sp" android:layout_marginBottom="8dp"/>
|
||||||
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="1º Lugar" android:textStyle="bold" android:textSize="14sp" android:textColor="#FF8F00"/>
|
||||||
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="+300 XP\nBadge" android:textAlignment="center" android:textSize="12sp" android:textColor="#FF8F00"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<!-- 2º Lugar -->
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginHorizontal="4dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardBackgroundColor="#F5F5F5"
|
||||||
|
app:cardElevation="1dp">
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="🥈 2º lugar: +200 XP"
|
android:orientation="vertical"
|
||||||
android:padding="8dp"
|
android:padding="16dp"
|
||||||
android:textColor="@color/text_primary"/>
|
android:gravity="center">
|
||||||
<TextView
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="🥈" android:textSize="28sp" android:layout_marginBottom="8dp"/>
|
||||||
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2º Lugar" android:textStyle="bold" android:textSize="14sp" android:textColor="#757575"/>
|
||||||
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="+200 XP" android:textAlignment="center" android:textSize="12sp" android:textColor="#757575"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<!-- 3º Lugar -->
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardBackgroundColor="#EFEBE9"
|
||||||
|
app:cardElevation="1dp">
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="🥉 3º lugar: +100 XP"
|
android:orientation="vertical"
|
||||||
android:padding="8dp"
|
android:padding="16dp"
|
||||||
android:textColor="@color/text_primary"/>
|
android:gravity="center">
|
||||||
</LinearLayout>
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="🥉" android:textSize="28sp" android:layout_marginBottom="8dp"/>
|
||||||
</androidx.cardview.widget.CardView>
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="3º Lugar" android:textStyle="bold" android:textSize="14sp" android:textColor="#8D6E63"/>
|
||||||
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="+100 XP" android:textAlignment="center" android:textSize="12sp" android:textColor="#8D6E63"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 7. 📈 HISTÓRICO DE PERFORMANCE -->
|
<!-- 7. 📈 HISTÓRICO DE PERFORMANCE -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -231,19 +282,21 @@
|
|||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/text_secondary"
|
android:textColor="@color/text_secondary"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:layout_marginBottom="32dp"/>
|
android:layout_marginBottom="32dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<!-- 9. 🔘 BOTÃO DE ACÇÃO -->
|
<!-- 9. 🔘 BOTÃO DE ACÇÃO -->
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnEarnXpNow"
|
android:id="@+id/btnEarnXpNow"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="64dp"
|
||||||
android:text="Ganhar XP agora"
|
android:text="⚡ Ganhar XP Agora"
|
||||||
android:background="@drawable/button_primary"
|
android:backgroundTint="@color/primary_purple"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
app:backgroundTint="@null"
|
app:cornerRadius="16dp"
|
||||||
android:layout_marginBottom="40dp"/>
|
android:layout_marginBottom="40dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -305,16 +305,23 @@
|
|||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<HorizontalScrollView
|
||||||
android:id="@+id/progressPathContainer"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/card_duo"
|
android:scrollbars="none"
|
||||||
android:elevation="2dp"
|
android:layout_marginBottom="24dp">
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:orientation="vertical"
|
<LinearLayout
|
||||||
android:paddingVertical="32dp"
|
android:id="@+id/progressPathContainer"
|
||||||
android:layout_marginBottom="24dp" />
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/card_duo"
|
||||||
|
android:elevation="2dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="24dp"
|
||||||
|
android:paddingVertical="16dp" />
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<!-- 6. 👥 MINI RANKING -->
|
<!-- 6. 👥 MINI RANKING -->
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
|
|||||||
@@ -9,186 +9,360 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:padding="20dp">
|
|
||||||
|
|
||||||
<!-- 👤 HEADER -->
|
<!-- 👤 HEADER DO PERFIL -->
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="24dp">
|
android:background="@color/primary_purple"
|
||||||
|
android:paddingTop="32dp"
|
||||||
<androidx.cardview.widget.CardView
|
android:paddingBottom="24dp"
|
||||||
android:id="@+id/cardAvatar"
|
android:paddingHorizontal="20dp"
|
||||||
android:layout_width="80dp"
|
android:clipToPadding="false">
|
||||||
android:layout_height="80dp"
|
|
||||||
app:cardCornerRadius="40dp"
|
|
||||||
app:cardElevation="2dp">
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/ivProfileAvatar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/ic_nav_profile" />
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toEndOf="@id/cardAvatar"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvProfileName"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Carregando..."
|
|
||||||
android:textColor="@color/text_primary"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvProfileTitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Iniciante de Foco"
|
|
||||||
android:textColor="@color/primary_purple"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvProfileBio"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Sem bio definida."
|
|
||||||
android:textColor="@color/text_secondary"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:layout_marginTop="4dp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/btnEditProfile"
|
android:id="@+id/btnEditProfile"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_settings"
|
android:src="@drawable/ic_settings"
|
||||||
app:tint="@color/text_secondary" />
|
app:tint="@color/white" />
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- 📊 ESTATÍSTICAS PRINCIPAIS -->
|
<LinearLayout
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="12dp">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Estatísticas"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/btnViewStatsDetails"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:text="Ver detalhes"
|
|
||||||
android:textColor="@color/primary_purple"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<GridLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:columnCount="3"
|
|
||||||
android:layout_marginBottom="24dp">
|
|
||||||
|
|
||||||
<include layout="@layout/item_stat_small" android:id="@+id/statXP" />
|
|
||||||
<include layout="@layout/item_stat_small" android:id="@+id/statStreak" />
|
|
||||||
<include layout="@layout/item_stat_small" android:id="@+id/statLevel" />
|
|
||||||
<include layout="@layout/item_stat_small" android:id="@+id/statTasks" />
|
|
||||||
<include layout="@layout/item_stat_small" android:id="@+id/statFocusTime" />
|
|
||||||
<include layout="@layout/item_stat_small" android:id="@+id/statSessions" />
|
|
||||||
</GridLayout>
|
|
||||||
|
|
||||||
<!-- 🏆 CONQUISTAS (Badges) -->
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="12dp">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Conquistas"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/btnViewAllBadges"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:text="Ver todas"
|
|
||||||
android:textColor="@color/primary_purple"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
app:cardCornerRadius="16dp"
|
|
||||||
app:cardElevation="1dp">
|
|
||||||
<GridLayout
|
|
||||||
android:id="@+id/badgesGrid"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:columnCount="4"
|
android:layout_marginTop="16dp"
|
||||||
android:padding="16dp"
|
android:gravity="center"
|
||||||
android:gravity="center">
|
android:orientation="vertical">
|
||||||
<!-- Badges will be added here -->
|
|
||||||
</GridLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
<!-- 👥 AMIGOS -->
|
<androidx.cardview.widget.CardView
|
||||||
<RelativeLayout
|
android:id="@+id/cardAvatar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="100dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="100dp"
|
||||||
android:layout_marginBottom="12dp">
|
app:cardCornerRadius="50dp"
|
||||||
<TextView
|
app:cardElevation="4dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_marginBottom="12dp">
|
||||||
android:layout_height="wrap_content"
|
<ImageView
|
||||||
android:text="Amigos"
|
android:id="@+id/ivProfileAvatar"
|
||||||
android:textStyle="bold"
|
android:layout_width="match_parent"
|
||||||
android:textSize="18sp" />
|
android:layout_height="match_parent"
|
||||||
<TextView
|
android:scaleType="centerCrop"
|
||||||
android:id="@+id/btnManageFriends"
|
android:src="@drawable/ic_nav_profile" />
|
||||||
android:layout_width="wrap_content"
|
</androidx.cardview.widget.CardView>
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
<TextView
|
||||||
android:text="Gerir"
|
android:id="@+id/tvProfileName"
|
||||||
android:textColor="@color/primary_purple"
|
android:layout_width="wrap_content"
|
||||||
android:textStyle="bold" />
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Carregando..."
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvProfileHandle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@username"
|
||||||
|
android:textColor="#E0E0E0"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:layout_marginTop="2dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvProfileSince"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Aqui desde 2024"
|
||||||
|
android:textColor="#C0C0C0"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:layout_marginTop="4dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvProfileBio"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Sem bio definida."
|
||||||
|
android:textColor="#E0E0E0"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginTop="8dp" />
|
||||||
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- MAIN CONTENT AREA -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/friendsListContainer"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginBottom="24dp"/>
|
android:padding="20dp">
|
||||||
|
|
||||||
<!-- 🔘 BOTÕES DE ACÇÃO -->
|
<!-- 📊 ESTATÍSTICAS PRINCIPAIS (Em linha) -->
|
||||||
<Button
|
<LinearLayout
|
||||||
android:id="@+id/btnLogout"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="56dp"
|
android:orientation="horizontal"
|
||||||
android:text="Terminar Sessão"
|
android:weightSum="4"
|
||||||
android:backgroundTint="@color/error_red"
|
android:layout_marginBottom="24dp">
|
||||||
android:textColor="@color/white"
|
|
||||||
android:layout_marginBottom="40dp"/>
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatTopXP"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="0"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textColor="@color/text_primary"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="XP"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textColor="@color/text_secondary"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatFollowing"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="0"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textColor="@color/text_primary"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="A seguir"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textColor="@color/text_secondary"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatFollowers"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="0"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textColor="@color/text_primary"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Seguidores"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textColor="@color/text_secondary"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvStatActiveDays"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="0"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textColor="@color/text_primary"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Dias ativos"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textColor="@color/text_secondary"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- MAIN BUTTON -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnAddFriends"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:text="Adicionar Amigos"
|
||||||
|
android:backgroundTint="@color/primary_purple"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:cornerRadius="12dp"
|
||||||
|
android:layout_marginBottom="32dp"/>
|
||||||
|
|
||||||
|
<!-- VISÃO GERAL -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="VISÃO GERAL"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:layout_marginBottom="12dp" />
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scrollbars="none"
|
||||||
|
android:layout_marginBottom="32dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<include layout="@layout/item_stat_small"
|
||||||
|
android:id="@+id/statStreak"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<include layout="@layout/item_stat_small"
|
||||||
|
android:id="@+id/statLeague"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<include layout="@layout/item_stat_small"
|
||||||
|
android:id="@+id/statXP"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<include layout="@layout/item_stat_small"
|
||||||
|
android:id="@+id/statFocusTime"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
<!-- 👥 AMIGOS -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="AMIGOS"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:layout_centerVertical="true"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnViewAllFriends"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="VER TODOS"
|
||||||
|
android:textColor="@color/primary_purple"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:padding="8dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnFindFriends"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="+"
|
||||||
|
android:textColor="@color/primary_purple"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/friendsListContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginBottom="32dp"/>
|
||||||
|
|
||||||
|
<!-- 🏆 MEDALHAS -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="12dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="MEDALHAS"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:layout_centerVertical="true"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnViewAllBadges"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:text=">"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="1dp"
|
||||||
|
app:cardBackgroundColor="@color/white">
|
||||||
|
<GridLayout
|
||||||
|
android:id="@+id/badgesGrid"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:columnCount="4"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:gravity="center">
|
||||||
|
<!-- Badges will be added here -->
|
||||||
|
</GridLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<!-- 🔘 BOTÕES DE ACÇÃO -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnLogout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:text="Terminar Sessão"
|
||||||
|
android:backgroundTint="@color/background_light"
|
||||||
|
android:textColor="@color/error_red"
|
||||||
|
app:strokeColor="@color/error_red"
|
||||||
|
app:strokeWidth="1dp"
|
||||||
|
app:cornerRadius="12dp"
|
||||||
|
android:layout_marginBottom="40dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
|||||||
@@ -1,67 +1,71 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_vertical"
|
||||||
android:orientation="vertical">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/topConnector"
|
android:id="@+id/leftConnector"
|
||||||
android:layout_width="4dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="4dp"
|
||||||
android:background="@color/border_color" />
|
android:background="@color/border_color" />
|
||||||
|
|
||||||
<FrameLayout
|
<LinearLayout
|
||||||
android:id="@+id/nodeContainer"
|
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="80dp">
|
|
||||||
|
|
||||||
<!-- Progress Ring (Outer) -->
|
|
||||||
<ProgressBar
|
|
||||||
android:id="@+id/nodeProgress"
|
|
||||||
style="?android:attr/progressBarStyleHorizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:max="100"
|
|
||||||
android:progress="0"
|
|
||||||
android:progressDrawable="@drawable/node_progress_ring" />
|
|
||||||
|
|
||||||
<!-- Base Circle (Inner) -->
|
|
||||||
<View
|
|
||||||
android:id="@+id/nodeCircle"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:background="@drawable/node_circle_bg" />
|
|
||||||
|
|
||||||
<!-- Icon or Initial (Optional) -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/nodeDayInitial"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:text="S"
|
|
||||||
android:textColor="@color/text_secondary"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/nodeDayLabel"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:gravity="center"
|
||||||
android:text="SEG"
|
android:orientation="vertical">
|
||||||
android:textColor="@color/text_secondary"
|
|
||||||
android:textSize="12sp"
|
<FrameLayout
|
||||||
android:textStyle="bold" />
|
android:id="@+id/nodeContainer"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/nodeProgress"
|
||||||
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:max="100"
|
||||||
|
android:progress="0"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:progressDrawable="@drawable/node_progress_ring" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/nodeCircle"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/node_circle_bg" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/nodeDayInitial"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="S"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/nodeDayLabel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:text="SEG"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/bottomConnector"
|
android:id="@+id/rightConnector"
|
||||||
android:layout_width="4dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="4dp"
|
||||||
android:background="@color/border_color" />
|
android:background="@color/border_color" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user