..asd
This commit is contained in:
@@ -98,7 +98,7 @@ public class ClientDashboardActivity extends AppCompatActivity {
|
|||||||
// NovaReservaActivity
|
// NovaReservaActivity
|
||||||
// We pass the filter so it can maybe open directly or we just pass restaurant
|
// We pass the filter so it can maybe open directly or we just pass restaurant
|
||||||
// email
|
// email
|
||||||
intent.putExtra("category_filter", restaurant.getCategory());
|
intent.putExtra("restaurant", restaurant);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -293,7 +293,7 @@ public class ClientDashboardActivity extends AppCompatActivity {
|
|||||||
featuredAdapter = new FeaturedRestaurantAdapter(featuredList,
|
featuredAdapter = new FeaturedRestaurantAdapter(featuredList,
|
||||||
mainAdapter instanceof RestaurantAdapter ? restaurant -> {
|
mainAdapter instanceof RestaurantAdapter ? restaurant -> {
|
||||||
Intent intent = new Intent(this, ExplorarRestaurantesActivity.class);
|
Intent intent = new Intent(this, ExplorarRestaurantesActivity.class);
|
||||||
intent.putExtra("category_filter", restaurant.getCategory());
|
intent.putExtra("restaurant", restaurant);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
} : null);
|
} : null);
|
||||||
rvFeatured.setAdapter(featuredAdapter);
|
rvFeatured.setAdapter(featuredAdapter);
|
||||||
|
|||||||
@@ -59,6 +59,11 @@ public class ExplorarRestaurantesActivity extends AppCompatActivity {
|
|||||||
back.setOnClickListener(v -> handleBackNavigation());
|
back.setOnClickListener(v -> handleBackNavigation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getIntent().hasExtra("restaurant")) {
|
||||||
|
selectedRestaurant = (com.example.pap_teste.models.Restaurant) getIntent().getSerializableExtra("restaurant");
|
||||||
|
currentState = State.DETAILS;
|
||||||
|
}
|
||||||
|
|
||||||
setupRestaurantList();
|
setupRestaurantList();
|
||||||
updateViewState();
|
updateViewState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class FavoritosActivity extends AppCompatActivity {
|
|||||||
list = new ArrayList<>();
|
list = new ArrayList<>();
|
||||||
adapter = new RestaurantAdapter(list, restaurant -> {
|
adapter = new RestaurantAdapter(list, restaurant -> {
|
||||||
android.content.Intent intent = new android.content.Intent(this, ExplorarRestaurantesActivity.class);
|
android.content.Intent intent = new android.content.Intent(this, ExplorarRestaurantesActivity.class);
|
||||||
intent.putExtra("category_filter", restaurant.getCategory()); // just as demo
|
intent.putExtra("restaurant", restaurant);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
});
|
});
|
||||||
rv.setAdapter(adapter);
|
rv.setAdapter(adapter);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.example.pap_teste.models;
|
package com.example.pap_teste.models;
|
||||||
|
|
||||||
public class Restaurant {
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class Restaurant implements Serializable {
|
||||||
private String name;
|
private String name;
|
||||||
private String category;
|
private String category;
|
||||||
private String email;
|
private String email;
|
||||||
|
|||||||
@@ -36,37 +36,22 @@
|
|||||||
android:id="@+id/txtClientGreeting"
|
android:id="@+id/txtClientGreeting"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif"
|
||||||
android:text="Olá, convidado!"
|
android:text="Olá, convidado!"
|
||||||
android:textColor="@color/colorTextPrimary"
|
android:textColor="@color/colorTextPrimary"
|
||||||
android:textSize="28sp"
|
android:textSize="28sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:fontFamily="sans-serif"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/imgNotification"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
android:layout_marginEnd="16dp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Encontre a sua próxima mesa."
|
android:text="Encontre a sua próxima mesa."
|
||||||
android:textColor="@color/colorTextSecondary"
|
android:textColor="@color/colorTextSecondary"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/txtClientGreeting"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/imgNotification" />
|
app:layout_constraintTop_toBottomOf="@id/txtClientGreeting" />
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/imgNotification"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:background="@drawable/bg_circle_white"
|
|
||||||
android:src="@android:drawable/ic_popup_reminder"
|
|
||||||
app:tint="@color/colorTextPrimary"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/cardProfile"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/cardProfile"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/cardProfile" />
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/cardProfile"
|
android:id="@+id/cardProfile"
|
||||||
|
|||||||
@@ -19,13 +19,14 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/logoNaMesa"
|
android:id="@+id/logoNaMesa"
|
||||||
android:layout_width="100dp"
|
android:layout_width="160dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="156dp"
|
||||||
|
android:layout_marginTop="124dp"
|
||||||
android:src="@drawable/na_mesa"
|
android:src="@drawable/na_mesa"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.508"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
android:layout_marginTop="50dp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTitle"
|
android:id="@+id/txtTitle"
|
||||||
@@ -70,20 +71,13 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="387dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="24dp">
|
android:padding="24dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_tabs"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="3dp"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:background="@drawable/bg_tabs"
|
android:background="@drawable/bg_tabs"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
@@ -198,37 +192,37 @@
|
|||||||
android:layout_height="54dp"
|
android:layout_height="54dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:padding="12dp"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_visibility_off"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
android:padding="12dp"
|
||||||
|
android:src="@drawable/ic_visibility_off" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtForgotPassword"
|
android:id="@+id/txtForgotPassword"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:text="Esqueceu-se da palavra-passe?"
|
android:text="Esqueceu-se da palavra-passe?"
|
||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="visible"
|
android:visibility="visible" />
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"/>
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btnFinalCriarConta"
|
android:id="@+id/btnFinalCriarConta"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
app:cornerRadius="14dp"
|
|
||||||
app:backgroundTint="@color/colorPrimary"
|
|
||||||
android:text="Entrar"
|
android:text="Entrar"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
|
android:textColor="@color/white"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textColor="@color/white" />
|
app:backgroundTint="@color/colorPrimary"
|
||||||
|
app:cornerRadius="14dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user