From 5ed7b5542a1b3e17aad27bcfdbc8181a59ae5e83 Mon Sep 17 00:00:00 2001 From: ErikWaegerle Date: Mon, 25 May 2020 19:42:42 +0200 Subject: [PATCH 1/7] Customization of the icon in the NavigationDrawer menu --- app/src/main/res/menu/menu_drawer_main.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/menu/menu_drawer_main.xml b/app/src/main/res/menu/menu_drawer_main.xml index 065b116..f8e8a43 100644 --- a/app/src/main/res/menu/menu_drawer_main.xml +++ b/app/src/main/res/menu/menu_drawer_main.xml @@ -5,7 +5,7 @@ android:checkableBehavior="all"> - From 514750650d04cb094b2560f3865110d905f4608e Mon Sep 17 00:00:00 2001 From: ErikWaegerle Date: Mon, 25 May 2020 19:47:34 +0200 Subject: [PATCH 2/7] Inserting a new activity in the Manifest for the Daily Sudoku. --- app/src/main/AndroidManifest.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c929de3..a1cc005 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -30,6 +30,11 @@ android:label="@string/app_name" android:theme="@style/AppTheme.NoActionBar"> + + Date: Mon, 25 May 2020 20:04:02 +0200 Subject: [PATCH 3/7] Extension of the method goToNavigateItem() with dailySudoku Item. Adds NavigationDrawer functionality. --- .../org/secuso/privacyfriendlysudoku/ui/MainActivity.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java index 70878d3..4a378c4 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java @@ -30,6 +30,7 @@ import org.secuso.privacyfriendlysudoku.controller.NewLevelManager; import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer; import org.secuso.privacyfriendlysudoku.game.GameDifficulty; import org.secuso.privacyfriendlysudoku.game.GameType; +import org.secuso.privacyfriendlysudoku.ui.view.DailySudokuActivity; import org.secuso.privacyfriendlysudoku.ui.view.R; import java.util.LinkedList; @@ -330,6 +331,11 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig overridePendingTransition(0, 0); break; + case R.id.nav_dailySudoku_main: + intent = new Intent(this, DailySudokuActivity.class); + startActivity(intent); + break; + default: } return true; From dd9a66eb8cdcf160234d9a4268d253de2bcf99e9 Mon Sep 17 00:00:00 2001 From: ErikWaegerle Date: Mon, 25 May 2020 20:12:50 +0200 Subject: [PATCH 4/7] 1.) Creating a Daily Sudoku Activity XML 2.) Adaptation of the layout 3.) Inserting the app and toolbar into the layout 4.) Use the layout of fragment_stats.xml 5.) Adaptation and modification of the layout see Mockup 3 --- .../main/res/layout/activity_daily_sudoku.xml | 417 ++++++++++++++++++ 1 file changed, 417 insertions(+) create mode 100644 app/src/main/res/layout/activity_daily_sudoku.xml diff --git a/app/src/main/res/layout/activity_daily_sudoku.xml b/app/src/main/res/layout/activity_daily_sudoku.xml new file mode 100644 index 0000000..16983d5 --- /dev/null +++ b/app/src/main/res/layout/activity_daily_sudoku.xml @@ -0,0 +1,417 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From f9744bc894190016eb8b8714b83c7bfcf045bcf1 Mon Sep 17 00:00:00 2001 From: ErikWaegerle Date: Mon, 25 May 2020 20:16:16 +0200 Subject: [PATCH 5/7] Embedding a vector graphic for the tab "Daily Sudoku" in the NavigationDrawer menu --- app/src/main/res/drawable/ic_menu_daily_sudoku.xml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/src/main/res/drawable/ic_menu_daily_sudoku.xml diff --git a/app/src/main/res/drawable/ic_menu_daily_sudoku.xml b/app/src/main/res/drawable/ic_menu_daily_sudoku.xml new file mode 100644 index 0000000..2239a4f --- /dev/null +++ b/app/src/main/res/drawable/ic_menu_daily_sudoku.xml @@ -0,0 +1,9 @@ + + + From 5d620829c446378f0fc52c55a11011cbe46cab0e Mon Sep 17 00:00:00 2001 From: ErikWaegerle Date: Mon, 25 May 2020 20:21:12 +0200 Subject: [PATCH 6/7] 1.) Creating the class DailySudokuActivity 2.) Implementing the onCreate() method --- .../ui/view/DailySudokuActivity.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/DailySudokuActivity.java diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/DailySudokuActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/DailySudokuActivity.java new file mode 100644 index 0000000..96aeba9 --- /dev/null +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/view/DailySudokuActivity.java @@ -0,0 +1,32 @@ +package org.secuso.privacyfriendlysudoku.ui.view; + +import android.content.SharedPreferences; +import android.os.Bundle; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer; +import java.util.List; + +public class DailySudokuActivity extends AppCompatActivity { + + List loadableGameList; + SharedPreferences settings; + + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.activity_daily_sudoku); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + + + androidx.appcompat.app.ActionBar actionBar = getSupportActionBar(); + actionBar.setTitle("Daily Sudoku"); + actionBar.setDisplayHomeAsUpEnabled(true); + + + + } +} \ No newline at end of file From b41ff4b238b7740984eb9862e2a4123dbfd84819 Mon Sep 17 00:00:00 2001 From: ErikWaegerle Date: Tue, 26 May 2020 01:13:13 +0200 Subject: [PATCH 7/7] Changes to the layout 1.) Increase the number of stars to 4 2.) Creation of the button "Start DailySudoku" 3.) Positioning of the individual elements in the layout --- .../main/res/layout/activity_daily_sudoku.xml | 850 ++++++++++-------- 1 file changed, 479 insertions(+), 371 deletions(-) diff --git a/app/src/main/res/layout/activity_daily_sudoku.xml b/app/src/main/res/layout/activity_daily_sudoku.xml index 16983d5..18bfd7d 100644 --- a/app/src/main/res/layout/activity_daily_sudoku.xml +++ b/app/src/main/res/layout/activity_daily_sudoku.xml @@ -1,417 +1,525 @@ - + app:statusBarBackground="?attr/colorPrimary"> - - - - - - - - - - - + app:layout_constraintBottom_toTopOf="@+id/main_content" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + + + + + + + + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingBottom="@dimen/activity_vertical_margin" + android:weightSum="10" + tools:context="org.secuso.privacyfriendlysudoku.ui.StatsActivity$PlaceholderFragment"> - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:foregroundGravity="center_vertical" /> + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + android:weightSum="3"> - - - - - - - - - - - - - + android:gravity="center_vertical"> - - - - + + - - - - - - - - - - - - - + android:layout_weight="1" + android:gravity="center_vertical"> - - - - + - - - - + + - - - - - - - - + + + + + + + + + + + - + android:gravity="center_vertical"> - - - - + + - + + + + + + + + + + + + + + + + - - - + android:weightSum="3"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + android:layout_width="wrap_content" + android:layout_height="0dp" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="@+id/linearLayout6" + app:layout_constraintTop_toBottomOf="@+id/linearLayout6" > + + - \ No newline at end of file + \ No newline at end of file