Skip to content

Commit

Permalink
feat(main menu logic): main Menu some logic added, play and reset
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrucesdeveloper committed Feb 11, 2023
1 parent c140cf4 commit c277e6c
Show file tree
Hide file tree
Showing 25 changed files with 39 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
}

public void goNextActivity(View view) {
public void goToLinesMenuActivity(View view) {
Intent intent = new Intent(this, MenuMetroActivity.class);
startActivity(intent);
}

public void resetButton(View view) {
public void resetSharedPreferences(View view) {
// TODO - Add a prompt before deleting
SharedPreferences sharedPref = this.getSharedPreferences(
String.valueOf(R.string.app_name), Context.MODE_PRIVATE);
sharedPref.edit().clear().commit();
Expand Down
Binary file added app/src/main/res/drawable/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 14 additions & 12 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
tools:context=".activities.MainActivity">

<ImageView
android:id="@+id/imageViewButtonPlay"
android:id="@+id/imageViewLogo"
android:layout_width="253dp"
android:layout_height="202dp"
android:layout_marginTop="76dp"
Expand All @@ -19,46 +19,48 @@
app:srcCompat="@drawable/logo" />

<ImageView
android:id="@+id/imageView4"
android:id="@+id/imageViewButtonPlay"
android:layout_width="300dp"
android:layout_height="130dp"
android:layout_marginTop="2dp"
android:onClick="goToLinesMenuActivity"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageViewButtonPlay"
app:layout_constraintTop_toBottomOf="@+id/imageViewLogo"
app:srcCompat="@drawable/main_menu_button_play" />

<ImageView
android:id="@+id/imageView6"
android:id="@+id/imageViewButtonInformation"
android:layout_width="104dp"
android:layout_height="97dp"
android:layout_marginStart="48dp"
android:layout_marginTop="-16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView4"
app:layout_constraintTop_toBottomOf="@+id/imageViewButtonPlay"
app:srcCompat="@drawable/main_menu_button_information" />

<ImageView
android:id="@+id/imageView7"
android:id="@+id/imageViewButtonReset"
android:layout_width="95dp"
android:layout_height="95dp"
android:layout_marginStart="8dp"
android:layout_marginTop="-16dp"
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toStartOf="@+id/imageView8"
app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toBottomOf="@+id/imageView4"
android:onClick="resetSharedPreferences"
app:layout_constraintEnd_toStartOf="@+id/imageViewButtonConfiguration"
app:layout_constraintStart_toEndOf="@+id/imageViewButtonInformation"
app:layout_constraintTop_toBottomOf="@+id/imageViewButtonPlay"
app:srcCompat="@drawable/main_menu_button_reset" />

<ImageView
android:id="@+id/imageView8"
android:id="@+id/imageViewButtonConfiguration"
android:layout_width="95dp"
android:layout_height="95dp"
android:layout_marginTop="-16dp"
android:layout_marginEnd="48dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView7"
app:layout_constraintTop_toBottomOf="@+id/imageView4"
app:layout_constraintStart_toEndOf="@+id/imageViewButtonReset"
app:layout_constraintTop_toBottomOf="@+id/imageViewButtonPlay"
app:srcCompat="@drawable/main_menu_configuration" />

</androidx.constraintlayout.widget.ConstraintLayout>
Binary file added app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.MetroMetro" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>

<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#dcdddf</color>
</resources>

0 comments on commit c277e6c

Please sign in to comment.