continuar
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
<activity android:name=".ForgotPasswordActivity" />
|
||||
<activity android:name=".MainActivity" />
|
||||
<activity android:name=".SettingsActivity" />
|
||||
<activity android:name=".StreakActivity" />
|
||||
|
||||
|
||||
</application>
|
||||
|
||||
|
||||
@@ -8,22 +8,37 @@ import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.animation.BounceInterpolator;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import java.util.Calendar;
|
||||
import java.util.Locale;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class InicioFragment extends Fragment {
|
||||
|
||||
private TextView tvTimer;
|
||||
private TextView tvTimer, tvProgressText;
|
||||
private FrameLayout timerBlock;
|
||||
private LinearLayout tasksContainer;
|
||||
private ProgressBar pbDailyTasks;
|
||||
private CountDownTimer countDownTimer;
|
||||
private LinearLayout progressPathContainer;
|
||||
private List<View> dayNodes = new ArrayList<>();
|
||||
private int currentDayIndex = 0; // 0-based index for the current day in the path
|
||||
|
||||
private boolean isTimerRunning = false;
|
||||
private long timeLeftInMillis = 25 * 60 * 1000; // 25 minutos
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
@@ -32,23 +47,42 @@ public class InicioFragment extends Fragment {
|
||||
tvTimer = view.findViewById(R.id.tvTimer);
|
||||
timerBlock = view.findViewById(R.id.timerBlock);
|
||||
tasksContainer = view.findViewById(R.id.tasksContainer);
|
||||
tvProgressText = view.findViewById(R.id.tvProgressText);
|
||||
pbDailyTasks = view.findViewById(R.id.pbDailyTasks);
|
||||
progressPathContainer = view.findViewById(R.id.progressPathContainer);
|
||||
|
||||
initProgressPath();
|
||||
addSampleTasks();
|
||||
|
||||
timerBlock.setOnClickListener(v -> {
|
||||
if (!isTimerRunning) {
|
||||
startTimer();
|
||||
} else {
|
||||
pauseTimer();
|
||||
}
|
||||
});
|
||||
|
||||
View btnStartFocus = view.findViewById(R.id.btnStartFocus);
|
||||
if (btnStartFocus != null) {
|
||||
btnStartFocus.setOnClickListener(v -> {
|
||||
if (!isTimerRunning) {
|
||||
startTimer();
|
||||
((TextView)btnStartFocus).setText("Pausar Foco");
|
||||
} else {
|
||||
pauseTimer();
|
||||
((TextView)btnStartFocus).setText("Continuar Foco");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
view.findViewById(R.id.btnAddTasks).setOnClickListener(v -> {
|
||||
Toast.makeText(getContext(), "Adicionar tarefas: Implementação futura", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
|
||||
View btnStreak = view.findViewById(R.id.btnStreak);
|
||||
if (btnStreak != null) {
|
||||
btnStreak.setOnClickListener(v -> {
|
||||
android.content.Intent intent = new android.content.Intent(getActivity(), StreakActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
updateCountDownText();
|
||||
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@@ -60,14 +94,171 @@ public class InicioFragment extends Fragment {
|
||||
"Fazer exercícios"
|
||||
};
|
||||
tasksContainer.removeAllViews();
|
||||
for (String taskLabel : sampleTasks) {
|
||||
int completedCount = 0;
|
||||
|
||||
for (int i = 0; i < sampleTasks.length; i++) {
|
||||
String taskLabel = sampleTasks[i];
|
||||
|
||||
// Create a custom Duo-style card for each task
|
||||
androidx.cardview.widget.CardView card = new androidx.cardview.widget.CardView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT
|
||||
);
|
||||
params.setMargins(0, 0, 0, 16);
|
||||
card.setLayoutParams(params);
|
||||
card.setRadius(getResources().getDimension(R.dimen.radius_md));
|
||||
card.setCardElevation(2f);
|
||||
card.setContentPadding(16, 16, 16, 16);
|
||||
|
||||
LinearLayout layout = new LinearLayout(getContext());
|
||||
layout.setOrientation(LinearLayout.HORIZONTAL);
|
||||
layout.setGravity(android.view.Gravity.CENTER_VERTICAL);
|
||||
|
||||
CheckBox cb = new CheckBox(getContext());
|
||||
cb.setText(taskLabel);
|
||||
cb.setTextColor(getResources().getColor(R.color.black));
|
||||
tasksContainer.addView(cb);
|
||||
cb.setTextColor(getResources().getColor(R.color.text_primary));
|
||||
cb.setTextSize(16);
|
||||
|
||||
// Simulated check for one task
|
||||
if (i == 0) {
|
||||
cb.setChecked(true);
|
||||
completedCount++;
|
||||
card.setCardBackgroundColor(getResources().getColor(R.color.background_light));
|
||||
cb.setTextColor(getResources().getColor(R.color.success_green));
|
||||
}
|
||||
|
||||
layout.addView(cb);
|
||||
card.addView(layout);
|
||||
tasksContainer.addView(card);
|
||||
|
||||
final int finalI = i;
|
||||
cb.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
if (isChecked) {
|
||||
cb.setTextColor(getResources().getColor(R.color.success_green));
|
||||
} else {
|
||||
cb.setTextColor(getResources().getColor(R.color.text_primary));
|
||||
}
|
||||
updateProgress();
|
||||
});
|
||||
}
|
||||
|
||||
updateProgress();
|
||||
}
|
||||
|
||||
private void updateProgress() {
|
||||
int total = tasksContainer.getChildCount();
|
||||
int completed = 0;
|
||||
for (int i = 0; i < total; i++) {
|
||||
View child = tasksContainer.getChildAt(i);
|
||||
if (child instanceof androidx.cardview.widget.CardView) {
|
||||
CheckBox cb = (CheckBox) ((LinearLayout)((androidx.cardview.widget.CardView) child).getChildAt(0)).getChildAt(0);
|
||||
if (cb.isChecked()) completed++;
|
||||
}
|
||||
}
|
||||
|
||||
if (tvProgressText != null) {
|
||||
tvProgressText.setText(completed + " de " + total + " concluídos");
|
||||
}
|
||||
if (pbDailyTasks != null && total > 0) {
|
||||
int progress = (completed * 100) / total;
|
||||
pbDailyTasks.setProgress(progress);
|
||||
updatePathProgress(progress);
|
||||
}
|
||||
}
|
||||
|
||||
private void initProgressPath() {
|
||||
if (getContext() == null || progressPathContainer == null) return;
|
||||
|
||||
progressPathContainer.removeAllViews();
|
||||
dayNodes.clear();
|
||||
|
||||
String[] days = {"SEG", "TER", "QUA", "QUI", "SEX", "SÁB", "DOM"};
|
||||
String[] initials = {"S", "T", "Q", "Q", "S", "S", "D"};
|
||||
|
||||
// Get current day of week (Calendar.MONDAY is 2, SUNDAY is 1)
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
|
||||
// Map to 0-6 (Mon-Sun)
|
||||
currentDayIndex = (dayOfWeek + 5) % 7;
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
View node = LayoutInflater.from(getContext()).inflate(R.layout.item_day_node, progressPathContainer, false);
|
||||
|
||||
View topConnector = node.findViewById(R.id.topConnector);
|
||||
View bottomConnector = node.findViewById(R.id.bottomConnector);
|
||||
View nodeCircle = node.findViewById(R.id.nodeCircle);
|
||||
TextView nodeDayInitial = node.findViewById(R.id.nodeDayInitial);
|
||||
TextView nodeDayLabel = node.findViewById(R.id.nodeDayLabel);
|
||||
ProgressBar nodeProgress = node.findViewById(R.id.nodeProgress);
|
||||
|
||||
nodeDayLabel.setText(days[i]);
|
||||
nodeDayInitial.setText(initials[i]);
|
||||
|
||||
// Hide connectors at ends
|
||||
if (i == 0) topConnector.setVisibility(View.INVISIBLE);
|
||||
if (i == 6) bottomConnector.setVisibility(View.INVISIBLE);
|
||||
|
||||
// Style based on state
|
||||
if (i < currentDayIndex) {
|
||||
// Past day - Assume completed for demo
|
||||
nodeCircle.setBackgroundResource(R.drawable.node_circle_bg);
|
||||
nodeCircle.getBackground().setTint(getResources().getColor(R.color.success_green));
|
||||
nodeDayInitial.setTextColor(getResources().getColor(R.color.white));
|
||||
nodeProgress.setVisibility(View.GONE);
|
||||
} else if (i == currentDayIndex) {
|
||||
// Today
|
||||
nodeCircle.setBackgroundResource(R.drawable.node_circle_bg);
|
||||
nodeCircle.getBackground().setTint(getResources().getColor(R.color.primary_purple));
|
||||
nodeDayInitial.setTextColor(getResources().getColor(R.color.white));
|
||||
nodeDayLabel.setTextColor(getResources().getColor(R.color.primary_purple));
|
||||
nodeProgress.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
// Future
|
||||
node.setAlpha(0.4f);
|
||||
nodeProgress.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
dayNodes.add(node);
|
||||
progressPathContainer.addView(node);
|
||||
}
|
||||
}
|
||||
|
||||
private void updatePathProgress(int progress) {
|
||||
if (currentDayIndex >= dayNodes.size()) return;
|
||||
|
||||
View todayNode = dayNodes.get(currentDayIndex);
|
||||
ProgressBar nodeProgress = todayNode.findViewById(R.id.nodeProgress);
|
||||
View nodeCircle = todayNode.findViewById(R.id.nodeCircle);
|
||||
TextView nodeDayInitial = todayNode.findViewById(R.id.nodeDayInitial);
|
||||
|
||||
if (nodeProgress != null) {
|
||||
nodeProgress.setProgress(progress);
|
||||
}
|
||||
|
||||
if (progress == 100) {
|
||||
// Task completion animation
|
||||
nodeCircle.getBackground().setTint(getResources().getColor(R.color.success_green));
|
||||
triggerSuccessAnimation(todayNode);
|
||||
} else {
|
||||
nodeCircle.getBackground().setTint(getResources().getColor(R.color.primary_purple));
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerSuccessAnimation(View view) {
|
||||
ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 1f, 1.2f, 1f);
|
||||
ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 1f, 1.2f, 1f);
|
||||
|
||||
AnimatorSet animatorSet = new AnimatorSet();
|
||||
animatorSet.setDuration(500);
|
||||
animatorSet.setInterpolator(new BounceInterpolator());
|
||||
animatorSet.playTogether(scaleX, scaleY);
|
||||
animatorSet.start();
|
||||
|
||||
Toast.makeText(getContext(), "Dia Completado! 🎉", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
private void startTimer() {
|
||||
countDownTimer = new CountDownTimer(timeLeftInMillis, 1000) {
|
||||
@Override
|
||||
@@ -79,7 +270,7 @@ public class InicioFragment extends Fragment {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
isTimerRunning = false;
|
||||
if(getContext() != null) Toast.makeText(getContext(), "Foco concluído!", Toast.LENGTH_LONG).show();
|
||||
if(getContext() != null) Toast.makeText(getContext(), "Foco concluído! +50 XP", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}.start();
|
||||
|
||||
@@ -93,6 +284,7 @@ public class InicioFragment extends Fragment {
|
||||
isTimerRunning = false;
|
||||
}
|
||||
|
||||
|
||||
private void updateCountDownText() {
|
||||
int minutes = (int) (timeLeftInMillis / 1000) / 60;
|
||||
int seconds = (int) (timeLeftInMillis / 1000) % 60;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="@color/primary_light"
|
||||
android:fillColor="@color/primary_purple"
|
||||
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background_purple">
|
||||
android:background="@color/background_light">
|
||||
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_host_fragment"
|
||||
|
||||
@@ -21,14 +21,16 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_back"
|
||||
app:tint="@color/icon_light" />
|
||||
app:tint="@color/text_secondary" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/settings"
|
||||
android:textColor="@color/text_light"
|
||||
android:textColor="@color/text_primary"
|
||||
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
@@ -48,7 +50,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preferences"
|
||||
android:textColor="@color/text_muted_light"
|
||||
android:textColor="@color/text_secondary"
|
||||
|
||||
android:textAllCaps="true"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
@@ -76,7 +79,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dark_mode"
|
||||
android:textColor="@color/text_light"
|
||||
android:textColor="@color/text_primary"
|
||||
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -94,7 +98,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/account"
|
||||
android:textColor="@color/text_muted_light"
|
||||
android:textColor="@color/text_secondary"
|
||||
|
||||
android:textAllCaps="true"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
@@ -119,14 +124,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="email@exemplo.com"
|
||||
android:textColor="@color/text_light"
|
||||
android:textColor="@color/text_primary"
|
||||
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/border_light"
|
||||
android:background="@color/border_color"
|
||||
|
||||
android:layout_marginVertical="12dp" />
|
||||
|
||||
<TextView
|
||||
@@ -134,7 +141,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/change_password"
|
||||
android:textColor="@color/primary_light"
|
||||
android:textColor="@color/primary_purple"
|
||||
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:clickable="true"
|
||||
@@ -147,7 +155,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/privacy"
|
||||
android:textColor="@color/text_muted_light"
|
||||
android:textColor="@color/text_secondary"
|
||||
|
||||
android:textAllCaps="true"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
@@ -175,7 +184,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/private_account"
|
||||
android:textColor="@color/text_light"
|
||||
android:textColor="@color/text_primary"
|
||||
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -193,7 +203,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/notifications"
|
||||
android:textColor="@color/text_muted_light"
|
||||
android:textColor="@color/text_secondary"
|
||||
|
||||
android:textAllCaps="true"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
@@ -221,7 +232,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/notifications"
|
||||
android:textColor="@color/text_light"
|
||||
android:textColor="@color/text_primary"
|
||||
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -239,7 +251,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_section"
|
||||
android:textColor="@color/text_muted_light"
|
||||
android:textColor="@color/text_secondary"
|
||||
|
||||
android:textAllCaps="true"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
@@ -267,7 +280,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/language"
|
||||
android:textColor="@color/text_light"
|
||||
android:textColor="@color/text_primary"
|
||||
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -287,14 +301,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:text="@string/logout"
|
||||
android:textColor="@color/error_light"
|
||||
android:textColor="@color/error_red"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="#FEE2E2"
|
||||
app:cornerRadius="16dp"
|
||||
app:elevation="0dp"
|
||||
app:icon="@drawable/ic_back"
|
||||
app:iconGravity="textStart"
|
||||
app:iconTint="@color/error_light"
|
||||
app:iconTint="@color/error_red"
|
||||
|
||||
android:layout_marginBottom="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background_purple">
|
||||
android:background="@color/background_light"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -15,7 +16,7 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp">
|
||||
android:layout_marginBottom="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
@@ -23,10 +24,11 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvGreeting"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/greeting"
|
||||
android:textColor="@color/white"
|
||||
android:text="Olá, Jvitor!"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -34,117 +36,224 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/subtitle"
|
||||
android:textColor="#EEEEEE"
|
||||
android:textSize="14sp" />
|
||||
android:text="Pronto para ser produtivo?"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="👋"
|
||||
android:textSize="28sp" />
|
||||
app:cardCornerRadius="28dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_nav_profile"
|
||||
app:tint="@color/primary_purple" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Desafios do Dia Card -->
|
||||
<!-- Progress Overview -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="@dimen/radius_duo"
|
||||
app:cardElevation="2dp"
|
||||
app:contentPadding="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="Desafios do Dia"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- Task List Placeholder (In Java we use RecyclerView) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/tasksContainer"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAddTasks"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Desafios Diários"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvProgressText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="1 de 3 concluídos"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbDailyTasks"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:backgroundTint="@color/purple_500"
|
||||
android:text="+ Adicionar desafios diários"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white" />
|
||||
android:layout_height="12dp"
|
||||
android:max="100"
|
||||
android:progress="33"
|
||||
android:progressDrawable="@drawable/progress_bar_duo" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Modo Foco Card -->
|
||||
<!-- Daily Challenges List -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="Meus Desafios"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tasksContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAddTasks"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:background="@drawable/button_primary"
|
||||
android:text="+ Adicionar Desafio"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="@null" />
|
||||
|
||||
<!-- Focus Mode Section -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
android:layout_marginBottom="40dp"
|
||||
app:cardCornerRadius="@dimen/radius_duo"
|
||||
app:cardElevation="2dp"
|
||||
app:contentPadding="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:text="Modo Foco"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<FrameLayout
|
||||
android:id="@+id/timerBlock"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:background="@drawable/timer_circle_bg"
|
||||
android:elevation="4dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/timerBlock"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/rounded_timer_bg">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTimer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="25:00"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/primary_purple"
|
||||
android:textSize="48sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Produtividade é o segredo do sucesso"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="+50 XP"
|
||||
android:textColor="@color/reward_yellow"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnStartFocus"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/button_primary"
|
||||
android:text="Começar Foco"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="@null" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Daily Progress Path Section -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Caminho de Progresso Diário"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="19sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/btnStreak"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_flame" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/progressPathContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/card_duo"
|
||||
android:elevation="2dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="32dp"
|
||||
android:layout_marginBottom="40dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@@ -3,359 +3,416 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background_purple"
|
||||
android:background="@color/background_light"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- HEADER AZUL -->
|
||||
<FrameLayout
|
||||
<!-- Top Header -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="20dp">
|
||||
android:layout_marginBottom="24dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnSettings"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="top|end"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_settings"
|
||||
app:tint="@color/white" />
|
||||
app:tint="@color/primary_purple" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Profile Info -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="50dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivAvatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_nav_profile"
|
||||
app:tint="@color/primary_purple" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUsername"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Jvitor"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="26sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHandle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@jvitor_prod"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginTop="4dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Stats Section -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="Estatísticas"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:columnCount="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- Streak Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="6dp"
|
||||
app:cardCornerRadius="@dimen/radius_duo"
|
||||
app:cardElevation="2dp"
|
||||
app:contentPadding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🔥"
|
||||
android:textSize="24sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStreakValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="15"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ofensiva"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- XP Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="6dp"
|
||||
app:cardCornerRadius="@dimen/radius_duo"
|
||||
app:cardElevation="2dp"
|
||||
app:contentPadding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="⚡"
|
||||
android:textSize="24sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTotalXP"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2450"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Total de XP"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- League Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="6dp"
|
||||
app:cardCornerRadius="@dimen/radius_duo"
|
||||
app:cardElevation="2dp"
|
||||
app:contentPadding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🏆"
|
||||
android:textSize="24sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLeagueName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Prata"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Liga Atual"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Achievements Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="6dp"
|
||||
app:cardCornerRadius="@dimen/radius_duo"
|
||||
app:cardElevation="2dp"
|
||||
app:contentPadding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🏅"
|
||||
android:textSize="24sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAchievementsCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="8"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Conquistas"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</GridLayout>
|
||||
|
||||
<!-- Friends Section -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Amigos"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnViewAllFriends"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Ver Todos"
|
||||
android:textColor="@color/primary_purple"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/circle_bg">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_nav_profile"
|
||||
app:tint="@color/purple_500"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- INFO DO UTILIZADOR -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Jvitor"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@usuario"
|
||||
android:textColor="#888888"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- Invite Item -->
|
||||
<LinearLayout
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="🇬🇧 1 Curso"
|
||||
android:textColor="#bbbbbb"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="13 Seguindo"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:cardCornerRadius="30dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardBackgroundColor="@color/border_color">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="32sp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Convidar"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Sample Friend 1 -->
|
||||
<LinearLayout
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="8 Seguidores"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:cardCornerRadius="30dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_nav_profile"
|
||||
app:tint="@color/reward_yellow" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Maria"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="450 XP"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Sample Friend 2 -->
|
||||
<LinearLayout
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:cardCornerRadius="30dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_nav_profile"
|
||||
app:tint="@color/success_green" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="João"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="320 XP"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#ffffff"
|
||||
android:text="+ ADICIONAR AMIGOS"
|
||||
android:textColor="@color/purple_500"
|
||||
android:textStyle="bold" />
|
||||
<Button
|
||||
android:id="@+id/btnInviteFriends"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/button_primary"
|
||||
android:text="+ Encontrar Amigos"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="@null" />
|
||||
|
||||
<!-- VISÃO GERAL -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="Visão Geral"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:rowCount="2">
|
||||
|
||||
<!-- CARD OFENSIVA -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="6dp"
|
||||
android:background="@drawable/dark_card_bg"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:text="🔥"
|
||||
android:textSize="24sp"
|
||||
android:gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="21"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ofensiva"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- CARD XP -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="6dp"
|
||||
android:background="@drawable/dark_card_bg"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:text="⚡"
|
||||
android:textSize="24sp"
|
||||
android:gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1433"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Total de XP"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- CARD LIGA -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="6dp"
|
||||
android:background="@drawable/dark_card_bg"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:text="🏆"
|
||||
android:textSize="24sp"
|
||||
android:gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Esmeralda"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Liga Atual"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- CARD TOP 3 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="6dp"
|
||||
android:background="@drawable/dark_card_bg"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:text="🏅"
|
||||
android:textSize="24sp"
|
||||
android:gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Pódios no Top 3"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</GridLayout>
|
||||
|
||||
|
||||
<!-- AMIGOS -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="Ofensivas dos Amigos"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- Amigo Vazio (Adicionar) -->
|
||||
<LinearLayout
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/circle_dashed_bg">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="32sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Convidar"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
@@ -1,41 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Basic Colors -->
|
||||
<!-- Duolingo-inspired Palette -->
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="black">#11181C</color>
|
||||
|
||||
<!-- Missing Standard Colors -->
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#6a00fa</color>
|
||||
<color name="purple_700">#3700B3</color>
|
||||
<color name="teal_200">#03DAC5</color>
|
||||
<color name="teal_700">#018786</color>
|
||||
<color name="background_purple">#F3E5F5</color>
|
||||
<color name="primary_purple">#7C3AED</color>
|
||||
<color name="primary_purple_dark">#6D28D9</color>
|
||||
<color name="background_light">#F9FAFB</color>
|
||||
|
||||
<!-- Light Theme Tokens -->
|
||||
<color name="text_light">#11181C</color>
|
||||
<color name="text_muted_light">#6B7280</color>
|
||||
<color name="background_light">#FFFFFF</color>
|
||||
<color name="surface_light">#F8FAFC</color>
|
||||
<color name="card_light">#FFFFFF</color>
|
||||
<color name="border_light">#E5E7EB</color>
|
||||
<color name="icon_light">#687076</color>
|
||||
<color name="primary_light">#6a00fa</color> <!-- Mantendo o roxo premium solicitado -->
|
||||
<color name="secondary_light">#64748B</color>
|
||||
<color name="success_light">#16A34A</color>
|
||||
<color name="error_light">#DC2626</color>
|
||||
<color name="warning_light">#F59E0B</color>
|
||||
<color name="info_light">#0EA5E9</color>
|
||||
<color name="success_green">#22C55E</color>
|
||||
<color name="reward_yellow">#FACC15</color>
|
||||
<color name="error_red">#EF4444</color>
|
||||
<color name="streak_orange">#FF9600</color>
|
||||
<color name="streak_blue">#33A1FF</color>
|
||||
|
||||
|
||||
<!-- Dark Theme Tokens (for future use in values-night) -->
|
||||
<color name="text_dark">#ECEDEE</color>
|
||||
<color name="text_muted_dark">#94A3B8</color>
|
||||
<color name="background_dark">#0F172A</color>
|
||||
<color name="surface_dark">#1E293B</color>
|
||||
<color name="card_dark">#111827</color>
|
||||
<color name="border_dark">#334155</color>
|
||||
<color name="icon_dark">#9BA1A6</color>
|
||||
<color name="primary_dark">#38bdf8</color>
|
||||
<color name="secondary_dark">#94A3B8</color>
|
||||
<color name="success_dark">#22C55E</color>
|
||||
<!-- UI Element Colors -->
|
||||
<color name="text_primary">#11181C</color>
|
||||
<color name="text_secondary">#6B7280</color>
|
||||
<color name="card_background">#FFFFFF</color>
|
||||
<color name="border_color">#E5E7EB</color>
|
||||
|
||||
<!-- Legacy compatibility (can be refactored later) -->
|
||||
<color name="purple_500">#7C3AED</color>
|
||||
<color name="background_purple">#F9FAFB</color>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<dimen name="radius_md">8dp</dimen>
|
||||
<dimen name="radius_lg">12dp</dimen>
|
||||
<dimen name="radius_xl">16dp</dimen>
|
||||
<dimen name="radius_duo">24dp</dimen>
|
||||
|
||||
|
||||
<!-- Font Sizes -->
|
||||
<dimen name="font_heading1">32sp</dimen>
|
||||
|
||||
@@ -3,24 +3,28 @@
|
||||
<!-- Reusable Styles Replicating React Native Components -->
|
||||
|
||||
<style name="ThemedText">
|
||||
<item name="android:textColor">@color/text_light</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="ThemedText.Heading1">
|
||||
<item name="android:textSize">@dimen/font_heading1</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/text_light</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="ThemedText.Heading2">
|
||||
<item name="android:textSize">@dimen/font_heading2</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/text_light</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="ThemedText.Body">
|
||||
<item name="android:textSize">@dimen/font_body</item>
|
||||
<item name="android:textColor">@color/text_light</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="FluxupButton" parent="Widget.MaterialComponents.Button">
|
||||
@@ -42,7 +46,8 @@
|
||||
<item name="android:paddingStart">@dimen/spacing_md</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_md</item>
|
||||
<item name="android:textSize">@dimen/font_body</item>
|
||||
<item name="android:textColor">@color/text_light</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
|
||||
<item name="android:layout_marginBottom">@dimen/spacing_md</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.Fluxup" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<style name="Theme.Fluxup" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorPrimary">@color/primary_purple</item>
|
||||
<item name="colorPrimaryVariant">@color/primary_purple_dark</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorSecondary">@color/reward_yellow</item>
|
||||
<item name="colorSecondaryVariant">@color/reward_yellow</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||
<item name="android:statusBarColor">@color/background_light</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:windowBackground">@color/background_light</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user