diff --git a/app/src/main/java/com/block/web/builder/ui/activities/BaseActivity.java b/app/src/main/java/com/block/web/builder/ui/activities/BaseActivity.java index 9dfcd56..f4065a4 100644 --- a/app/src/main/java/com/block/web/builder/ui/activities/BaseActivity.java +++ b/app/src/main/java/com/block/web/builder/ui/activities/BaseActivity.java @@ -1,11 +1,13 @@ package com.block.web.builder.ui.activities; import android.os.Bundle; +import androidx.activity.EdgeToEdge; import androidx.appcompat.app.AppCompatActivity; public class BaseActivity extends AppCompatActivity { @Override protected void onCreate(Bundle arg0) { + EdgeToEdge.enable(this); super.onCreate(arg0); } } diff --git a/app/src/main/java/com/block/web/builder/ui/activities/MainActivity.java b/app/src/main/java/com/block/web/builder/ui/activities/MainActivity.java index e9fd869..47c15b6 100644 --- a/app/src/main/java/com/block/web/builder/ui/activities/MainActivity.java +++ b/app/src/main/java/com/block/web/builder/ui/activities/MainActivity.java @@ -14,7 +14,6 @@ import android.os.Environment; import android.provider.Settings; import android.view.View; -import androidx.activity.EdgeToEdge; import androidx.annotation.CallSuper; import androidx.appcompat.app.ActionBarDrawerToggle; import androidx.core.app.ActivityCompat; @@ -53,8 +52,6 @@ public class MainActivity extends BaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { - EdgeToEdge.enable(this); - super.onCreate(savedInstanceState); // Inflate and get instance of binding. diff --git a/app/src/main/java/com/block/web/builder/ui/dialogs/CreateProjectDialog.java b/app/src/main/java/com/block/web/builder/ui/dialogs/CreateProjectDialog.java index 2e90edb..e751927 100644 --- a/app/src/main/java/com/block/web/builder/ui/dialogs/CreateProjectDialog.java +++ b/app/src/main/java/com/block/web/builder/ui/dialogs/CreateProjectDialog.java @@ -14,7 +14,6 @@ import com.block.web.builder.listeners.ProjectCreationListener; import com.block.web.builder.objects.Project; import com.block.web.builder.ui.activities.MainActivity; -import com.block.web.builder.utils.ColorUtils; import com.block.web.builder.utils.ProjectNameValidator; import com.google.android.material.bottomsheet.BottomSheetDialog; import com.google.android.material.dialog.MaterialAlertDialogBuilder; @@ -40,10 +39,7 @@ public CreateProjectDialog( this.activity = activity; MaterialAlertDialogBuilder dialog = new MaterialAlertDialogBuilder(activity); - dialog - .getBackground() - .setTint( - ColorUtils.getColor(activity, com.google.android.material.R.attr.colorSurfaceVariant)); + dialog.setTitle(activity.getString(R.string.create_new_project)); LayoutCreateProjectBinding binding = diff --git a/app/src/main/java/com/block/web/builder/ui/dialogs/blockeditor/AddTextInBlockDialog.java b/app/src/main/java/com/block/web/builder/ui/dialogs/blockeditor/AddTextInBlockDialog.java index 913c1fb..ddba42e 100644 --- a/app/src/main/java/com/block/web/builder/ui/dialogs/blockeditor/AddTextInBlockDialog.java +++ b/app/src/main/java/com/block/web/builder/ui/dialogs/blockeditor/AddTextInBlockDialog.java @@ -6,7 +6,6 @@ import com.block.web.builder.R; import com.block.web.builder.databinding.LayoutAddTextInBlockBinding; import com.block.web.builder.listeners.ValueListener; -import com.block.web.builder.utils.ColorUtils; import com.google.android.material.dialog.MaterialAlertDialogBuilder; public class AddTextInBlockDialog extends MaterialAlertDialogBuilder { @@ -18,9 +17,6 @@ public class AddTextInBlockDialog extends MaterialAlertDialogBuilder { public AddTextInBlockDialog(Activity activity, ValueListener listener) { super(activity); this.activity = activity; - getBackground() - .setTint( - ColorUtils.getColor(activity, com.google.android.material.R.attr.colorSurfaceVariant)); binding = LayoutAddTextInBlockBinding.inflate(activity.getLayoutInflater()); setTitle(R.string.enter_value); setView(binding.getRoot()); diff --git a/app/src/main/java/com/block/web/builder/ui/dialogs/blocksholder/CreateBlocksHolderDialog.java b/app/src/main/java/com/block/web/builder/ui/dialogs/blocksholder/CreateBlocksHolderDialog.java index b1cfd14..2446d92 100644 --- a/app/src/main/java/com/block/web/builder/ui/dialogs/blocksholder/CreateBlocksHolderDialog.java +++ b/app/src/main/java/com/block/web/builder/ui/dialogs/blocksholder/CreateBlocksHolderDialog.java @@ -7,7 +7,6 @@ import com.block.web.builder.databinding.LayoutNewBlocksHolderDialogBinding; import com.block.web.builder.listeners.BlocksHolderListener; import com.block.web.builder.core.BlocksHolder; -import com.block.web.builder.utils.ColorUtils; import com.block.web.builder.utils.HexColorValidator; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import java.util.ArrayList; @@ -20,9 +19,6 @@ public class CreateBlocksHolderDialog extends MaterialAlertDialogBuilder { public CreateBlocksHolderDialog( Activity activity, ArrayList blocksHolderList, BlocksHolderListener listener) { super(activity); - getBackground() - .setTint( - ColorUtils.getColor(activity, com.google.android.material.R.attr.colorSurfaceVariant)); setTitle(getContext().getString(R.string.create_new_blocks_holder)); LayoutNewBlocksHolderDialogBinding binding = LayoutNewBlocksHolderDialogBinding.inflate(activity.getLayoutInflater()); diff --git a/app/src/main/java/com/block/web/builder/ui/dialogs/eventList/AddEventDialog.java b/app/src/main/java/com/block/web/builder/ui/dialogs/eventList/AddEventDialog.java index 255be76..b9021c1 100644 --- a/app/src/main/java/com/block/web/builder/ui/dialogs/eventList/AddEventDialog.java +++ b/app/src/main/java/com/block/web/builder/ui/dialogs/eventList/AddEventDialog.java @@ -10,7 +10,6 @@ import com.block.web.builder.core.WebFile; import com.block.web.builder.ui.activities.EventListActivity; import com.block.web.builder.ui.adapters.EventAdapter; -import com.block.web.builder.utils.ColorUtils; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import java.util.ArrayList; @@ -29,9 +28,6 @@ public AddEventDialog( LayoutAddEventDialogBinding binding = LayoutAddEventDialogBinding.inflate(mEventListActivity.getLayoutInflater()); - getBackground() - .setTint( - ColorUtils.getColor(mEventListActivity, com.google.android.material.R.attr.colorSurfaceVariant)); setTitle(R.string.add_events); setCancelable(false); setView(binding.getRoot()); diff --git a/app/src/main/java/com/block/web/builder/ui/dialogs/eventList/ShowSourceCodeDialog.java b/app/src/main/java/com/block/web/builder/ui/dialogs/eventList/ShowSourceCodeDialog.java index 2242770..1ae1c5f 100644 --- a/app/src/main/java/com/block/web/builder/ui/dialogs/eventList/ShowSourceCodeDialog.java +++ b/app/src/main/java/com/block/web/builder/ui/dialogs/eventList/ShowSourceCodeDialog.java @@ -19,9 +19,6 @@ public ShowSourceCodeDialog( super(activity); LayoutSouceCodeDialogBinding binding = LayoutSouceCodeDialogBinding.inflate(activity.getLayoutInflater()); - getBackground() - .setTint( - ColorUtils.getColor(activity, com.google.android.material.R.attr.colorSurfaceVariant)); setTitle(R.string.source_code); if (useSoraEditor) { diff --git a/app/src/main/java/com/block/web/builder/ui/dialogs/filemanager/CreateFileDialog.java b/app/src/main/java/com/block/web/builder/ui/dialogs/filemanager/CreateFileDialog.java index 68e368d..8812f65 100644 --- a/app/src/main/java/com/block/web/builder/ui/dialogs/filemanager/CreateFileDialog.java +++ b/app/src/main/java/com/block/web/builder/ui/dialogs/filemanager/CreateFileDialog.java @@ -14,7 +14,6 @@ import com.block.web.builder.core.WebFile; import com.block.web.builder.ui.activities.FileManagerActivity; import com.block.web.builder.ui.adapters.FileListAdapterItem; -import com.block.web.builder.utils.ColorUtils; import com.block.web.builder.utils.FileNameValidator; import com.block.web.builder.utils.ProjectFileUtils; import com.google.android.material.button.MaterialButtonToggleGroup; @@ -65,9 +64,6 @@ public void onFileCreationFailed(String error) { Toast.makeText(activity, error, Toast.LENGTH_SHORT).show(); } }; - getBackground() - .setTint( - ColorUtils.getColor(activity, com.google.android.material.R.attr.colorSurfaceVariant)); setTitle(activity.getString(R.string.create_new_file)); binding = LayoutNewFileDialogBinding.inflate(activity.getLayoutInflater()); setView(binding.getRoot()); diff --git a/app/src/main/res/color/navigation_item_background_color.xml b/app/src/main/res/color/navigation_item_background_color.xml new file mode 100644 index 0000000..39a08b0 --- /dev/null +++ b/app/src/main/res/color/navigation_item_background_color.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/app/src/main/res/color/navigation_item_color.xml b/app/src/main/res/color/navigation_item_color.xml new file mode 100644 index 0000000..e7625e0 --- /dev/null +++ b/app/src/main/res/color/navigation_item_color.xml @@ -0,0 +1,10 @@ + + + + + diff --git a/app/src/main/res/layout-land/activity_event_editor.xml b/app/src/main/res/layout-land/activity_event_editor.xml index 397eebe..375e4fa 100644 --- a/app/src/main/res/layout-land/activity_event_editor.xml +++ b/app/src/main/res/layout-land/activity_event_editor.xml @@ -3,7 +3,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_height="match_parent" - android:layout_width="match_parent"> + android:layout_width="match_parent" + android:fitsSystemWindows="true"> - + - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_block_editor.xml b/app/src/main/res/layout/activity_block_editor.xml index ea7c98a..251cdcd 100644 --- a/app/src/main/res/layout/activity_block_editor.xml +++ b/app/src/main/res/layout/activity_block_editor.xml @@ -4,7 +4,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_height="match_parent" android:layout_width="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + android:fitsSystemWindows="true"> + android:orientation="vertical" + android:fitsSystemWindows="true"> + + + + @@ -75,4 +80,5 @@ android:text="@string/new_block" android:id="@+id/fab" android:layout_gravity="end|bottom" /> + diff --git a/app/src/main/res/layout/activity_blocks_holder_manager.xml b/app/src/main/res/layout/activity_blocks_holder_manager.xml index 9225b60..cc84d31 100644 --- a/app/src/main/res/layout/activity_blocks_holder_manager.xml +++ b/app/src/main/res/layout/activity_blocks_holder_manager.xml @@ -4,7 +4,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_height="match_parent" android:layout_width="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + android:fitsSystemWindows="true"> + + + + @@ -75,4 +80,5 @@ android:text="@string/new_blocks_holder" android:id="@+id/fab" android:layout_gravity="end|bottom" /> - \ No newline at end of file + + diff --git a/app/src/main/res/layout/activity_debug.xml b/app/src/main/res/layout/activity_debug.xml index 714442b..58500d4 100644 --- a/app/src/main/res/layout/activity_debug.xml +++ b/app/src/main/res/layout/activity_debug.xml @@ -5,6 +5,7 @@ android:layout_height="match_parent" android:layout_width="match_parent" android:background="?attr/colorSurface" + android:fitsSystemWindows="true" android:id="@+id/coordinator"> + android:layout_width="match_parent" + android:fitsSystemWindows="true"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_event_list.xml b/app/src/main/res/layout/activity_event_list.xml index 5686c49..67324d8 100644 --- a/app/src/main/res/layout/activity_event_list.xml +++ b/app/src/main/res/layout/activity_event_list.xml @@ -4,7 +4,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_height="match_parent" android:layout_width="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + android:fitsSystemWindows="true"> + + + + @@ -75,4 +80,5 @@ android:text="New Event" android:id="@+id/fab" android:layout_gravity="end|bottom" /> - \ No newline at end of file + + diff --git a/app/src/main/res/layout/activity_file_manager.xml b/app/src/main/res/layout/activity_file_manager.xml index 5e7e07f..d3d35b2 100644 --- a/app/src/main/res/layout/activity_file_manager.xml +++ b/app/src/main/res/layout/activity_file_manager.xml @@ -4,7 +4,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_height="match_parent" android:layout_width="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + android:fitsSystemWindows="true"> + android:orientation="vertical" + android:fitsSystemWindows="true"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_license.xml b/app/src/main/res/layout/activity_license.xml index 551d2e1..e9dd716 100644 --- a/app/src/main/res/layout/activity_license.xml +++ b/app/src/main/res/layout/activity_license.xml @@ -4,7 +4,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_height="match_parent" android:layout_width="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + android:fitsSystemWindows="true"> + android:orientation="vertical" + android:fitsSystemWindows="true"> + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_height="match_parent" + android:layout_width="match_parent" + android:orientation="vertical" + android:fitsSystemWindows="true"> + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:id="@+id/appbar"> + android:layout_height="?attr/collapsingToolbarLayoutMediumSize" + android:layout_width="match_parent" + app:layout_scrollFlags="scroll|exitUntilCollapsed" + app:titleCollapseMode="scale" + android:id="@+id/collapsingToolbar"> + android:layout_height="?attr/actionBarSize" + android:layout_width="match_parent" + app:layout_collapseMode="pin" + android:id="@+id/toolbar" /> @@ -34,13 +35,13 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior"> + android:layout_height="match_parent" + android:layout_width="match_parent" + android:orientation="vertical" + android:id="@+id/contents"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_web_view.xml b/app/src/main/res/layout/activity_web_view.xml index b3e0aac..1b2870e 100644 --- a/app/src/main/res/layout/activity_web_view.xml +++ b/app/src/main/res/layout/activity_web_view.xml @@ -5,6 +5,7 @@ android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" + android:fitsSystemWindows="true" android:id="@+id/root"> + android:id="@+id/console_content"> + android:textColor="?attr/colorOnSurface" + android:singleLine="true" + android:id="@+id/execute" /> + android:orientation="vertical" + android:id="@+id/console"> + + + android:visibility="gone" + android:background="?attr/colorOnSurfaceVariant" + android:id="@+id/console_slider" /> + android:layout_width="wrap_content" + android:layout_weight="1"> + android:id="@+id/webview"> + + - \ No newline at end of file + diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml new file mode 100644 index 0000000..c2a59a6 --- /dev/null +++ b/app/src/main/res/values-night/colors.xml @@ -0,0 +1,143 @@ + + #B1D18A + #1E3702 + #344E16 + #CCEDA4 + #BFCBAD + #2A331E + #404A33 + #DBE7C8 + #A0CFCC + #003735 + #1F4E4B + #BBECE8 + #FFB4AB + #690005 + #93000A + #FFDAD6 + #12140E + #E2E3D8 + #12140E + #E2E3D8 + #44483D + #C5C8BA + #8E9285 + #44483D + #000000 + #E2E3D8 + #2F312A + #4B662C + #CCEDA4 + #0F2000 + #B1D18A + #344E16 + #DBE7C8 + #151E0B + #BFCBAD + #404A33 + #BBECE8 + #00201F + #A0CFCC + #1F4E4B + #12140E + #373A32 + #0C0F09 + #1A1C16 + #1E201A + #282B24 + #33362E + #B5D58E + #0B1A00 + #7C9A59 + #000000 + #C3CFB1 + #101907 + #8A9579 + #000000 + #A4D4D0 + #001A19 + #6B9996 + #000000 + #FFBAB1 + #370001 + #FF5449 + #000000 + #12140E + #E2E3D8 + #12140E + #FBFCF0 + #44483D + #C9CCBE + #A1A497 + #818578 + #000000 + #E2E3D8 + #282B24 + #354F17 + #CCEDA4 + #081400 + #B1D18A + #243D06 + #DBE7C8 + #0B1403 + #BFCBAD + #303924 + #BBECE8 + #001413 + #A0CFCC + #083D3B + #12140E + #373A32 + #0C0F09 + #1A1C16 + #1E201A + #282B24 + #33362E + #F4FFE0 + #000000 + #B5D58E + #000000 + #F4FFE0 + #000000 + #C3CFB1 + #000000 + #EAFFFC + #000000 + #A4D4D0 + #000000 + #FFF9F9 + #000000 + #FFBAB1 + #000000 + #12140E + #E2E3D8 + #12140E + #FFFFFF + #44483D + #F9FCED + #C9CCBE + #C9CCBE + #000000 + #E2E3D8 + #000000 + #193000 + #D0F2A8 + #000000 + #B5D58E + #0B1A00 + #E0EBCC + #000000 + #C3CFB1 + #101907 + #C0F0EC + #000000 + #A4D4D0 + #001A19 + #12140E + #373A32 + #0C0F09 + #1A1C16 + #1E201A + #282B24 + #33362E + diff --git a/app/src/main/res/values-night/theme_overlays.xml b/app/src/main/res/values-night/theme_overlays.xml new file mode 100644 index 0000000..02adac7 --- /dev/null +++ b/app/src/main/res/values-night/theme_overlays.xml @@ -0,0 +1,98 @@ + + + + diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index 6338fe1..221e24b 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -1,67 +1,52 @@ - - - - - - diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 2f6e77c..946afaf 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,63 +1,143 @@ - - #436915 - #FFFFFF - #C2F18D - #0F2000 - #57624A - #FFFFFF - #DBE7C8 - #151E0B - #386663 - #FFFFFF - #BBECE8 - #00201F - #BA1A1A - #FFDAD6 - #FFFFFF - #410002 - #FDFCF5 - #1B1C18 - #FDFCF5 - #1B1C18 - #E1E4D5 - #44483D - #75796C - #F2F1E9 - #30312C - #A7D474 - #000000 - #436915 - #C5C8BA - #000000 - #A7D474 - #1E3700 - #2D5000 - #C2F18D - #BFCBAD - #2A331E - #404A33 - #DBE7C8 - #A0CFCC - #003735 - #1F4E4B - #BBECE8 - #FFB4AB - #93000A - #690005 - #FFDAD6 - #1B1C18 - #E3E3DB - #1B1C18 - #E3E3DB - #44483D - #C5C8BA - #8E9285 - #1B1C18 - #E3E3DB - #436915 - #000000 - #A7D474 - #44483D - #000000 + #4B662C + #FFFFFF + #CCEDA4 + #0F2000 + #57624A + #FFFFFF + #DBE7C8 + #151E0B + #386663 + #FFFFFF + #BBECE8 + #00201F + #BA1A1A + #FFFFFF + #FFDAD6 + #410002 + #F9FAEF + #1A1C16 + #F9FAEF + #1A1C16 + #E1E4D5 + #44483D + #75796C + #C5C8BA + #000000 + #2F312A + #F0F2E6 + #B1D18A + #CCEDA4 + #0F2000 + #B1D18A + #344E16 + #DBE7C8 + #151E0B + #BFCBAD + #404A33 + #BBECE8 + #00201F + #A0CFCC + #1F4E4B + #D9DBD0 + #F9FAEF + #FFFFFF + #F3F5E9 + #EEEFE4 + #E8E9DE + #E2E3D8 + #304A13 + #FFFFFF + #617D40 + #FFFFFF + #3C4630 + #FFFFFF + #6D785F + #FFFFFF + #1A4A47 + #FFFFFF + #4F7D7A + #FFFFFF + #8C0009 + #FFFFFF + #DA342E + #FFFFFF + #F9FAEF + #1A1C16 + #F9FAEF + #1A1C16 + #E1E4D5 + #40443A + #5D6155 + #787C70 + #000000 + #2F312A + #F0F2E6 + #B1D18A + #617D40 + #FFFFFF + #49642A + #FFFFFF + #6D785F + #FFFFFF + #555F47 + #FFFFFF + #4F7D7A + #FFFFFF + #366461 + #FFFFFF + #D9DBD0 + #F9FAEF + #FFFFFF + #F3F5E9 + #EEEFE4 + #E8E9DE + #E2E3D8 + #142700 + #FFFFFF + #304A13 + #FFFFFF + #1C2511 + #FFFFFF + #3C4630 + #FFFFFF + #002726 + #FFFFFF + #1A4A47 + #FFFFFF + #4E0002 + #FFFFFF + #8C0009 + #FFFFFF + #F9FAEF + #1A1C16 + #F9FAEF + #000000 + #E1E4D5 + #21251C + #40443A + #40443A + #000000 + #2F312A + #FFFFFF + #D6F7AD + #304A13 + #FFFFFF + #1B3300 + #FFFFFF + #3C4630 + #FFFFFF + #26301B + #FFFFFF + #1A4A47 + #FFFFFF + #003331 + #FFFFFF + #D9DBD0 + #F9FAEF + #FFFFFF + #F3F5E9 + #EEEFE4 + #E8E9DE + #E2E3D8 diff --git a/app/src/main/res/values/theme_overlays.xml b/app/src/main/res/values/theme_overlays.xml new file mode 100644 index 0000000..e81f18f --- /dev/null +++ b/app/src/main/res/values/theme_overlays.xml @@ -0,0 +1,98 @@ + + + + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index d221ee4..0b7e299 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -4,70 +4,52 @@ - - - - - -