From 96a766d9c610f24ec9d2a11a0be0504a6d9a5f41 Mon Sep 17 00:00:00 2001 From: PranavPurwar Date: Sun, 29 Dec 2024 01:31:40 +0530 Subject: [PATCH 01/20] Multiple UI fixes as well as font manager bug fix --- app/src/main/java/a/a/a/Zt.java | 1 + app/src/main/java/a/a/a/sy.java | 4 +- .../besome/sketch/design/DesignActivity.java | 9 +--- .../permission/ManagePermissionActivity.java | 42 ++++++++-------- app/src/main/res/layout/design.xml | 17 +++---- app/src/main/res/layout/design_drawer.xml | 4 +- app/src/main/res/layout/fr_logic_list.xml | 2 +- .../main/res/layout/fr_logic_list_item.xml | 6 +-- .../layout/fr_logic_list_item_component.xml | 8 ++-- app/src/main/res/layout/logic_editor.xml | 1 + app/src/main/res/layout/main.xml | 7 ++- app/src/main/res/layout/manage_file.xml | 10 +--- app/src/main/res/layout/manage_font.xml | 23 +++++---- app/src/main/res/layout/manage_image.xml | 26 ++++++---- app/src/main/res/layout/manage_library.xml | 9 ---- .../res/layout/manage_library_base_item.xml | 9 ++-- app/src/main/res/layout/manage_permission.xml | 48 +++++-------------- app/src/main/res/layout/manage_sound.xml | 8 ---- app/src/main/res/layout/manage_view.xml | 24 ++++++---- app/src/main/res/layout/widget_layout.xml | 7 ++- .../main/res/menu/permission_manager_menu.xml | 9 ++++ build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 +- 23 files changed, 127 insertions(+), 153 deletions(-) create mode 100644 app/src/main/res/menu/permission_manager_menu.xml diff --git a/app/src/main/java/a/a/a/Zt.java b/app/src/main/java/a/a/a/Zt.java index ffa018d1a8..8eb2597539 100644 --- a/app/src/main/java/a/a/a/Zt.java +++ b/app/src/main/java/a/a/a/Zt.java @@ -255,6 +255,7 @@ public View onCreateView(@NonNull LayoutInflater layoutInflater, ViewGroup root, for (int i = projectResourceBeans.size() - 1; i >= 0; i--) { if (projectResourceBeans.get(i).isSelected) { projectResourceBeans.remove(i); + FileUtil.deleteFile(getResourceFilePath(projectResourceBeans.get(i))); } } diff --git a/app/src/main/java/a/a/a/sy.java b/app/src/main/java/a/a/a/sy.java index f8c68a8c49..de446d92dd 100644 --- a/app/src/main/java/a/a/a/sy.java +++ b/app/src/main/java/a/a/a/sy.java @@ -3,7 +3,7 @@ import com.besome.sketch.beans.ViewBean; // todo: move this to another package -// 'sy' is used in ViewPane itens, example ItemLinearLayout +// 'sy' is used in ViewPane items, example ItemLinearLayout public interface sy { ViewBean getBean(); @@ -12,4 +12,4 @@ public interface sy { void setBean(ViewBean viewBean); void setSelection(boolean selection); -} \ No newline at end of file +} diff --git a/app/src/main/java/com/besome/sketch/design/DesignActivity.java b/app/src/main/java/com/besome/sketch/design/DesignActivity.java index df4c826cfb..dd4c5345b1 100644 --- a/app/src/main/java/com/besome/sketch/design/DesignActivity.java +++ b/app/src/main/java/com/besome/sketch/design/DesignActivity.java @@ -8,7 +8,6 @@ import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; -import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Typeface; @@ -24,10 +23,8 @@ import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; -import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; -import android.widget.PopupMenu; import android.widget.TextView; import android.widget.Toast; @@ -96,7 +93,6 @@ import a.a.a.mB; import a.a.a.rs; import a.a.a.wq; -import a.a.a.xB; import a.a.a.yB; import a.a.a.yq; import a.a.a.zy; @@ -110,7 +106,6 @@ import mod.agus.jcoderz.editor.manage.resource.ManageResourceActivity; import mod.hey.studios.activity.managers.assets.ManageAssetsActivity; import mod.hey.studios.activity.managers.java.ManageJavaActivity; -import mod.hey.studios.build.BuildSettings; import mod.hey.studios.build.BuildSettingsDialog; import mod.hey.studios.compiler.kotlin.KotlinCompilerBridge; import mod.hey.studios.project.custom_blocks.CustomBlocksDialog; @@ -130,7 +125,6 @@ import mod.jbk.diagnostic.MissingFileException; import mod.jbk.util.LogUtil; import mod.khaled.logcat.LogReaderActivity; -import pro.sketchware.utility.ThemeUtils; import pro.sketchware.R; import pro.sketchware.activities.appcompat.ManageAppCompatActivity; import pro.sketchware.activities.editor.command.ManageXMLCommandActivity; @@ -138,6 +132,7 @@ import pro.sketchware.databinding.ProgressMsgBoxBinding; import pro.sketchware.utility.FileUtil; import pro.sketchware.utility.SketchwareUtil; +import pro.sketchware.utility.ThemeUtils; import pro.sketchware.utility.apk.ApkSignatures; public class DesignActivity extends BaseAppCompatActivity implements View.OnClickListener { @@ -889,7 +884,7 @@ private void showAvailableViews() { } /** - * Opens {@link ViewCodeEditor}. + * Opens {@link ViewCodeEditorActivity}. */ void toViewCodeEditor() { if (projectFile == null) return; diff --git a/app/src/main/java/mod/agus/jcoderz/editor/manage/permission/ManagePermissionActivity.java b/app/src/main/java/mod/agus/jcoderz/editor/manage/permission/ManagePermissionActivity.java index bf458429c3..3c9b1b995b 100644 --- a/app/src/main/java/mod/agus/jcoderz/editor/manage/permission/ManagePermissionActivity.java +++ b/app/src/main/java/mod/agus/jcoderz/editor/manage/permission/ManagePermissionActivity.java @@ -1,6 +1,5 @@ package mod.agus.jcoderz.editor.manage.permission; -import android.app.AlertDialog; import android.os.Bundle; import android.os.Parcelable; import android.text.Editable; @@ -15,24 +14,20 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import com.google.android.material.button.MaterialButton; +import com.besome.sketch.lib.base.BaseAppCompatActivity; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.textfield.TextInputEditText; import com.google.gson.Gson; +import java.util.ArrayList; + +import mod.jbk.util.AddMarginOnApplyWindowInsetsListener; import pro.sketchware.R; import pro.sketchware.databinding.ManagePermissionBinding; import pro.sketchware.databinding.ViewItemPermissionBinding; - -import com.besome.sketch.lib.base.BaseAppCompatActivity; - -import java.util.ArrayList; - import pro.sketchware.utility.FilePathUtil; import pro.sketchware.utility.FileResConfig; import pro.sketchware.utility.FileUtil; -import mod.hey.studios.util.Helper; -import mod.jbk.util.AddMarginOnApplyWindowInsetsListener; public class ManagePermissionActivity extends BaseAppCompatActivity { private PermissionsAdapter adapter; @@ -64,7 +59,7 @@ public void onCreate(Bundle savedInstanceState) { } private void initViews() { - binding.topAppBar.setNavigationOnClickListener(v -> onBackPressed()); + binding.toolbar.setNavigationOnClickListener(v -> onBackPressed()); ViewCompat.setOnApplyWindowInsetsListener(binding.scrollToTopButton, new AddMarginOnApplyWindowInsetsListener(WindowInsetsCompat.Type.navigationBars(), WindowInsetsCompat.CONSUMED)); } @@ -112,18 +107,21 @@ public void onTextChanged(CharSequence newText, int start, int before, int count } public void initButtons() { - binding.resetPermissions.setOnClickListener(view -> { - new MaterialAlertDialogBuilder(this) - .setTitle("Reset permissions") - .setMessage("Are you sure you want to reset all permissions? This cannot be undone!") - .setPositiveButton("Reset", (dialog, which) -> { - FileUtil.writeFile(new FilePathUtil().getPathPermission(numProj), "[]"); - //As FileResConfig only refreshes permissions during ()V, this is required. - frc = new FileResConfig(numProj); - setItems(); - }) - .setNegativeButton("Cancel", (dialog, which) -> dialog.dismiss()) - .show(); + binding.toolbar.setOnMenuItemClickListener(item -> { + if (item.getItemId() == R.id.action_reset) { + new MaterialAlertDialogBuilder(this) + .setTitle("Reset permissions") + .setMessage("Are you sure you want to reset all permissions? This cannot be undone!") + .setPositiveButton("Reset", (dialog, which) -> { + FileUtil.writeFile(new FilePathUtil().getPathPermission(numProj), "[]"); + //As FileResConfig only refreshes permissions during ()V, this is required. + frc = new FileResConfig(numProj); + setItems(); + }) + .setNegativeButton("Cancel", (dialog, which) -> dialog.dismiss()) + .show(); + } + return true; }); binding.scrollToTopButton.setOnClickListener(view -> { binding.scrollToTopButton.hide(); diff --git a/app/src/main/res/layout/design.xml b/app/src/main/res/layout/design.xml index 009a36a4cb..2d10cacb21 100644 --- a/app/src/main/res/layout/design.xml +++ b/app/src/main/res/layout/design.xml @@ -34,6 +34,7 @@ app:navigationIcon="?attr/homeAsUpIndicator" tools:menu="@menu/design_menu" tools:subtitle="605" + app:subtitleTextColor="?attr/colorSecondary" tools:title="InternalDemo" /> @@ -100,26 +101,26 @@ + app:contentPaddingBottom="12dp" + app:contentPaddingEnd="8dp" + app:contentPaddingStart="8dp" + app:contentPaddingTop="12dp"> + android:gravity="center_vertical"> @@ -137,7 +138,7 @@ android:layout_width="20dp" android:layout_height="20dp" android:layout_marginEnd="8dp" - android:src="@drawable/ic_mtrl_touch" + android:src="@drawable/ic_arrow_drop_down_24px" app:tint="?attr/colorControlNormal" /> diff --git a/app/src/main/res/layout/design_drawer.xml b/app/src/main/res/layout/design_drawer.xml index be4c46eee8..21ca0de4b6 100644 --- a/app/src/main/res/layout/design_drawer.xml +++ b/app/src/main/res/layout/design_drawer.xml @@ -51,8 +51,8 @@ android:id="@+id/tv_title_global" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="8dp" - android:textAppearance="?textAppearanceBodyLarge" + android:padding="6dp" + android:textAppearance="?textAppearanceBodyMedium" tools:text="@string/design_drawer_menu_bottom_title" /> diff --git a/app/src/main/res/layout/fr_logic_list.xml b/app/src/main/res/layout/fr_logic_list.xml index 088205d9d7..9ca2a413d1 100644 --- a/app/src/main/res/layout/fr_logic_list.xml +++ b/app/src/main/res/layout/fr_logic_list.xml @@ -27,7 +27,7 @@ + android:layout_marginVertical="8dp"> + android:layout_marginVertical="8dp"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/logic_editor.xml b/app/src/main/res/layout/logic_editor.xml index 6ef47dc75a..5865beb059 100644 --- a/app/src/main/res/layout/logic_editor.xml +++ b/app/src/main/res/layout/logic_editor.xml @@ -23,6 +23,7 @@ android:layout_height="wrap_content" app:title="Activity" app:subtitle="onCreate" + app:subtitleTextColor="?colorSecondary" app:navigationIcon="?attr/homeAsUpIndicator" /> + app:cardBackgroundColor="@color/transparent" + app:shapeAppearance="?attr/shapeAppearanceCornerLarge" + app:strokeWidth="0dp"> - - - - - - - + + + + - - - + + + + - \ No newline at end of file + diff --git a/app/src/main/res/layout/manage_library.xml b/app/src/main/res/layout/manage_library.xml index e3986969a2..77f984d1e7 100644 --- a/app/src/main/res/layout/manage_library.xml +++ b/app/src/main/res/layout/manage_library.xml @@ -11,21 +11,12 @@ android:layout_height="wrap_content" android:fitsSystemWindows="true"> - - - + app:cardBackgroundColor="@color/transparent" + app:cardCornerRadius="22dp" + app:strokeWidth="0dp"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/manage_permission.xml b/app/src/main/res/layout/manage_permission.xml index 20bbeb3cdd..083c896f37 100644 --- a/app/src/main/res/layout/manage_permission.xml +++ b/app/src/main/res/layout/manage_permission.xml @@ -10,31 +10,23 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" - app:liftOnScroll="false" - app:elevation="0dp"> + app:elevation="0dp" + app:liftOnScroll="false"> - - - - + android:layout_height="?attr/actionBarSize" + app:menu="@menu/permission_manager_menu" + app:navigationIcon="?attr/homeAsUpIndicator" + app:title="Permissions Manager" /> @@ -42,14 +34,10 @@ android:id="@+id/searchInputLayout" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginEnd="8dp" android:layout_weight="1" android:hint="Search for permissions" android:importantForAutofill="noExcludeDescendants" - app:boxCornerRadiusBottomEnd="50dp" - app:boxCornerRadiusBottomStart="50dp" - app:boxCornerRadiusTopEnd="50dp" - app:boxCornerRadiusTopStart="50dp" + app:boxBackgroundMode="none" app:startIconDrawable="@drawable/search_icon_grey"> - @@ -85,8 +63,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" - android:paddingBottom="120dp" android:paddingTop="8dp" + android:paddingBottom="120dp" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:listitem="@layout/view_item_permission" /> @@ -99,4 +77,4 @@ android:layout_marginBottom="20dp" android:text="Scroll to the top" app:icon="@drawable/ic_arrow_drop_up_grey600_24dp" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/manage_sound.xml b/app/src/main/res/layout/manage_sound.xml index f19b25437f..0b683ffbcb 100644 --- a/app/src/main/res/layout/manage_sound.xml +++ b/app/src/main/res/layout/manage_sound.xml @@ -10,20 +10,12 @@ android:layout_height="wrap_content" android:fitsSystemWindows="true"> - - - - - - + + + + + + android:layout_gravity="center" + tools:src="@drawable/abc_96" /> diff --git a/app/src/main/res/menu/permission_manager_menu.xml b/app/src/main/res/menu/permission_manager_menu.xml new file mode 100644 index 0000000000..8a9b1a21aa --- /dev/null +++ b/app/src/main/res/menu/permission_manager_menu.xml @@ -0,0 +1,9 @@ + + + diff --git a/build.gradle b/build.gradle index 248e8513d9..8fd65ca74c 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.7.2' + classpath 'com.android.tools.build:gradle:8.7.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0" classpath "com.google.firebase:firebase-crashlytics-gradle:3.0.2" classpath "com.google.gms:google-services:4.4.2" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e3c87fe41e..b7ae3f6a63 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat Aug 06 05:20:44 UTC 2022 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists \ No newline at end of file +zipStorePath=wrapper/dists From 452a07c20d034c214c11a4d8ecfadf94c16b2248 Mon Sep 17 00:00:00 2001 From: PranavPurwar Date: Sun, 29 Dec 2024 13:28:05 +0530 Subject: [PATCH 02/20] Improve UI in places --- app/src/main/java/a/a/a/Fw.java | 1 - .../manage/view/ManageViewActivity.java | 4 +- .../mod/jbk/util/OldResourceIdMapper.java | 1 - .../importicon/adapters/IconAdapter.java | 4 +- .../main/res/drawable/search_icon_tinted.xml | 3 -- app/src/main/res/drawable/selector_search.xml | 6 --- app/src/main/res/layout/design.xml | 25 ++++++++++--- app/src/main/res/layout/fr_component_list.xml | 5 ++- app/src/main/res/layout/fr_logic_list.xml | 4 +- .../main/res/layout/fr_logic_list_item.xml | 2 +- .../layout/fr_logic_list_item_component.xml | 2 +- app/src/main/res/layout/import_icon.xml | 2 +- .../main/res/layout/import_icon_list_item.xml | 18 +++++++-- app/src/main/res/layout/layout_event_item.xml | 4 +- app/src/main/res/layout/manage_file.xml | 2 - app/src/main/res/layout/manage_font.xml | 1 - app/src/main/res/layout/manage_image.xml | 1 - .../main/res/layout/manage_java_item_hs.xml | 2 +- app/src/main/res/layout/manage_permission.xml | 4 +- app/src/main/res/layout/manage_sound.xml | 14 +++++++ app/src/main/res/layout/manage_view.xml | 1 - .../layout/manage_view_custom_list_item.xml | 11 ++---- .../main/res/layout/manage_view_list_item.xml | 37 ++++--------------- app/src/main/res/layout/view_property.xml | 9 +++-- .../main/res/menu/projects_fragment_menu.xml | 2 +- app/src/main/res/menu/string_editor_menu.xml | 2 +- 26 files changed, 83 insertions(+), 84 deletions(-) delete mode 100644 app/src/main/res/drawable/search_icon_tinted.xml delete mode 100644 app/src/main/res/drawable/selector_search.xml diff --git a/app/src/main/java/a/a/a/Fw.java b/app/src/main/java/a/a/a/Fw.java index 918b09f1ca..2e793e9772 100644 --- a/app/src/main/java/a/a/a/Fw.java +++ b/app/src/main/java/a/a/a/Fw.java @@ -275,7 +275,6 @@ public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) { viewHolder.binding.imgActivity.setImageResource(getImageResByOptions(projectFileBean.options)); viewHolder.binding.tvScreenName.setText(projectFileBean.getXmlName()); viewHolder.binding.tvActivityName.setText(projectFileBean.getJavaName()); - viewHolder.binding.imgDelete.setImageResource(projectFileBean.isSelected ? R.drawable.ic_checkmark_green_48dp : R.drawable.ic_trashcan_white_48dp); } @Override diff --git a/app/src/main/java/com/besome/sketch/editor/manage/view/ManageViewActivity.java b/app/src/main/java/com/besome/sketch/editor/manage/view/ManageViewActivity.java index 09a69bee8b..9a1e5af6b8 100644 --- a/app/src/main/java/com/besome/sketch/editor/manage/view/ManageViewActivity.java +++ b/app/src/main/java/com/besome/sketch/editor/manage/view/ManageViewActivity.java @@ -11,7 +11,6 @@ import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; -import android.widget.LinearLayout; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; @@ -25,7 +24,6 @@ import com.besome.sketch.lib.base.BaseAppCompatActivity; import com.google.android.material.appbar.MaterialToolbar; import com.google.android.material.card.MaterialCardView; -import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.tabs.TabLayout; @@ -42,7 +40,6 @@ import a.a.a.mB; import a.a.a.wq; import a.a.a.xw; -import mod.hey.studios.util.Helper; import pro.sketchware.R; public class ManageViewActivity extends BaseAppCompatActivity implements OnClickListener, ViewPager.OnPageChangeListener { @@ -110,6 +107,7 @@ public void onPageScrollStateChanged(int var1) { @Override public void onPageScrolled(int var1, float var2, int var3) { + a(false); } public final void a(ProjectFileBean var1, ArrayList var2) { diff --git a/app/src/main/java/mod/jbk/util/OldResourceIdMapper.java b/app/src/main/java/mod/jbk/util/OldResourceIdMapper.java index 1dfea845dc..1cd1e032f2 100644 --- a/app/src/main/java/mod/jbk/util/OldResourceIdMapper.java +++ b/app/src/main/java/mod/jbk/util/OldResourceIdMapper.java @@ -938,7 +938,6 @@ public static int getDrawableFromOldResourceId(int oldId) { case 2131166114 -> R.drawable.selector_palette_tab_round; case 2131166115 -> R.drawable.selector_plugin; case 2131166116 -> R.drawable.selector_save; - case 2131166117 -> R.drawable.selector_search; case 2131166118 -> R.drawable.selector_show_hint; case 2131166119 -> R.drawable.selector_tab_round; case 2131166120 -> R.drawable.selector_toggle_list_view; diff --git a/app/src/main/java/pro/sketchware/activities/importicon/adapters/IconAdapter.java b/app/src/main/java/pro/sketchware/activities/importicon/adapters/IconAdapter.java index 0e00eddabb..79f519e368 100644 --- a/app/src/main/java/pro/sketchware/activities/importicon/adapters/IconAdapter.java +++ b/app/src/main/java/pro/sketchware/activities/importicon/adapters/IconAdapter.java @@ -12,10 +12,9 @@ import androidx.recyclerview.widget.ListAdapter; import androidx.recyclerview.widget.RecyclerView; -import pro.sketchware.databinding.ImportIconListItemBinding; - import java.io.File; +import pro.sketchware.databinding.ImportIconListItemBinding; import pro.sketchware.utility.SvgUtils; public class IconAdapter extends ListAdapter, IconAdapter.ViewHolder> { @@ -76,6 +75,7 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) { String filePath = getItem(position).second + File.separator + selected_icon_type + ".svg"; svgUtils.loadImage(holder.itemBinding.img, filePath); holder.itemBinding.img.setColorFilter(selected_color, PorterDuff.Mode.SRC_IN); + holder.itemBinding.title.setText(getItem(position).first); } @Override diff --git a/app/src/main/res/drawable/search_icon_tinted.xml b/app/src/main/res/drawable/search_icon_tinted.xml deleted file mode 100644 index cfab6631ca..0000000000 --- a/app/src/main/res/drawable/search_icon_tinted.xml +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/app/src/main/res/drawable/selector_search.xml b/app/src/main/res/drawable/selector_search.xml deleted file mode 100644 index 4ca8a00840..0000000000 --- a/app/src/main/res/drawable/selector_search.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/design.xml b/app/src/main/res/layout/design.xml index 2d10cacb21..9653d89f03 100644 --- a/app/src/main/res/layout/design.xml +++ b/app/src/main/res/layout/design.xml @@ -38,11 +38,25 @@ tools:title="InternalDemo" /> + + + + + app:contentPadding="12dp" + app:strokeWidth="0dp"> + android:translationY="180dp" /> @@ -44,4 +45,4 @@ android:src="@drawable/ic_add_white_36dp" tools:ignore="ContentDescription" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/fr_logic_list.xml b/app/src/main/res/layout/fr_logic_list.xml index 9ca2a413d1..541358f23e 100644 --- a/app/src/main/res/layout/fr_logic_list.xml +++ b/app/src/main/res/layout/fr_logic_list.xml @@ -32,6 +32,7 @@ android:layout_height="wrap_content" android:layout_marginHorizontal="8dp" android:layout_marginTop="4dp" + android:textColor="?colorControlNormal" android:text="@string/logic_button_import_more_block" android:textSize="14sp" /> @@ -48,7 +49,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" - android:paddingBottom="80dp" + android:paddingTop="8dp" + android:paddingBottom="64dp" android:scrollbars="vertical" android:splitMotionEvents="false" tools:itemCount="5" diff --git a/app/src/main/res/layout/fr_logic_list_item.xml b/app/src/main/res/layout/fr_logic_list_item.xml index 75fd4a5f53..071d822d2b 100644 --- a/app/src/main/res/layout/fr_logic_list_item.xml +++ b/app/src/main/res/layout/fr_logic_list_item.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="8dp" - android:layout_marginVertical="8dp"> + android:layout_marginVertical="6dp"> + android:layout_marginVertical="6dp"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/import_icon_list_item.xml b/app/src/main/res/layout/import_icon_list_item.xml index 6371e5b751..6d2f6617a2 100644 --- a/app/src/main/res/layout/import_icon_list_item.xml +++ b/app/src/main/res/layout/import_icon_list_item.xml @@ -5,18 +5,28 @@ android:id="@+id/icon_bg" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="8dp" android:gravity="center" android:orientation="vertical" - android:padding="15dp"> + android:foreground="?attr/selectableItemBackground" + android:padding="12dp"> - \ No newline at end of file + + + diff --git a/app/src/main/res/layout/layout_event_item.xml b/app/src/main/res/layout/layout_event_item.xml index d8ecc81579..1122da89c4 100644 --- a/app/src/main/res/layout/layout_event_item.xml +++ b/app/src/main/res/layout/layout_event_item.xml @@ -4,7 +4,7 @@ android:padding="15dp" android:layout_marginRight="12dp" android:layout_marginLeft="12dp" - android:layout_marginBottom="5dp" + android:layout_marginBottom="3dp" android:orientation="horizontal"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/manage_file.xml b/app/src/main/res/layout/manage_file.xml index f913ad60ac..f16d0d8bf6 100644 --- a/app/src/main/res/layout/manage_file.xml +++ b/app/src/main/res/layout/manage_file.xml @@ -16,7 +16,6 @@ android:id="@+id/topAppBar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - app:layout_collapseMode="pin" app:navigationIcon="?attr/homeAsUpIndicator" app:title="@string/assets_manager_title" /> @@ -32,7 +31,6 @@ android:id="@+id/filesListRecyclerView" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginTop="12dp" android:clipToPadding="false" android:paddingBottom="120dp" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" diff --git a/app/src/main/res/layout/manage_font.xml b/app/src/main/res/layout/manage_font.xml index bd5c64c5ad..62beb7d7b4 100644 --- a/app/src/main/res/layout/manage_font.xml +++ b/app/src/main/res/layout/manage_font.xml @@ -23,7 +23,6 @@ android:layout_height="wrap_content" android:layout_marginHorizontal="16dp" android:layout_marginTop="5dp" - android:layout_marginBottom="10dp" android:clickable="true" android:focusable="true" app:cardBackgroundColor="@color/transparent" diff --git a/app/src/main/res/layout/manage_image.xml b/app/src/main/res/layout/manage_image.xml index 41f70e63ce..4d0b80e56d 100644 --- a/app/src/main/res/layout/manage_image.xml +++ b/app/src/main/res/layout/manage_image.xml @@ -25,7 +25,6 @@ android:layout_height="wrap_content" android:layout_marginHorizontal="16dp" android:layout_marginTop="5dp" - android:layout_marginBottom="10dp" android:clickable="true" android:focusable="true" app:cardBackgroundColor="@color/transparent" diff --git a/app/src/main/res/layout/manage_java_item_hs.xml b/app/src/main/res/layout/manage_java_item_hs.xml index af4b6b6691..637edd8290 100644 --- a/app/src/main/res/layout/manage_java_item_hs.xml +++ b/app/src/main/res/layout/manage_java_item_hs.xml @@ -5,7 +5,7 @@ android:layout_height="wrap_content" android:layout_marginTop="8dp" app:cardBackgroundColor="@android:color/transparent" - app:cardCornerRadius="24dp" + app:shapeAppearance="?attr/shapeAppearanceCornerMedium" app:rippleColor="?attr/colorControlHighlight" app:strokeWidth="0dp"> diff --git a/app/src/main/res/layout/manage_permission.xml b/app/src/main/res/layout/manage_permission.xml index 083c896f37..bed941b629 100644 --- a/app/src/main/res/layout/manage_permission.xml +++ b/app/src/main/res/layout/manage_permission.xml @@ -37,8 +37,8 @@ android:layout_weight="1" android:hint="Search for permissions" android:importantForAutofill="noExcludeDescendants" - app:boxBackgroundMode="none" - app:startIconDrawable="@drawable/search_icon_grey"> + app:boxBackgroundMode="outline" + app:startIconDrawable="@drawable/ic_mtrl_search"> + + + + + android:focusable="true"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/manage_view_list_item.xml b/app/src/main/res/layout/manage_view_list_item.xml index 64dbb179e0..3a63892528 100644 --- a/app/src/main/res/layout/manage_view_list_item.xml +++ b/app/src/main/res/layout/manage_view_list_item.xml @@ -1,21 +1,21 @@ + android:foreground="?android:attr/selectableItemBackground" + android:clickable="true" + app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Large"> - - - - - - @@ -44,6 +44,7 @@ android:id="@+id/property_layout" android:layout_width="match_parent" android:layout_height="match_parent" + android:paddingTop="6dp" android:orientation="horizontal"> - \ No newline at end of file + diff --git a/app/src/main/res/menu/projects_fragment_menu.xml b/app/src/main/res/menu/projects_fragment_menu.xml index d7232901e4..395b2a6b52 100644 --- a/app/src/main/res/menu/projects_fragment_menu.xml +++ b/app/src/main/res/menu/projects_fragment_menu.xml @@ -4,7 +4,7 @@ Date: Sun, 29 Dec 2024 13:29:48 +0530 Subject: [PATCH 03/20] Revert font deletion fix --- app/src/main/java/a/a/a/Zt.java | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/a/a/a/Zt.java b/app/src/main/java/a/a/a/Zt.java index 8eb2597539..ffa018d1a8 100644 --- a/app/src/main/java/a/a/a/Zt.java +++ b/app/src/main/java/a/a/a/Zt.java @@ -255,7 +255,6 @@ public View onCreateView(@NonNull LayoutInflater layoutInflater, ViewGroup root, for (int i = projectResourceBeans.size() - 1; i >= 0; i--) { if (projectResourceBeans.get(i).isSelected) { projectResourceBeans.remove(i); - FileUtil.deleteFile(getResourceFilePath(projectResourceBeans.get(i))); } } From f0c97703c9f404bd8e78cc1d631d9c773d901aa5 Mon Sep 17 00:00:00 2001 From: PranavPurwar Date: Sun, 29 Dec 2024 13:44:31 +0530 Subject: [PATCH 04/20] Fix some issues --- .../besome/sketch/design/DesignActivity.java | 2 +- .../editor/manage/library/LibraryItemView.java | 5 +++-- .../manage/library/ManageLibraryActivity.java | 17 ++++++++--------- .../res/layout/android_manifest_injection.xml | 7 ------- 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/besome/sketch/design/DesignActivity.java b/app/src/main/java/com/besome/sketch/design/DesignActivity.java index dd4c5345b1..25a41bdc5a 100644 --- a/app/src/main/java/com/besome/sketch/design/DesignActivity.java +++ b/app/src/main/java/com/besome/sketch/design/DesignActivity.java @@ -934,7 +934,7 @@ void toAndroidManifestManager() { } /** - * Opens {@link ManageCustomAttributeActivity}. + * Opens {@link ManageAppCompatActivity}. */ void toAppCompatInjectionManager() { if (projectFile == null) return; diff --git a/app/src/main/java/com/besome/sketch/editor/manage/library/LibraryItemView.java b/app/src/main/java/com/besome/sketch/editor/manage/library/LibraryItemView.java index 31ae87776b..f31b90575d 100644 --- a/app/src/main/java/com/besome/sketch/editor/manage/library/LibraryItemView.java +++ b/app/src/main/java/com/besome/sketch/editor/manage/library/LibraryItemView.java @@ -5,9 +5,10 @@ import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; -import android.widget.LinearLayout; import android.widget.TextView; +import androidx.cardview.widget.CardView; + import com.besome.sketch.beans.ProjectLibraryBean; import a.a.a.wB; @@ -17,7 +18,7 @@ public class LibraryItemView extends FrameLayout { protected final Context context; - public final LinearLayout container; + public final CardView container; public final ImageView icon; public final TextView title; public final TextView description; diff --git a/app/src/main/java/com/besome/sketch/editor/manage/library/ManageLibraryActivity.java b/app/src/main/java/com/besome/sketch/editor/manage/library/ManageLibraryActivity.java index ffdb25b5ce..c12a4a2846 100644 --- a/app/src/main/java/com/besome/sketch/editor/manage/library/ManageLibraryActivity.java +++ b/app/src/main/java/com/besome/sketch/editor/manage/library/ManageLibraryActivity.java @@ -59,14 +59,13 @@ public class ManageLibraryActivity extends BaseAppCompatActivity implements View private TextView externalLib; - private void addLibraryItem(@Nullable ProjectLibraryBean libraryBean, int drawable) { + private void addLibraryItem(@Nullable ProjectLibraryBean libraryBean) { LibraryItemView libraryItemView; if (libraryBean != null) { libraryItemView = new LibraryItemView(this); } else { libraryItemView = new ExcludeBuiltInLibrariesLibraryItemView(this, sc_id); } - libraryItemView.container.setBackgroundResource(drawable); libraryItemView.setTag(libraryBean != null ? libraryBean.libType : null); //noinspection ConstantConditions since the variant if it's nullable handles nulls correctly libraryItemView.setData(libraryBean); @@ -325,14 +324,14 @@ public void onPostCreate(Bundle savedInstanceState) { originalGoogleMapUseYn = savedInstanceState.getString("originalGoogleMapUseYn"); } - addLibraryItem(compatLibraryBean, R.drawable.shape_top); - addLibraryItem(firebaseLibraryBean, R.drawable.shape_middle); - addLibraryItem(admobLibraryBean, R.drawable.shape_middle); - addLibraryItem(googleMapLibraryBean, R.drawable.shape_bottom); - addLibraryItem(new ProjectLibraryBean(ProjectLibraryBean.PROJECT_LIB_TYPE_LOCAL_LIB), R.drawable.shape_top); - addLibraryItem(new ProjectLibraryBean(ProjectLibraryBean.PROJECT_LIB_TYPE_NATIVE_LIB), R.drawable.shape_bottom); + addLibraryItem(compatLibraryBean); + addLibraryItem(firebaseLibraryBean); + addLibraryItem(admobLibraryBean); + addLibraryItem(googleMapLibraryBean); + addLibraryItem(new ProjectLibraryBean(ProjectLibraryBean.PROJECT_LIB_TYPE_LOCAL_LIB)); + addLibraryItem(new ProjectLibraryBean(ProjectLibraryBean.PROJECT_LIB_TYPE_NATIVE_LIB)); // Exclude built-in libraries - addLibraryItem(null, R.drawable.shape_alone); + addLibraryItem(null); } @Override diff --git a/app/src/main/res/layout/android_manifest_injection.xml b/app/src/main/res/layout/android_manifest_injection.xml index 469c14e177..cea7d003b2 100644 --- a/app/src/main/res/layout/android_manifest_injection.xml +++ b/app/src/main/res/layout/android_manifest_injection.xml @@ -9,14 +9,7 @@ android:layout_height="wrap_content" android:fitsSystemWindows="true"> - - - Date: Sun, 29 Dec 2024 21:24:43 +0100 Subject: [PATCH 05/20] fix: handle `default_font` in font param block selector menu - replaced missing default_font asset with Typeface.DEFAULT to prevent crashes and ensure proper functionality for the default font option --- app/src/main/java/a/a/a/Fx.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/a/a/a/Fx.java b/app/src/main/java/a/a/a/Fx.java index e68214ae64..d92af9405e 100644 --- a/app/src/main/java/a/a/a/Fx.java +++ b/app/src/main/java/a/a/a/Fx.java @@ -551,7 +551,12 @@ private String getBlockCode(BlockBean bean, ArrayList params) { break; } } - opcode = String.format("%s.setTypeface(Typeface.createFromAsset(getAssets(),\"fonts/%s.ttf\"), %s);", params.get(0), params.get(1), opcode); + String fontName = params.get(1); + if ("default_font".equals(fontName)) { + opcode = String.format("%s.setTypeface(Typeface.DEFAULT, %s);", params.get(0), opcode); + } else { + opcode = String.format("%s.setTypeface(Typeface.createFromAsset(getAssets(),\"fonts/%s.ttf\"), %s);", params.get(0), fontName, opcode); + } break; case "getText": opcode = String.format("%s.getText().toString()", params.get(0)); From 6b38698f340076555571f82207a46e7284c0a9e4 Mon Sep 17 00:00:00 2001 From: Aquiles Trindade Date: Sun, 29 Dec 2024 18:45:53 -0300 Subject: [PATCH 06/20] feat: show source code in activity instead dialog --- app/src/main/AndroidManifest.xml | 4 ++ .../sketch/editor/LogicEditorActivity.java | 42 ++------------- .../editor/view/CodeViewerActivity.java | 52 +++++++++++++++++++ .../main/res/layout/activity_code_viewer.xml | 32 ++++++++++++ app/src/main/res/values/strings.xml | 2 + 5 files changed, 94 insertions(+), 38 deletions(-) create mode 100644 app/src/main/java/pro/sketchware/activities/editor/view/CodeViewerActivity.java create mode 100644 app/src/main/res/layout/activity_code_viewer.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5de9a3c389..e1284ab1f8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -326,6 +326,10 @@ + + = android.os.Build.VERSION_CODES.R) { - Configuration configuration = getResources().getConfiguration(); - boolean isDarkTheme = configuration.isNightModeActive(); - if (isDarkTheme) { - codeEditor.setColorScheme(new SchemeDarcula()); - } else { - codeEditor.setColorScheme(new EditorColorScheme()); - } - } else { - codeEditor.setColorScheme(new EditorColorScheme()); - } - - var dialog = new MaterialAlertDialogBuilder(this) - .setTitle("Source code") - .setPositiveButton(R.string.common_word_close, null) - .create(); - - dialog.setView(codeEditor, - (int) getDip(24), - (int) getDip(20), - (int) getDip(24), - (int) getDip(0)); - dialog.show(); + var intent = new Intent(this, CodeViewerActivity.class); + intent.putExtra("code", code); + startActivity(intent); } public void t() { diff --git a/app/src/main/java/pro/sketchware/activities/editor/view/CodeViewerActivity.java b/app/src/main/java/pro/sketchware/activities/editor/view/CodeViewerActivity.java new file mode 100644 index 0000000000..56936ba9c4 --- /dev/null +++ b/app/src/main/java/pro/sketchware/activities/editor/view/CodeViewerActivity.java @@ -0,0 +1,52 @@ +package pro.sketchware.activities.editor.view; + +import static pro.sketchware.utility.ThemeUtils.isDarkThemeEnabled; + +import android.os.Build; +import android.os.Bundle; +import android.graphics.Typeface; + +import androidx.annotation.Nullable; + +import com.besome.sketch.lib.base.BaseAppCompatActivity; + +import io.github.rosemoe.sora.langs.java.JavaLanguage; +import io.github.rosemoe.sora.widget.schemes.EditorColorScheme; +import io.github.rosemoe.sora.widget.schemes.SchemeDarcula; + +import mod.hey.studios.util.Helper; + +import pro.sketchware.databinding.ActivityCodeViewerBinding; + +public class CodeViewerActivity extends BaseAppCompatActivity { + + private ActivityCodeViewerBinding binding; + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + binding = ActivityCodeViewerBinding.inflate(getLayoutInflater()); + setContentView(binding.getRoot()); + binding.toolbar.setNavigationOnClickListener(Helper.getBackPressedClickListener(this)); + var code = getIntent().getStringExtra("code"); + binding.editor.setTypefaceText(Typeface.MONOSPACE); + binding.editor.setTextSize(14); + binding.editor.setText(code); + binding.editor.setEditable(false); + binding.editor.setWordwrap(false); + loadColorScheme(); + } + + private void loadColorScheme() { + binding.editor.setEditorLanguage(new JavaLanguage()); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + if (isDarkThemeEnabled(this)) { + binding.editor.setColorScheme(new SchemeDarcula()); + } else { + binding.editor.setColorScheme(new EditorColorScheme()); + } + } else { + binding.editor.setColorScheme(new EditorColorScheme()); + } + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/activity_code_viewer.xml b/app/src/main/res/layout/activity_code_viewer.xml new file mode 100644 index 0000000000..d103d137bd --- /dev/null +++ b/app/src/main/res/layout/activity_code_viewer.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index aa09834753..00463de9c7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2243,5 +2243,7 @@ Please try again later" Used Custom Blocks Enter %s value + + Code Viewer From c54c0854823c61927a93bc68390ac91b5ce6db72 Mon Sep 17 00:00:00 2001 From: Mustafa salah <87241434+Mustiy0@users.noreply.github.com> Date: Mon, 30 Dec 2024 01:58:32 +0300 Subject: [PATCH 07/20] feat: Change many icons to material (#1541) * feat : changing restore projects icon * feat : changing lib manager icons * feat : changing lib manager inner icons * feat : changing AndroidManifest manager icons * feat : changing app settings icons * feat : changing Events icons * feat : changing ugly icons * fix : change wrong ico path * chore: dont use colorPrimary in Events manager Activity option icon --------- Co-authored-by: Aquiles Trindade --- app/src/main/java/a/a/a/br.java | 2 +- app/src/main/java/a/a/a/oq.java | 102 +++++++++--------- .../sketch/beans/ProjectLibraryBean.java | 8 +- .../component/CollapsibleComponentLayout.java | 10 +- .../component/ComponentEventButton.java | 12 +-- .../manage/library/ManageLibraryActivity.java | 2 +- .../manage/library/admob/AdmobActivity.java | 2 +- .../editor/property/PropertyInputItem.java | 6 +- .../besome/sketch/editor/view/ViewEvents.java | 5 +- .../jcoderz/editor/event/ManageEvent.java | 53 ++++----- .../AndroidManifestInjection.java | 11 +- .../saif/activities/tools/AppSettings.java | 18 ++-- .../mod/hilal/saif/events/EventsHandler.java | 14 +-- .../ExcludeBuiltInLibrariesActivity.java | 2 +- .../mod/jbk/util/OldResourceIdMapper.java | 2 +- ...ne_secondary.xml => circle_bg_surface.xml} | 5 +- .../main/res/drawable/ic_mtrl_abc_click.xml | 19 ++++ .../main/res/drawable/ic_mtrl_add_circle.xml | 9 ++ app/src/main/res/drawable/ic_mtrl_admob.xml | 22 ++-- .../main/res/drawable/ic_mtrl_anim_cancel.xml | 13 +++ .../main/res/drawable/ic_mtrl_anim_end.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_bind.xml | 15 +++ .../drawable/ic_mtrl_bluetooth_connected.xml | 10 ++ .../main/res/drawable/ic_mtrl_bt_cancel.xml | 13 +++ .../main/res/drawable/ic_mtrl_bt_error.xml | 13 +++ .../main/res/drawable/ic_mtrl_bt_received.xml | 14 +++ app/src/main/res/drawable/ic_mtrl_bt_sent.xml | 13 +++ app/src/main/res/drawable/ic_mtrl_cancel.xml | 10 ++ .../res/drawable/ic_mtrl_database_added.xml | 13 +++ .../res/drawable/ic_mtrl_database_edit.xml | 13 +++ .../res/drawable/ic_mtrl_database_moved.xml | 13 +++ .../res/drawable/ic_mtrl_database_off.xml | 10 ++ .../res/drawable/ic_mtrl_date_changed.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_design.xml | 11 ++ .../main/res/drawable/ic_mtrl_downloading.xml | 10 ++ .../main/res/drawable/ic_mtrl_email_sent.xml | 10 ++ .../main/res/drawable/ic_mtrl_file_picked.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_gpp_bad.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_group.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_label.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_link.xml | 10 ++ .../main/res/drawable/ic_mtrl_link_check.xml | 13 +++ .../main/res/drawable/ic_mtrl_link_fail.xml | 13 +++ .../main/res/drawable/ic_mtrl_load_failed.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_loaded.xml | 10 ++ .../main/res/drawable/ic_mtrl_loc_click.xml | 13 +++ .../res/drawable/ic_mtrl_location_changed.xml | 10 ++ .../main/res/drawable/ic_mtrl_map_ready.xml | 13 +++ .../main/res/drawable/ic_mtrl_password.xml | 6 +- app/src/main/res/drawable/ic_mtrl_payment.xml | 10 ++ .../main/res/drawable/ic_mtrl_pic_cancel.xml | 10 ++ .../main/res/drawable/ic_mtrl_pic_taken.xml | 10 ++ .../main/res/drawable/ic_mtrl_pick_cancel.xml | 10 ++ .../main/res/drawable/ic_mtrl_post_added.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_preview.xml | 10 ++ .../main/res/drawable/ic_mtrl_preview_off.xml | 10 ++ .../main/res/drawable/ic_mtrl_prog_max.xml | 17 +++ .../main/res/drawable/ic_mtrl_prog_min.xml | 4 +- .../res/drawable/ic_mtrl_progress_check.xml | 13 +++ app/src/main/res/drawable/ic_mtrl_reset.xml | 10 +- app/src/main/res/drawable/ic_mtrl_rotate.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_sensor.xml | 10 ++ .../res/drawable/ic_mtrl_sensor_cancel.xml | 10 ++ .../ic_mtrl_settings_applications.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_signin.xml | 13 +++ .../main/res/drawable/ic_mtrl_sms_check.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_speech.xml | 10 ++ .../res/drawable/ic_mtrl_speech_cancel.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_sprint.xml | 10 ++ app/src/main/res/drawable/ic_mtrl_target.xml | 10 ++ .../main/res/drawable/ic_mtrl_text_change.xml | 10 ++ .../main/res/drawable/ic_mtrl_text_select.xml | 10 ++ .../main/res/drawable/ic_mtrl_touch_long.xml | 10 ++ .../res/drawable/ic_mtrl_track_started.xml | 13 +++ .../main/res/drawable/ic_mtrl_uploaded.xml | 10 ++ .../main/res/drawable/ic_mtrl_uploading.xml | 10 ++ .../main/res/drawable/ic_mtrl_user_create.xml | 10 ++ .../main/res/drawable/ic_mtrl_user_delete.xml | 10 ++ .../main/res/drawable/ic_mtrl_user_edit.xml | 13 +++ .../ic_mtrl_user_register_complete.xml | 10 ++ .../main/res/drawable/ic_mtrl_user_remove.xml | 10 ++ .../res/drawable/ic_mtrl_verified_user.xml | 10 ++ .../res/drawable/ic_mtrl_vid_completed.xml | 13 +++ .../main/res/drawable/ic_mtrl_vid_error.xml | 15 +++ .../res/drawable/ic_mtrl_vid_prepared.xml | 15 +++ app/src/main/res/layout/event_grid_item.xml | 3 +- .../layout/fr_logic_list_item_component.xml | 3 +- .../fr_logic_list_item_component_event.xml | 6 +- .../fr_logic_list_item_event_preview.xml | 13 ++- .../fr_logic_list_preview_with_event_item.xml | 12 ++- .../res/layout/fragment_events_manager.xml | 6 +- .../main/res/layout/manage_library_admob.xml | 2 +- .../layout/manage_library_admob_preview.xml | 52 ++++----- ...nage_library_exclude_builtin_libraries.xml | 5 +- .../res/layout/manage_library_firebase.xml | 2 +- .../manage_library_firebase_preview.xml | 8 +- ...nage_library_firebase_project_settings.xml | 6 +- ..._library_firebase_storage_url_settings.xml | 2 +- .../layout/manage_library_manage_admob.xml | 12 +-- .../layout/manage_library_manage_compat.xml | 2 +- .../layout/manage_library_manage_firebase.xml | 8 +- .../manage_library_manage_googlemap.xml | 4 +- ...nage_library_setting_admob_adunit_item.xml | 2 +- ...library_setting_admob_test_device_item.xml | 4 +- .../res/layout/myprojects_item_special.xml | 2 +- 105 files changed, 967 insertions(+), 216 deletions(-) rename app/src/main/res/drawable/{circle_bg_white_outline_secondary.xml => circle_bg_surface.xml} (57%) create mode 100644 app/src/main/res/drawable/ic_mtrl_abc_click.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_add_circle.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_anim_cancel.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_anim_end.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_bind.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_bluetooth_connected.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_bt_cancel.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_bt_error.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_bt_received.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_bt_sent.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_cancel.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_database_added.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_database_edit.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_database_moved.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_database_off.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_date_changed.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_design.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_downloading.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_email_sent.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_file_picked.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_gpp_bad.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_group.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_label.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_link.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_link_check.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_link_fail.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_load_failed.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_loaded.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_loc_click.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_location_changed.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_map_ready.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_payment.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_pic_cancel.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_pic_taken.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_pick_cancel.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_post_added.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_preview.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_preview_off.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_prog_max.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_progress_check.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_rotate.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_sensor.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_sensor_cancel.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_settings_applications.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_signin.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_sms_check.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_speech.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_speech_cancel.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_sprint.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_target.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_text_change.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_text_select.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_touch_long.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_track_started.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_uploaded.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_uploading.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_user_create.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_user_delete.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_user_edit.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_user_register_complete.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_user_remove.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_verified_user.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_vid_completed.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_vid_error.xml create mode 100644 app/src/main/res/drawable/ic_mtrl_vid_prepared.xml diff --git a/app/src/main/java/a/a/a/br.java b/app/src/main/java/a/a/a/br.java index e05a9260aa..dea2c341b8 100644 --- a/app/src/main/java/a/a/a/br.java +++ b/app/src/main/java/a/a/a/br.java @@ -275,7 +275,7 @@ void bind(ComponentBean componentBean) { previewBinding.getRoot().setLayoutParams(layoutParams); previewBinding.icon.setImageResource(oq.a(event.eventName)); previewBinding.iconBg.setBackgroundResource( - R.drawable.circle_bg_white_outline_secondary); + R.drawable.circle_bg_surface); binding.eventsPreview.addView(previewBinding.getRoot()); availableEvents.remove(event.eventName); } diff --git a/app/src/main/java/a/a/a/oq.java b/app/src/main/java/a/a/a/oq.java index 254d382752..cc945af467 100644 --- a/app/src/main/java/a/a/a/oq.java +++ b/app/src/main/java/a/a/a/oq.java @@ -24,60 +24,60 @@ public static int a(String eventName) { return switch (eventName) { case "initializeLogic", "onBackPressed", "onPostCreate", "onStart", "onStop", "onDestroy", "onResume", "onPause", "moreBlock" -> R.drawable.bg_event_type_activity; - case "onBannerAdClicked", "onClick" -> R.drawable.event_on_click_48dp; - case "onCheckedChange" -> R.drawable.event_on_check_changed_48dp; - case "onItemSelected" -> R.drawable.event_on_item_selected_48dp; - case "onItemClicked" -> R.drawable.event_on_item_clicked_48dp; - case "onItemLongClicked" -> R.drawable.event_on_item_long_clicked_48dp; - case "onTextChanged" -> R.drawable.event_on_text_changed_48dp; - case "onPageStarted" -> R.drawable.event_on_page_started_48dp; - case "onPageFinished" -> R.drawable.event_on_page_finished_48dp; - case "onProgressChanged" -> R.drawable.event_on_progress_changed_48dp; - case "onStartTrackingTouch" -> R.drawable.event_on_start_tracking_touch_48dp; - case "onStopTrackingTouch" -> R.drawable.event_on_stop_tracking_touch_48dp; - case "onAnimationStart" -> R.drawable.event_on_animation_start_48dp; - case "onAnimationEnd" -> R.drawable.event_on_animation_end_48dp; - case "onAnimationCancel" -> R.drawable.event_on_animation_cancel_48dp; - case "onAnimationRepeat" -> R.drawable.event_animation_repeat_48dp; - case "onBindCustomView" -> R.drawable.event_on_bind_custom_view_48dp; - case "onDateChange" -> R.drawable.event_on_date_changed_48dp; - case "onChildAdded" -> R.drawable.event_on_child_added_48dp; - case "onChildChanged" -> R.drawable.event_on_child_changed_48dp; - case "onChildMoved" -> R.drawable.event_on_child_moved_48dp; - case "onChildRemoved", "onDeleteSuccess" -> R.drawable.event_on_child_removed_48dp; - case "onCancelled" -> R.drawable.event_on_cancelled_48dp; - case "onCreateUserComplete" -> R.drawable.event_on_create_user_complete_48dp; - case "onSignInUserComplete" -> R.drawable.event_on_signin_complete_48dp; - case "onResetPasswordEmailSent" -> R.drawable.event_on_reset_password_email_sent_48dp; - case "onSensorChanged" -> R.drawable.event_on_sensor_changed_48dp; - case "onAccuracyChanged" -> R.drawable.event_on_accuracy_changed_48dp; + case "onBannerAdClicked", "onClick" -> R.drawable.ic_mtrl_touch; + case "onCheckedChange" -> R.drawable.ic_mtrl_checkbox; + case "onItemSelected" -> R.drawable.ic_mtrl_pull_down; + case "onItemClicked" -> R.drawable.ic_mtrl_list; + case "onItemLongClicked" -> R.drawable.ic_mtrl_touch_long; + case "onTextChanged" -> R.drawable.ic_mtrl_text_change; + case "onPageStarted" -> R.drawable.ic_mtrl_progress; + case "onPageFinished" -> R.drawable.ic_mtrl_preview; + case "onProgressChanged" -> R.drawable.ic_mtrl_progress_check; + case "onStartTrackingTouch" -> R.drawable.ic_mtrl_track_started; + case "onStopTrackingTouch" -> R.drawable.ic_mtrl_target; + case "onAnimationStart" -> R.drawable.ic_mtrl_sprint; + case "onAnimationEnd" -> R.drawable.ic_mtrl_anim_end; + case "onAnimationCancel" -> R.drawable.ic_mtrl_anim_cancel; + case "onAnimationRepeat" -> R.drawable.ic_mtrl_refresh; + case "onBindCustomView" -> R.drawable.ic_mtrl_bind; + case "onDateChange" -> R.drawable.ic_mtrl_date_changed; + case "onChildAdded" -> R.drawable.ic_mtrl_database_added; + case "onChildChanged" -> R.drawable.ic_mtrl_database_edit; + case "onChildMoved" -> R.drawable.ic_mtrl_database_moved; + case "onChildRemoved", "onDeleteSuccess" -> R.drawable.ic_mtrl_database_off; + case "onCancelled" -> R.drawable.ic_mtrl_cancel; + case "onCreateUserComplete" -> R.drawable.ic_mtrl_user_create; + case "onSignInUserComplete" -> R.drawable.ic_mtrl_signin; + case "onResetPasswordEmailSent" -> R.drawable.ic_mtrl_reset; + case "onSensorChanged" -> R.drawable.ic_mtrl_sensor; + case "onAccuracyChanged" -> R.drawable.ic_mtrl_center; case "onInterstitialAdLoaded", "onBannerAdLoaded", "onRewardAdLoaded" -> - R.drawable.event_on_ad_loaded; + R.drawable.ic_mtrl_loaded; case "onBannerAdFailedToLoad", "onInterstitialAdFailedToLoad", "onAdFailedToShowFullScreenContent", "onRewardAdFailedToLoad", "onFailure" -> - R.drawable.event_on_ad_failed_to_load; - case "onAdShowedFullScreenContent", "onBannerAdOpened" -> R.drawable.event_on_ad_opened; + R.drawable.ic_mtrl_load_failed; + case "onAdShowedFullScreenContent", "onBannerAdOpened" -> R.drawable.ic_mtrl_preview; case "onAdDismissedFullScreenContent", "onBannerAdClosed" -> - R.drawable.event_on_ad_closed; - case "onUploadProgress" -> R.drawable.event_on_upload_progress_48dp; - case "onDownloadProgress" -> R.drawable.event_on_download_progress_48dp; - case "onUploadSuccess" -> R.drawable.event_on_upload_success_48dp; - case "onDownloadSuccess" -> R.drawable.event_on_download_success_48dp; - case "onPictureTaken" -> R.drawable.event_on_picture_taken_48dp; - case "onPictureTakenCancel" -> R.drawable.event_on_picture_taken_cancel_48dp; - case "onFilesPicked" -> R.drawable.event_on_file_picked_48dp; - case "onFilesPickedCancel" -> R.drawable.event_on_file_picked_cancel_48dp; - case "onResponse" -> R.drawable.event_on_response_48dp; - case "onErrorResponse" -> R.drawable.event_on_error_response_48dp; - case "onSpeechResult" -> R.drawable.event_on_speech_result; - case "onSpeechError" -> R.drawable.event_on_speech_error; - case "onConnected" -> R.drawable.event_on_connected_96; - case "onDataReceived" -> R.drawable.event_on_data_received_96; - case "onDataSent" -> R.drawable.event_on_data_sent_96; - case "onConnectionError" -> R.drawable.event_on_connection_error_96; - case "onConnectionStopped" -> R.drawable.event_on_connection_stopped_96; - case "onLocationChanged" -> R.drawable.event_on_location_changed_96; - case "onMapReady" -> R.drawable.event_on_map_ready_96; - case "onMarkerClicked" -> R.drawable.event_on_marker_clicked_96; + R.drawable.ic_mtrl_preview_off; + case "onUploadProgress" -> R.drawable.ic_mtrl_uploading; + case "onDownloadProgress" -> R.drawable.ic_mtrl_downloading; + case "onUploadSuccess" -> R.drawable.ic_mtrl_uploaded; + case "onDownloadSuccess" -> R.drawable.ic_mtrl_download; + case "onPictureTaken" -> R.drawable.ic_mtrl_pic_taken; + case "onPictureTakenCancel" -> R.drawable.ic_mtrl_pic_cancel; + case "onFilesPicked" -> R.drawable.ic_mtrl_file_picked; + case "onFilesPickedCancel" -> R.drawable.ic_mtrl_pick_cancel; + case "onResponse" -> R.drawable.ic_mtrl_sensor; + case "onErrorResponse" -> R.drawable.ic_mtrl_sensor_cancel; + case "onSpeechResult" -> R.drawable.ic_mtrl_speech; + case "onSpeechError" -> R.drawable.ic_mtrl_speech_cancel; + case "onConnected" -> R.drawable.ic_mtrl_bluetooth_connected; + case "onDataReceived" -> R.drawable.ic_mtrl_bt_received; + case "onDataSent" -> R.drawable.ic_mtrl_bt_sent; + case "onConnectionError" -> R.drawable.ic_mtrl_bt_error; + case "onConnectionStopped" -> R.drawable.ic_mtrl_bt_cancel; + case "onLocationChanged" -> R.drawable.ic_mtrl_location_changed; + case "onMapReady" -> R.drawable.ic_mtrl_map_ready; + case "onMarkerClicked" -> R.drawable.ic_mtrl_loc_click; default -> ManageEvent.d(eventName); }; } diff --git a/app/src/main/java/com/besome/sketch/beans/ProjectLibraryBean.java b/app/src/main/java/com/besome/sketch/beans/ProjectLibraryBean.java index 3c9cdbbea9..a091981723 100644 --- a/app/src/main/java/com/besome/sketch/beans/ProjectLibraryBean.java +++ b/app/src/main/java/com/besome/sketch/beans/ProjectLibraryBean.java @@ -84,10 +84,10 @@ public static Parcelable.Creator getCreator() { public static int getLibraryIcon(int i) { return switch (i) { - case 0 -> R.drawable.widget_firebase; - case 1 -> R.drawable.connected_96; - case 2 -> R.drawable.widget_admob; - case 3 -> R.drawable.widget_google_map; + case 0 -> R.drawable.ic_mtrl_firebase; + case 1 -> R.drawable.ic_mtrl_design; + case 2 -> R.drawable.ic_mtrl_admob; + case 3 -> R.drawable.ic_mtrl_map; case 4 -> R.drawable.ic_mtrl_box; case 5 -> R.drawable.ic_mtrl_settings_input; default -> 0; diff --git a/app/src/main/java/com/besome/sketch/editor/component/CollapsibleComponentLayout.java b/app/src/main/java/com/besome/sketch/editor/component/CollapsibleComponentLayout.java index 985a183f51..0273dd47ae 100644 --- a/app/src/main/java/com/besome/sketch/editor/component/CollapsibleComponentLayout.java +++ b/app/src/main/java/com/besome/sketch/editor/component/CollapsibleComponentLayout.java @@ -1,6 +1,8 @@ package com.besome.sketch.editor.component; import android.content.Context; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffColorFilter; import android.util.AttributeSet; import androidx.annotation.NonNull; @@ -8,6 +10,8 @@ import com.besome.sketch.lib.ui.CollapsibleButton; import com.besome.sketch.lib.base.CollapsibleLayout; +import com.google.android.material.color.MaterialColors; + import pro.sketchware.R; import java.util.List; @@ -27,7 +31,11 @@ public CollapsibleComponentLayout(@NonNull Context context, @Nullable AttributeS @Override protected List initializeButtons(@NonNull Context context) { - delete = CollapsibleButton.create(context, 0, R.drawable.delete_96, R.string.common_word_delete); + delete = CollapsibleButton.create(context, 0, R.drawable.ic_mtrl_delete, R.string.common_word_delete); + var colorError = MaterialColors.getColor(delete, com.google.android.material.R.attr.colorError); + var iconFilter = new PorterDuffColorFilter(colorError, PorterDuff.Mode.SRC_ATOP); + delete.getLabel().setTextColor(colorError); + delete.getIcon().setColorFilter(iconFilter); return List.of(delete); } diff --git a/app/src/main/java/com/besome/sketch/editor/component/ComponentEventButton.java b/app/src/main/java/com/besome/sketch/editor/component/ComponentEventButton.java index f989f7dedb..c6f8c729a5 100644 --- a/app/src/main/java/com/besome/sketch/editor/component/ComponentEventButton.java +++ b/app/src/main/java/com/besome/sketch/editor/component/ComponentEventButton.java @@ -9,6 +9,8 @@ import android.widget.LinearLayout; import android.widget.TextView; +import com.google.android.material.color.MaterialColors; + import pro.sketchware.R; import a.a.a.wB; @@ -38,9 +40,8 @@ private void initialize(Context context) { public void onEventAdded() { addEvent.setVisibility(GONE); - ColorMatrix colorMatrix = new ColorMatrix(); - colorMatrix.setSaturation(1); - icon.setColorFilter(new ColorMatrixColorFilter(colorMatrix)); + icon.setColorFilter(MaterialColors.getColor(name, com.google.android.material.R.attr.colorSecondary)); + } public void setClickListener(View.OnClickListener onClickListener) { @@ -49,9 +50,8 @@ public void setClickListener(View.OnClickListener onClickListener) { public void onEventAvailableToAdd() { addEvent.setVisibility(VISIBLE); - ColorMatrix colorMatrix = new ColorMatrix(); - colorMatrix.setSaturation(0); - icon.setColorFilter(new ColorMatrixColorFilter(colorMatrix)); + icon.setColorFilter(MaterialColors.getColor(name, com.google.android.material.R.attr.colorOutlineVariant)); + } public ImageView getIcon() { diff --git a/app/src/main/java/com/besome/sketch/editor/manage/library/ManageLibraryActivity.java b/app/src/main/java/com/besome/sketch/editor/manage/library/ManageLibraryActivity.java index 70eea1ba8b..a9624513ae 100644 --- a/app/src/main/java/com/besome/sketch/editor/manage/library/ManageLibraryActivity.java +++ b/app/src/main/java/com/besome/sketch/editor/manage/library/ManageLibraryActivity.java @@ -362,7 +362,7 @@ public void onSaveInstanceState(Bundle outState) { private void showFirebaseNeedCompatDialog() { aB dialog = new aB(this); - dialog.a(R.drawable.widget_firebase); + dialog.a(R.drawable.ic_mtrl_firebase); dialog.b(Helper.getResString(R.string.common_word_warning)); dialog.a(Helper.getResString(R.string.design_library_firebase_message_need_compat)); dialog.b(Helper.getResString(R.string.common_word_ok), Helper.getDialogDismissListener(dialog)); diff --git a/app/src/main/java/com/besome/sketch/editor/manage/library/admob/AdmobActivity.java b/app/src/main/java/com/besome/sketch/editor/manage/library/admob/AdmobActivity.java index 4617a0919c..015b3a9575 100644 --- a/app/src/main/java/com/besome/sketch/editor/manage/library/admob/AdmobActivity.java +++ b/app/src/main/java/com/besome/sketch/editor/manage/library/admob/AdmobActivity.java @@ -214,7 +214,7 @@ public void onCreate(Bundle savedInstanceState) { binding.tvGotoConsole.setText(Helper.getResString(R.string.design_library_admob_button_goto_setting)); binding.tvPrevbtn.setText(Helper.getResString(R.string.common_word_prev)); binding.tvPrevbtn.setOnClickListener(this); - binding.icon.setImageResource(R.drawable.widget_admob); + binding.icon.setImageResource(R.drawable.ic_mtrl_admob); binding.tvNextbtn.setText(Helper.getResString(R.string.common_word_next)); binding.tvNextbtn.setOnClickListener(this); binding.imgBackbtn.setOnClickListener(Helper.getBackPressedClickListener(this)); diff --git a/app/src/main/java/com/besome/sketch/editor/property/PropertyInputItem.java b/app/src/main/java/com/besome/sketch/editor/property/PropertyInputItem.java index 69e1d98b92..594bc5fe2c 100644 --- a/app/src/main/java/com/besome/sketch/editor/property/PropertyInputItem.java +++ b/app/src/main/java/com/besome/sketch/editor/property/PropertyInputItem.java @@ -101,13 +101,13 @@ public PropertyInputItem(Context context, boolean z) { private void setIcon(ImageView imageView) { switch (key) { case "property_id" -> icon = R.drawable.ic_mtrl_id; - case "property_text" -> icon = R.drawable.ic_mtrl_type; + case "property_text" -> icon = R.drawable.ic_mtrl_text_select; case "property_hint" -> icon = R.drawable.ic_mtrl_bulb; case "property_weight", "property_weight_sum" -> icon = R.drawable.ic_mtrl_weight; - case "property_rotate" -> icon = R.drawable.ic_mtrl_rotate_90; + case "property_rotate" -> icon = R.drawable.ic_mtrl_rotate; case "property_lines" -> icon = R.drawable.ic_mtrl_numbers; case "property_progress" -> icon = R.drawable.ic_mtrl_prog_min; - case "property_max" -> icon = R.drawable.ic_mtrl_circle; + case "property_max" -> icon = R.drawable.ic_mtrl_prog_max; case "property_alpha" -> icon = R.drawable.ic_mtrl_opacity_full; case "property_translation_x" -> icon = R.drawable.ic_mtrl_move_x; case "property_translation_y" -> icon = R.drawable.ic_mtrl_move_y; diff --git a/app/src/main/java/com/besome/sketch/editor/view/ViewEvents.java b/app/src/main/java/com/besome/sketch/editor/view/ViewEvents.java index adefbe3b7a..d852845411 100644 --- a/app/src/main/java/com/besome/sketch/editor/view/ViewEvents.java +++ b/app/src/main/java/com/besome/sketch/editor/view/ViewEvents.java @@ -15,6 +15,7 @@ import com.besome.sketch.beans.EventBean; import com.besome.sketch.beans.ProjectFileBean; import com.besome.sketch.beans.ViewBean; +import com.google.android.material.color.MaterialColors; import pro.sketchware.R; import pro.sketchware.databinding.EventGridItemBinding; @@ -115,7 +116,7 @@ public void bind(EventBean event, int position) { binding.tvTitle.setText(event.eventName); if (event.isSelected) { - mB.a(binding.imgIcon, 1); + binding.imgIcon.setColorFilter(MaterialColors.getColor(binding.tvTitle, com.google.android.material.R.attr.colorSecondary)); binding.imgUsedEvent.setVisibility(View.GONE); binding.container.setOnLongClickListener(v -> { aB dialog = new aB((Activity) itemView.getContext()); @@ -136,7 +137,7 @@ public void bind(EventBean event, int position) { }); } else { binding.imgUsedEvent.setVisibility(View.VISIBLE); - mB.a(binding.imgIcon, 0); + binding.imgIcon.setColorFilter(MaterialColors.getColor(binding.tvTitle, com.google.android.material.R.attr.colorOutlineVariant)); } } } diff --git a/app/src/main/java/mod/agus/jcoderz/editor/event/ManageEvent.java b/app/src/main/java/mod/agus/jcoderz/editor/event/ManageEvent.java index 71d949de8f..e6dcc73647 100644 --- a/app/src/main/java/mod/agus/jcoderz/editor/event/ManageEvent.java +++ b/app/src/main/java/mod/agus/jcoderz/editor/event/ManageEvent.java @@ -334,49 +334,50 @@ public static void c(String eventName, ArrayList list) { public static int d(String str) { return switch (str) { - case "onUpdateProfileComplete" -> R.drawable.event_update_profile; + case "onUpdateProfileComplete" -> R.drawable.ic_mtrl_user_edit; case "FBAdsBanner_onLoggingImpression", "FBAdsInterstitial_onLoggingImpression" -> R.drawable.event_fbads_impression; - case "onEmailVerificationSent" -> R.drawable.event_email_verif_sent; - case "onDateChanged", "onDateSet" -> R.drawable.event_on_date_changed_48dp; - case "onFailureLink" -> R.drawable.event_fb_dynamic_fail; - case "onDeleteUserComplete" -> R.drawable.event_delete_user; - case "onCompletion" -> R.drawable.event_on_file_put_success_48dp; - case "onQueryTextChanged", "onQueryTextSubmit" -> R.drawable.ic_search_color_96dp; - case "onUpdateEmailComplete" -> R.drawable.event_email_updated; - case "onError", "onRestoreInstanceState" -> R.drawable.error_96_yellow; - case "onVerificationCompleted" -> R.drawable.event_verif_success; + case "onEmailVerificationSent" -> R.drawable.ic_mtrl_sms_check; + case "onDateChanged", "onDateSet" -> R.drawable.ic_mtrl_date_changed; + case "onFailureLink" -> R.drawable.ic_mtrl_link_fail; + case "onDeleteUserComplete" -> R.drawable.ic_mtrl_user_remove; + case "onCompletion" -> R.drawable.ic_mtrl_vid_completed; + case "onQueryTextChanged", "onQueryTextSubmit" -> R.drawable.ic_mtrl_search; + case "onUpdateEmailComplete" -> R.drawable.ic_mtrl_email_sent; + case "onRestoreInstanceState" -> R.drawable.ic_mtrl_warning; + case "onError" -> R.drawable.ic_mtrl_vid_error; + case "onVerificationCompleted" -> R.drawable.ic_mtrl_verified_user; case "onSaveInstanceState", "onCreateOptionsMenu", "onCreateContextMenu", "onContextItemSelected", "onOptionsItemSelected" -> R.drawable.bg_event_type_activity; - case "onSuccessLink" -> R.drawable.event_fb_dynamic_success; + case "onSuccessLink" -> R.drawable.ic_mtrl_link_check; case "onPatternLockCleared", "onPatternLockProgress", "onPatternLockStarted", - "onPatternLockComplete" -> R.drawable.event_pattern_lock_view; + "onPatternLockComplete" -> R.drawable.ic_mtrl_pattern; case "FBAdsInterstitial_onAdClicked", "FBAdsBanner_onAdClicked" -> R.drawable.event_fbads_click; - case "onAccountPickerCancelled" -> R.drawable.event_google_revoke; - case "onVerificationFailed" -> R.drawable.event_verif_failed; + case "onAccountPickerCancelled" -> R.drawable.ic_mtrl_user_delete; + case "onVerificationFailed" -> R.drawable.ic_mtrl_gpp_bad; case "onGoogleSignIn" -> R.drawable.event_google_signin; - case "onAccountPicker" -> R.drawable.event_google_result; - case "onFragmentAdded" -> R.drawable.widget_fragment; - case "onTimeSet", "onTimeChanged" -> R.drawable.widget_timer; - case "signInWithPhoneAuthComplete", "onCodeSent" -> R.drawable.event_code_sent; + case "onAccountPicker" -> R.drawable.ic_mtrl_group; + case "onFragmentAdded" -> R.drawable.ic_mtrl_viewpager; + case "onTimeSet", "onTimeChanged" -> R.drawable.ic_mtrl_timer; + case "signInWithPhoneAuthComplete", "onCodeSent" -> R.drawable.ic_mtrl_email_sent; case "FBAdsInterstitial_onInterstitialDismissed" -> R.drawable.event_fbads_dismiss; - case "onRatingChanged" -> R.drawable.star_filled; + case "onRatingChanged" -> R.drawable.ic_mtrl_star; case "FBAdsInterstitial_onInterstitialDisplayed" -> R.drawable.event_fbads_displayed; - case "onLetterSelected" -> R.drawable.event_on_letter_selected; + case "onLetterSelected" -> R.drawable.ic_mtrl_abc_click; case "onScrollChanged", "onPageChanged", "onPageScrolled", "onRecyclerScrolled", "onRecyclerScrollChanged", "onNavigationItemSelected", "onScrolled", "onTabUnselected", "onPageSelected", "onTabSelected", "onTabReselected" -> - R.drawable.event_on_item_long_clicked_48dp; - case "onPrepared" -> R.drawable.event_on_page_started_48dp; + R.drawable.ic_mtrl_touch_long; + case "onPrepared" -> R.drawable.ic_mtrl_vid_prepared; case "FBAdsInterstitial_onError", "FBAdsBanner_onError" -> R.drawable.event_fbads_error; case "FBAdsInterstitial_onAdLoaded", "FBAdsBanner_onAdLoaded" -> R.drawable.event_fbads_loaded; - case "onTabAdded" -> R.drawable.widget_tab_layout; - case "onCompleteRegister" -> R.drawable.event_complete_register; - case "onUpdatePasswordComplete" -> R.drawable.event_password_updated; - case "onUserEarnedReward" -> R.drawable.receive_cash_48; + case "onTabAdded" -> R.drawable.ic_mtrl_post_added; + case "onCompleteRegister" -> R.drawable.ic_mtrl_user_register_complete; + case "onUpdatePasswordComplete" -> R.drawable.ic_mtrl_password; + case "onUserEarnedReward" -> R.drawable.ic_mtrl_payment; default -> EventsHandler.getIcon(str); }; } diff --git a/app/src/main/java/mod/hilal/saif/activities/android_manifest/AndroidManifestInjection.java b/app/src/main/java/mod/hilal/saif/activities/android_manifest/AndroidManifestInjection.java index 16658c58fd..62a3633ada 100644 --- a/app/src/main/java/mod/hilal/saif/activities/android_manifest/AndroidManifestInjection.java +++ b/app/src/main/java/mod/hilal/saif/activities/android_manifest/AndroidManifestInjection.java @@ -110,13 +110,12 @@ private void checkAttrs() { private void setupViews() { LinearLayout content = findViewById(R.id.content); LinearLayout cards = findViewById(R.id.cards); - List options = new ArrayList<>(); options.add(createOption( "Application", "Default properties for the app", - R.drawable.icons8_app_attrs, + R.drawable.ic_mtrl_settings_applications, v -> { Intent intent = new Intent(); intent.setClass(getApplicationContext(), AndroidManifestInjectionDetails.class); @@ -129,7 +128,7 @@ private void setupViews() { options.add(createOption( "Permissions", "Add custom Permissions to the app", - R.drawable.event_on_signin_complete_48dp, + R.drawable.ic_mtrl_shield_check, v -> { Intent intent = new Intent(); intent.setClass(getApplicationContext(), AndroidManifestInjectionDetails.class); @@ -142,13 +141,13 @@ private void setupViews() { options.add(createOption( "Launcher Activity", "Change the default Launcher Activity", - R.drawable.recycling_48, + R.drawable.ic_mtrl_lifecycle, v -> showLauncherActDialog(AndroidManifestInjector.getLauncherActivity(sc_id)) )); options.add(createOption( "All Activities", "Add attributes for all Activities", - R.drawable.icons8_all_activities_attrs, + R.drawable.ic_mtrl_deployed_code, v -> { Intent intent = new Intent(); intent.setClass(getApplicationContext(), AndroidManifestInjectionDetails.class); @@ -161,7 +160,7 @@ private void setupViews() { options.add(createOption( "App Components", "Add extra components", - R.drawable.icons8_app_components, + R.drawable.ic_mtrl_component, v -> showAppComponentDialog() )); diff --git a/app/src/main/java/mod/hilal/saif/activities/tools/AppSettings.java b/app/src/main/java/mod/hilal/saif/activities/tools/AppSettings.java index 7baf8b33d4..557c6c9cfd 100644 --- a/app/src/main/java/mod/hilal/saif/activities/tools/AppSettings.java +++ b/app/src/main/java/mod/hilal/saif/activities/tools/AppSettings.java @@ -131,16 +131,16 @@ private void openWorkingDirectory() { } private void setupPreferences() { - preferences.add(createPreference(R.drawable.block_96_blue, "Block manager", "Manage your own blocks to use in Logic Editor", new ActivityLauncher(new Intent(getApplicationContext(), BlocksManager.class)), false)); - preferences.add(createPreference(R.drawable.pull_down_48, "Block selector menu manager", "Manage your own block selector menus", openSettingsActivity(SettingsActivity.BLOCK_SELECTOR_MANAGER_FRAGMENT), false)); - preferences.add(createPreference(R.drawable.collage_48, "Component manager", "Manage your own components", new ActivityLauncher(new Intent(getApplicationContext(), ManageCustomComponentActivity.class)), false)); - preferences.add(createPreference(R.drawable.event_on_item_clicked_48dp, "Event manager", "Manage your own events", openSettingsActivity(SettingsActivity.EVENTS_MANAGER_FRAGMENT), false)); - preferences.add(createPreference(R.drawable.colored_box_96, "Local library manager", "Manage and download local libraries", new ActivityLauncher(new Intent(getApplicationContext(), ManageLocalLibraryActivity.class), new Pair<>("sc_id", "system")), false)); - preferences.add(createPreference(R.drawable.engineering_48, "Mod settings", "Change general mod settings", new ActivityLauncher(new Intent(getApplicationContext(), ConfigActivity.class)), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_block, "Block manager", "Manage your own blocks to use in Logic Editor", new ActivityLauncher(new Intent(getApplicationContext(), BlocksManager.class)), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_pull_down, "Block selector menu manager", "Manage your own block selector menus", openSettingsActivity(SettingsActivity.BLOCK_SELECTOR_MANAGER_FRAGMENT), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_component, "Component manager", "Manage your own components", new ActivityLauncher(new Intent(getApplicationContext(), ManageCustomComponentActivity.class)), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_list, "Event manager", "Manage your own events", openSettingsActivity(SettingsActivity.EVENTS_MANAGER_FRAGMENT), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_box, "Local library manager", "Manage and download local libraries", new ActivityLauncher(new Intent(getApplicationContext(), ManageLocalLibraryActivity.class), new Pair<>("sc_id", "system")), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_settings_applications, "Mod settings", "Change general mod settings", new ActivityLauncher(new Intent(getApplicationContext(), ConfigActivity.class)), false)); preferences.add(createPreference(R.drawable.ic_mtrl_palette, getString(R.string.settings_appearance), getString(R.string.settings_appearance_description), openSettingsActivity(SettingsActivity.SETTINGS_APPEARANCE_FRAGMENT), false)); - preferences.add(createPreference(R.mipmap.ic_type_folder, "Open working directory", "Open Sketchware Pro's directory and edit files in it", v -> openWorkingDirectory(), false)); - preferences.add(createPreference(R.drawable.ic_apk_color_96dp, "Sign an APK file with testkey", "Sign an already existing APK file with testkey and signature schemes up to V4", v -> signApkFileDialog(), false)); - preferences.add(createPreference(R.drawable.icons8_app_components, getString(R.string.design_drawer_menu_title_logcat_reader), getString(R.string.design_drawer_menu_subtitle_logcat_reader), new ActivityLauncher(new Intent(getApplicationContext(), LogReaderActivity.class)), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_folder, "Open working directory", "Open Sketchware Pro's directory and edit files in it", v -> openWorkingDirectory(), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_apk_document, "Sign an APK file with testkey", "Sign an already existing APK file with testkey and signature schemes up to V4", v -> signApkFileDialog(), false)); + preferences.add(createPreference(R.drawable.ic_mtrl_article, getString(R.string.design_drawer_menu_title_logcat_reader), getString(R.string.design_drawer_menu_subtitle_logcat_reader), new ActivityLauncher(new Intent(getApplicationContext(), LogReaderActivity.class)), false)); preferences.add(createPreference(R.drawable.ic_mtrl_settings, getString(R.string.main_drawer_title_system_settings), "Auto-save and vibrations", new ActivityLauncher(new Intent(getApplicationContext(), SystemSettingActivity.class)), true)); preferences.forEach(preference -> { final int index = preferences.indexOf(preference); diff --git a/app/src/main/java/mod/hilal/saif/events/EventsHandler.java b/app/src/main/java/mod/hilal/saif/events/EventsHandler.java index 54d741dc1b..0e3194ba7d 100644 --- a/app/src/main/java/mod/hilal/saif/events/EventsHandler.java +++ b/app/src/main/java/mod/hilal/saif/events/EventsHandler.java @@ -218,13 +218,13 @@ public static int getIcon(String name) { return switch (name) { case "Import", "onActivityResult", "initializeLogic", "onBackPressed", "onPostCreate", "onStart", "onResume", "onPause", "onStop", "onDestroy", - "onTabLayoutNewTabAdded" -> R.drawable.widget_source; - case " onLongClick" -> R.drawable.check_upload_apk_48dp; - case "onSwipeRefreshLayout" -> R.drawable.widget_swipe_refresh; - case "onPreExecute" -> R.drawable.event_on_stop_tracking_touch_48dp; - case "doInBackground" -> R.drawable.event_on_animation_start_48dp; - case "onProgressUpdate" -> R.drawable.event_on_page_started_48dp; - case "onPostExecute" -> R.drawable.event_on_progress_changed_48dp; + "onTabLayoutNewTabAdded" -> R.drawable.ic_mtrl_code; + case " onLongClick" -> R.drawable.ic_mtrl_touch_long; + case "onSwipeRefreshLayout" -> R.drawable.ic_mtrl_refresh; + case "onPreExecute" -> R.drawable.ic_mtrl_track_started; + case "doInBackground" -> R.drawable.ic_mtrl_sprint; + case "onProgressUpdate" -> R.drawable.ic_mtrl_progress; + case "onPostExecute" -> R.drawable.ic_mtrl_progress_check; default -> { for (int i = 0, cachedCustomEventsSize = cachedCustomEvents.size(); i < cachedCustomEventsSize; i++) { HashMap customEvent = cachedCustomEvents.get(i); diff --git a/app/src/main/java/mod/jbk/editor/manage/library/ExcludeBuiltInLibrariesActivity.java b/app/src/main/java/mod/jbk/editor/manage/library/ExcludeBuiltInLibrariesActivity.java index 0f367be0fb..fa91b838d9 100644 --- a/app/src/main/java/mod/jbk/editor/manage/library/ExcludeBuiltInLibrariesActivity.java +++ b/app/src/main/java/mod/jbk/editor/manage/library/ExcludeBuiltInLibrariesActivity.java @@ -263,7 +263,7 @@ public static List getExcludedLibraries(String @DrawableRes public static int getItemIcon() { - return R.drawable.ic_detail_setting_48dp; + return R.drawable.ic_mtrl_tune; } public static String getItemTitle() { diff --git a/app/src/main/java/mod/jbk/util/OldResourceIdMapper.java b/app/src/main/java/mod/jbk/util/OldResourceIdMapper.java index 1dfea845dc..f7eebee74c 100644 --- a/app/src/main/java/mod/jbk/util/OldResourceIdMapper.java +++ b/app/src/main/java/mod/jbk/util/OldResourceIdMapper.java @@ -251,7 +251,7 @@ public static int getDrawableFromOldResourceId(int oldId) { case 2131165426 -> R.drawable.circle_bg_white_outline_light_pink; case 2131165427 -> R.drawable.circle_bg_white_outline_orange; case 2131165428 -> R.drawable.circle_bg_white_outline_pink; - case 2131165429 -> R.drawable.circle_bg_white_outline_secondary; + case 2131165429 -> R.drawable.circle_bg_surface; case 2131165430 -> R.drawable.circle_help_48_blue; case 2131165431 -> R.drawable.circle_help_48_gray; case 2131165432 -> R.drawable.circle_stamp; diff --git a/app/src/main/res/drawable/circle_bg_white_outline_secondary.xml b/app/src/main/res/drawable/circle_bg_surface.xml similarity index 57% rename from app/src/main/res/drawable/circle_bg_white_outline_secondary.xml rename to app/src/main/res/drawable/circle_bg_surface.xml index 1039c35163..138656c5cc 100644 --- a/app/src/main/res/drawable/circle_bg_white_outline_secondary.xml +++ b/app/src/main/res/drawable/circle_bg_surface.xml @@ -3,8 +3,5 @@ android:shape="ring" android:thicknessRatio="2" android:useLevel="false"> - - + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_mtrl_abc_click.xml b/app/src/main/res/drawable/ic_mtrl_abc_click.xml new file mode 100644 index 0000000000..024aff152e --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_abc_click.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_add_circle.xml b/app/src/main/res/drawable/ic_mtrl_add_circle.xml new file mode 100644 index 0000000000..83990ce1f8 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_add_circle.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_admob.xml b/app/src/main/res/drawable/ic_mtrl_admob.xml index 6a4a4f6221..5c76e718a8 100644 --- a/app/src/main/res/drawable/ic_mtrl_admob.xml +++ b/app/src/main/res/drawable/ic_mtrl_admob.xml @@ -1,14 +1,14 @@ - - - - - - - + diff --git a/app/src/main/res/drawable/ic_mtrl_anim_cancel.xml b/app/src/main/res/drawable/ic_mtrl_anim_cancel.xml new file mode 100644 index 0000000000..2cea2c2127 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_anim_cancel.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_anim_end.xml b/app/src/main/res/drawable/ic_mtrl_anim_end.xml new file mode 100644 index 0000000000..02928d3f86 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_anim_end.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_bind.xml b/app/src/main/res/drawable/ic_mtrl_bind.xml new file mode 100644 index 0000000000..1aa4d90eb8 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_bind.xml @@ -0,0 +1,15 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_bluetooth_connected.xml b/app/src/main/res/drawable/ic_mtrl_bluetooth_connected.xml new file mode 100644 index 0000000000..8da22e583d --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_bluetooth_connected.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_bt_cancel.xml b/app/src/main/res/drawable/ic_mtrl_bt_cancel.xml new file mode 100644 index 0000000000..4c1cbd5cc0 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_bt_cancel.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_bt_error.xml b/app/src/main/res/drawable/ic_mtrl_bt_error.xml new file mode 100644 index 0000000000..9d8b64aab3 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_bt_error.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_bt_received.xml b/app/src/main/res/drawable/ic_mtrl_bt_received.xml new file mode 100644 index 0000000000..3331da6cf3 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_bt_received.xml @@ -0,0 +1,14 @@ + + > + + + diff --git a/app/src/main/res/drawable/ic_mtrl_bt_sent.xml b/app/src/main/res/drawable/ic_mtrl_bt_sent.xml new file mode 100644 index 0000000000..c0a8f8c5ee --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_bt_sent.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_cancel.xml b/app/src/main/res/drawable/ic_mtrl_cancel.xml new file mode 100644 index 0000000000..9c8c43cfe0 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_cancel.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_database_added.xml b/app/src/main/res/drawable/ic_mtrl_database_added.xml new file mode 100644 index 0000000000..d7c5e43316 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_database_added.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_database_edit.xml b/app/src/main/res/drawable/ic_mtrl_database_edit.xml new file mode 100644 index 0000000000..985d1d4eca --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_database_edit.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_database_moved.xml b/app/src/main/res/drawable/ic_mtrl_database_moved.xml new file mode 100644 index 0000000000..17a615b633 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_database_moved.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_database_off.xml b/app/src/main/res/drawable/ic_mtrl_database_off.xml new file mode 100644 index 0000000000..ec0467f1ef --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_database_off.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_date_changed.xml b/app/src/main/res/drawable/ic_mtrl_date_changed.xml new file mode 100644 index 0000000000..79ae52fd88 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_date_changed.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_design.xml b/app/src/main/res/drawable/ic_mtrl_design.xml new file mode 100644 index 0000000000..6e172de54b --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_design.xml @@ -0,0 +1,11 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_downloading.xml b/app/src/main/res/drawable/ic_mtrl_downloading.xml new file mode 100644 index 0000000000..105aefecb1 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_downloading.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_email_sent.xml b/app/src/main/res/drawable/ic_mtrl_email_sent.xml new file mode 100644 index 0000000000..e851724ae6 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_email_sent.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_file_picked.xml b/app/src/main/res/drawable/ic_mtrl_file_picked.xml new file mode 100644 index 0000000000..1c4c2b3eb9 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_file_picked.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_gpp_bad.xml b/app/src/main/res/drawable/ic_mtrl_gpp_bad.xml new file mode 100644 index 0000000000..334ecec542 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_gpp_bad.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_group.xml b/app/src/main/res/drawable/ic_mtrl_group.xml new file mode 100644 index 0000000000..1bb939d3ad --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_group.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_label.xml b/app/src/main/res/drawable/ic_mtrl_label.xml new file mode 100644 index 0000000000..a0d0886ce5 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_label.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_link.xml b/app/src/main/res/drawable/ic_mtrl_link.xml new file mode 100644 index 0000000000..71d4078200 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_link.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_link_check.xml b/app/src/main/res/drawable/ic_mtrl_link_check.xml new file mode 100644 index 0000000000..9779981680 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_link_check.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_link_fail.xml b/app/src/main/res/drawable/ic_mtrl_link_fail.xml new file mode 100644 index 0000000000..88523224d4 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_link_fail.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_load_failed.xml b/app/src/main/res/drawable/ic_mtrl_load_failed.xml new file mode 100644 index 0000000000..e2421516ed --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_load_failed.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_loaded.xml b/app/src/main/res/drawable/ic_mtrl_loaded.xml new file mode 100644 index 0000000000..11b29c9460 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_loaded.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_loc_click.xml b/app/src/main/res/drawable/ic_mtrl_loc_click.xml new file mode 100644 index 0000000000..878eacb611 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_loc_click.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_location_changed.xml b/app/src/main/res/drawable/ic_mtrl_location_changed.xml new file mode 100644 index 0000000000..d06b5be5b8 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_location_changed.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_map_ready.xml b/app/src/main/res/drawable/ic_mtrl_map_ready.xml new file mode 100644 index 0000000000..0ae9ed1532 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_map_ready.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_password.xml b/app/src/main/res/drawable/ic_mtrl_password.xml index 159fc63337..1f59e098fc 100644 --- a/app/src/main/res/drawable/ic_mtrl_password.xml +++ b/app/src/main/res/drawable/ic_mtrl_password.xml @@ -5,6 +5,8 @@ android:viewportHeight="960" android:tint="?attr/colorControlNormal"> + + android:pathData="M120,680L840,680Q857,680 868.5,691.5Q880,703 880,720Q880,737 868.5,748.5Q857,760 840,760L120,760Q103,760 91.5,748.5Q80,737 80,720Q80,703 91.5,691.5Q103,680 120,680ZM160,458L141,492Q135,503 123,506Q111,509 100,503Q89,497 86,485Q83,473 89,462L108,428L70,428Q57,428 48.5,419.5Q40,411 40,398Q40,385 48.5,376.5Q57,368 70,368L108,368L89,336Q83,325 86,313Q89,301 100,295Q111,289 123,292Q135,295 141,306L160,338L179,306Q185,295 197,292Q209,289 220,295Q231,301 234,313Q237,325 231,336L212,368L250,368Q263,368 271.5,376.5Q280,385 280,398Q280,411 271.5,419.5Q263,428 250,428L212,428L231,462Q237,473 234,485Q231,497 220,503Q209,509 197,506Q185,503 179,492L160,458ZM480,458L461,492Q455,503 443,506Q431,509 420,503Q409,497 406,485Q403,473 409,462L428,428L390,428Q377,428 368.5,419.5Q360,411 360,398Q360,385 368.5,376.5Q377,368 390,368L428,368L409,336Q403,325 406,313Q409,301 420,295Q431,289 443,292Q455,295 461,306L480,338L499,306Q505,295 517,292Q529,289 540,295Q551,301 554,313Q557,325 551,336L532,368L570,368Q583,368 591.5,376.5Q600,385 600,398Q600,411 591.5,419.5Q583,428 570,428L532,428L551,462Q557,473 554,485Q551,497 540,503Q529,509 517,506Q505,503 499,492L480,458ZM800,458L781,492Q775,503 763,506Q751,509 740,503Q729,497 726,485Q723,473 729,462L748,428L710,428Q697,428 688.5,419.5Q680,411 680,398Q680,385 688.5,376.5Q697,368 710,368L748,368L729,336Q723,325 726,313Q729,301 740,295Q751,289 763,292Q775,295 781,306L800,338L819,306Q825,295 837,292Q849,289 860,295Q871,301 874,313Q877,325 871,336L852,368L890,368Q903,368 911.5,376.5Q920,385 920,398Q920,411 911.5,419.5Q903,428 890,428L852,428L871,462Q877,473 874,485Q871,497 860,503Q849,509 837,506Q825,503 819,492L800,458Z" + android:fillColor="#FFFFFF"/> + diff --git a/app/src/main/res/drawable/ic_mtrl_payment.xml b/app/src/main/res/drawable/ic_mtrl_payment.xml new file mode 100644 index 0000000000..63940366c0 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_payment.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_pic_cancel.xml b/app/src/main/res/drawable/ic_mtrl_pic_cancel.xml new file mode 100644 index 0000000000..6c667d733d --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_pic_cancel.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_pic_taken.xml b/app/src/main/res/drawable/ic_mtrl_pic_taken.xml new file mode 100644 index 0000000000..fe230a64c0 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_pic_taken.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_pick_cancel.xml b/app/src/main/res/drawable/ic_mtrl_pick_cancel.xml new file mode 100644 index 0000000000..979407b70f --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_pick_cancel.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_post_added.xml b/app/src/main/res/drawable/ic_mtrl_post_added.xml new file mode 100644 index 0000000000..75b7e814b0 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_post_added.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_preview.xml b/app/src/main/res/drawable/ic_mtrl_preview.xml new file mode 100644 index 0000000000..49b02ac8a2 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_preview.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_preview_off.xml b/app/src/main/res/drawable/ic_mtrl_preview_off.xml new file mode 100644 index 0000000000..19f4d534e3 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_preview_off.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_prog_max.xml b/app/src/main/res/drawable/ic_mtrl_prog_max.xml new file mode 100644 index 0000000000..bd031df5db --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_prog_max.xml @@ -0,0 +1,17 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_prog_min.xml b/app/src/main/res/drawable/ic_mtrl_prog_min.xml index 6b86ff82d7..bf63577423 100644 --- a/app/src/main/res/drawable/ic_mtrl_prog_min.xml +++ b/app/src/main/res/drawable/ic_mtrl_prog_min.xml @@ -5,9 +5,9 @@ android:viewportHeight="960" android:tint="?attr/colorControlNormal"> diff --git a/app/src/main/res/drawable/ic_mtrl_progress_check.xml b/app/src/main/res/drawable/ic_mtrl_progress_check.xml new file mode 100644 index 0000000000..3c5a390f9a --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_progress_check.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_reset.xml b/app/src/main/res/drawable/ic_mtrl_reset.xml index dbd38d7110..3a3d88c348 100644 --- a/app/src/main/res/drawable/ic_mtrl_reset.xml +++ b/app/src/main/res/drawable/ic_mtrl_reset.xml @@ -1,10 +1,10 @@ - + android:viewportHeight="960" + android:tint="?attr/colorControlNormal"> + diff --git a/app/src/main/res/drawable/ic_mtrl_rotate.xml b/app/src/main/res/drawable/ic_mtrl_rotate.xml new file mode 100644 index 0000000000..1045b172e9 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_rotate.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_sensor.xml b/app/src/main/res/drawable/ic_mtrl_sensor.xml new file mode 100644 index 0000000000..b0e5443db7 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_sensor.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_sensor_cancel.xml b/app/src/main/res/drawable/ic_mtrl_sensor_cancel.xml new file mode 100644 index 0000000000..042afa5b42 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_sensor_cancel.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_settings_applications.xml b/app/src/main/res/drawable/ic_mtrl_settings_applications.xml new file mode 100644 index 0000000000..c45a5af785 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_settings_applications.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_signin.xml b/app/src/main/res/drawable/ic_mtrl_signin.xml new file mode 100644 index 0000000000..d071a3620b --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_signin.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_sms_check.xml b/app/src/main/res/drawable/ic_mtrl_sms_check.xml new file mode 100644 index 0000000000..95f88c1fe8 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_sms_check.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_speech.xml b/app/src/main/res/drawable/ic_mtrl_speech.xml new file mode 100644 index 0000000000..0c6603ccb4 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_speech.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_speech_cancel.xml b/app/src/main/res/drawable/ic_mtrl_speech_cancel.xml new file mode 100644 index 0000000000..c69262dcb3 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_speech_cancel.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_sprint.xml b/app/src/main/res/drawable/ic_mtrl_sprint.xml new file mode 100644 index 0000000000..755cc6d7c4 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_sprint.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_target.xml b/app/src/main/res/drawable/ic_mtrl_target.xml new file mode 100644 index 0000000000..a094e36f6c --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_target.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_text_change.xml b/app/src/main/res/drawable/ic_mtrl_text_change.xml new file mode 100644 index 0000000000..fa4306f74e --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_text_change.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_text_select.xml b/app/src/main/res/drawable/ic_mtrl_text_select.xml new file mode 100644 index 0000000000..b69db51ca4 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_text_select.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_touch_long.xml b/app/src/main/res/drawable/ic_mtrl_touch_long.xml new file mode 100644 index 0000000000..efa1eb8fb2 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_touch_long.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_track_started.xml b/app/src/main/res/drawable/ic_mtrl_track_started.xml new file mode 100644 index 0000000000..f11216822c --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_track_started.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_uploaded.xml b/app/src/main/res/drawable/ic_mtrl_uploaded.xml new file mode 100644 index 0000000000..6b0a2c8d90 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_uploaded.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_uploading.xml b/app/src/main/res/drawable/ic_mtrl_uploading.xml new file mode 100644 index 0000000000..b2bc9d187b --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_uploading.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_user_create.xml b/app/src/main/res/drawable/ic_mtrl_user_create.xml new file mode 100644 index 0000000000..3e66364faf --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_user_create.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_user_delete.xml b/app/src/main/res/drawable/ic_mtrl_user_delete.xml new file mode 100644 index 0000000000..1ee6c4f5f3 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_user_delete.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_user_edit.xml b/app/src/main/res/drawable/ic_mtrl_user_edit.xml new file mode 100644 index 0000000000..e08dd56ef9 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_user_edit.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_user_register_complete.xml b/app/src/main/res/drawable/ic_mtrl_user_register_complete.xml new file mode 100644 index 0000000000..bc79a4e135 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_user_register_complete.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_user_remove.xml b/app/src/main/res/drawable/ic_mtrl_user_remove.xml new file mode 100644 index 0000000000..ddc15889be --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_user_remove.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_verified_user.xml b/app/src/main/res/drawable/ic_mtrl_verified_user.xml new file mode 100644 index 0000000000..9c4e014650 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_verified_user.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_mtrl_vid_completed.xml b/app/src/main/res/drawable/ic_mtrl_vid_completed.xml new file mode 100644 index 0000000000..f7c6c15e66 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_vid_completed.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_vid_error.xml b/app/src/main/res/drawable/ic_mtrl_vid_error.xml new file mode 100644 index 0000000000..91deee5737 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_vid_error.xml @@ -0,0 +1,15 @@ + + + + diff --git a/app/src/main/res/drawable/ic_mtrl_vid_prepared.xml b/app/src/main/res/drawable/ic_mtrl_vid_prepared.xml new file mode 100644 index 0000000000..a1d4311301 --- /dev/null +++ b/app/src/main/res/drawable/ic_mtrl_vid_prepared.xml @@ -0,0 +1,15 @@ + + + + diff --git a/app/src/main/res/layout/event_grid_item.xml b/app/src/main/res/layout/event_grid_item.xml index e5e1045b91..25e7d89f5d 100644 --- a/app/src/main/res/layout/event_grid_item.xml +++ b/app/src/main/res/layout/event_grid_item.xml @@ -37,7 +37,8 @@ android:layout_height="12dp" android:layout_alignParentTop="true" android:layout_alignParentRight="true" - android:src="@drawable/ic_add_green_circle_24dp" /> + app:tint="?colorCoolGreen" + android:src="@drawable/ic_mtrl_add_circle" /> + android:layout_height="wrap_content" + app:tint="?colorOnError"/> \ No newline at end of file diff --git a/app/src/main/res/layout/fr_logic_list_item_component_event.xml b/app/src/main/res/layout/fr_logic_list_item_component_event.xml index 5490470648..4ef165eee9 100644 --- a/app/src/main/res/layout/fr_logic_list_item_component_event.xml +++ b/app/src/main/res/layout/fr_logic_list_item_component_event.xml @@ -2,6 +2,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="124dp" android:layout_height="90dp" + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_marginHorizontal="2dp" android:clickable="true" android:focusable="true" @@ -27,7 +28,7 @@ android:id="@+id/icon" android:layout_width="32dp" android:layout_height="32dp" - tools:src="@drawable/event_on_child_added_48dp" /> + tools:src="@drawable/ic_mtrl_database_added" /> diff --git a/app/src/main/res/layout/fr_logic_list_item_event_preview.xml b/app/src/main/res/layout/fr_logic_list_item_event_preview.xml index e2cd578f2b..82e7f78604 100644 --- a/app/src/main/res/layout/fr_logic_list_item_event_preview.xml +++ b/app/src/main/res/layout/fr_logic_list_item_event_preview.xml @@ -1,14 +1,17 @@ + android:padding="4dp"> + android:layout_width="18dp" + android:layout_height="18dp" + android:src="@drawable/ic_mtrl_database_added" + android:scaleType="fitCenter" + app:tint="?colorSecondary"/> diff --git a/app/src/main/res/layout/fr_logic_list_preview_with_event_item.xml b/app/src/main/res/layout/fr_logic_list_preview_with_event_item.xml index 981d705e5e..afb482f76c 100644 --- a/app/src/main/res/layout/fr_logic_list_preview_with_event_item.xml +++ b/app/src/main/res/layout/fr_logic_list_preview_with_event_item.xml @@ -1,5 +1,6 @@ + app:tint="?colorSecondary"/> diff --git a/app/src/main/res/layout/fragment_events_manager.xml b/app/src/main/res/layout/fragment_events_manager.xml index 2c099e4434..13c0aedfc6 100644 --- a/app/src/main/res/layout/fragment_events_manager.xml +++ b/app/src/main/res/layout/fragment_events_manager.xml @@ -63,9 +63,7 @@ android:id="@+id/activity_events_icon" android:layout_width="25dp" android:layout_height="25dp" - android:src="@drawable/ic_mtrl_code" - app:tint="?attr/colorPrimary" - android:tintMode="src_in" /> + android:src="@drawable/ic_mtrl_code" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/manage_library_admob.xml b/app/src/main/res/layout/manage_library_admob.xml index 42b1570824..4c578a00d0 100644 --- a/app/src/main/res/layout/manage_library_admob.xml +++ b/app/src/main/res/layout/manage_library_admob.xml @@ -113,7 +113,7 @@ + android:src="@drawable/ic_mtrl_web" /> + + + + + + + - - - - - + android:src="@drawable/ic_mtrl_id" /> + android:src="@drawable/ic_mtrl_id" /> + android:src="@drawable/ic_mtrl_file" /> + android:src="@drawable/ic_mtrl_devices" /> + app:tint="?colorAmber" + android:src="@drawable/ic_mtrl_warning" /> + android:src="@drawable/ic_mtrl_label" /> + android:src="@drawable/ic_mtrl_web" /> + android:src="@drawable/ic_mtrl_link" /> + android:src="@drawable/ic_mtrl_id" /> + android:src="@drawable/ic_mtrl_key" /> + android:src="@drawable/ic_mtrl_link" /> + android:src="@drawable/ic_mtrl_link" /> + android:src="@drawable/ic_mtrl_id" /> + android:src="@drawable/ic_mtrl_key" /> + android:src="@drawable/ic_mtrl_link" /> + android:src="@drawable/ic_mtrl_id" /> + android:src="@drawable/ic_mtrl_file" /> + android:src="@drawable/ic_mtrl_file" /> + android:src="@drawable/ic_mtrl_star" /> + android:src="@drawable/ic_mtrl_devices" /> + android:src="@drawable/ic_mtrl_design" /> + android:src="@drawable/ic_mtrl_link" /> + android:src="@drawable/ic_mtrl_id" /> + android:src="@drawable/ic_mtrl_key" /> + android:src="@drawable/ic_mtrl_link" /> + android:src="@drawable/ic_mtrl_map" /> + android:src="@drawable/ic_mtrl_key" /> + android:src="@drawable/ic_mtrl_delete" /> \ No newline at end of file diff --git a/app/src/main/res/layout/manage_library_setting_admob_test_device_item.xml b/app/src/main/res/layout/manage_library_setting_admob_test_device_item.xml index 8c1c09b85d..0ee4c10d8a 100644 --- a/app/src/main/res/layout/manage_library_setting_admob_test_device_item.xml +++ b/app/src/main/res/layout/manage_library_setting_admob_test_device_item.xml @@ -10,7 +10,7 @@ + android:src="@drawable/ic_mtrl_devices" /> + android:src="@drawable/ic_mtrl_delete" /> \ No newline at end of file diff --git a/app/src/main/res/layout/myprojects_item_special.xml b/app/src/main/res/layout/myprojects_item_special.xml index d05f4c3635..d5cb512ceb 100644 --- a/app/src/main/res/layout/myprojects_item_special.xml +++ b/app/src/main/res/layout/myprojects_item_special.xml @@ -19,7 +19,7 @@ android:id="@+id/iv_create_new" android:layout_width="35dp" android:layout_height="35dp" - android:src="@drawable/ic_restore_white_24dp" + android:src="@drawable/ic_mtrl_history" app:tint="?colorControlNormal" /> Date: Sun, 29 Dec 2024 22:11:52 +0700 Subject: [PATCH 08/20] fix: Can't save ViewBinding state --- .../java/mod/hey/studios/project/ProjectSettingsDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/mod/hey/studios/project/ProjectSettingsDialog.java b/app/src/main/java/mod/hey/studios/project/ProjectSettingsDialog.java index 37018d4484..ece3eb16eb 100644 --- a/app/src/main/java/mod/hey/studios/project/ProjectSettingsDialog.java +++ b/app/src/main/java/mod/hey/studios/project/ProjectSettingsDialog.java @@ -53,10 +53,10 @@ public void show() { binding.removeOldMethods.setOnClickListener(v -> binding.cbRemoveOldMethods.performClick()); binding.useNewMaterialComponentsAppTheme.setOnClickListener(v -> binding.cbUseNewMaterialComponentsAppTheme.performClick()); - binding.enableViewbinding.setTag(ProjectSettings.SETTING_ENABLE_VIEWBINDING); binding.etMinimumSdkVersion.setTag(ProjectSettings.SETTING_MINIMUM_SDK_VERSION); binding.etTargetSdkVersion.setTag(ProjectSettings.SETTING_TARGET_SDK_VERSION); binding.etApplicationClassName.setTag(ProjectSettings.SETTING_APPLICATION_CLASS); + binding.cbEnableViewbinding.setTag(ProjectSettings.SETTING_ENABLE_VIEWBINDING); binding.cbRemoveOldMethods.setTag(ProjectSettings.SETTING_DISABLE_OLD_METHODS); binding.cbUseNewMaterialComponentsAppTheme.setTag(ProjectSettings.SETTING_ENABLE_BRIDGELESS_THEMES); From 20bc9fcadda58bcac135fd64277776448e93f57d Mon Sep 17 00:00:00 2001 From: PranavPurwar Date: Mon, 30 Dec 2024 13:11:10 +0530 Subject: [PATCH 09/20] Fix Sketchware-Pro/Sketchware-Pro#1515 --- app/src/main/java/mod/pranav/viewbinding/ViewBindingBuilder.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/mod/pranav/viewbinding/ViewBindingBuilder.kt b/app/src/main/java/mod/pranav/viewbinding/ViewBindingBuilder.kt index 90c1907c61..c43361b6b9 100644 --- a/app/src/main/java/mod/pranav/viewbinding/ViewBindingBuilder.kt +++ b/app/src/main/java/mod/pranav/viewbinding/ViewBindingBuilder.kt @@ -17,7 +17,8 @@ class ViewBindingBuilder( val name = generateFileNameForLayout(layoutFile.nameWithoutExtension) val rootView = getTopLevelView(layoutFile) val parsed = parseViews(layoutFile) - val views = if (parsed.first() == rootView) parsed.drop(1) else parsed + val views = + if (parsed.isNotEmpty() && parsed.first() == rootView) parsed.drop(1) else parsed val file = File(outputDir, "$name.java") From 478eec66d0327590f23aa27a79f5440458ea7bbb Mon Sep 17 00:00:00 2001 From: PranavPurwar Date: Mon, 30 Dec 2024 14:14:48 +0530 Subject: [PATCH 10/20] Improve AppSettings and project list design --- .../saif/activities/tools/AppSettings.java | 41 +++++++------------ .../fragments/projects/ProjectsFragment.java | 11 +---- .../res/layout/manage_library_base_item.xml | 16 ++++---- app/src/main/res/layout/myprojects_item.xml | 6 +-- .../res/layout/prefences_content_appbar.xml | 20 +++------ app/src/main/res/menu/design_bottom_menu.xml | 2 +- 6 files changed, 32 insertions(+), 64 deletions(-) diff --git a/app/src/main/java/mod/hilal/saif/activities/tools/AppSettings.java b/app/src/main/java/mod/hilal/saif/activities/tools/AppSettings.java index ec0cef9053..75df57e582 100644 --- a/app/src/main/java/mod/hilal/saif/activities/tools/AppSettings.java +++ b/app/src/main/java/mod/hilal/saif/activities/tools/AppSettings.java @@ -1,7 +1,6 @@ package mod.hilal.saif.activities.tools; import static com.besome.sketch.editor.view.ViewEditor.shakeView; -import static pro.sketchware.utility.SketchwareUtil.dpToPx; import android.content.Intent; import android.net.Uri; @@ -44,7 +43,6 @@ import pro.sketchware.databinding.DialogSelectApkToSignBinding; import pro.sketchware.utility.FileUtil; import pro.sketchware.utility.SketchwareUtil; -import pro.sketchware.utility.UI; public class AppSettings extends BaseAppCompatActivity { @@ -126,22 +124,18 @@ private void openWorkingDirectory() { } private void setupPreferences() { - preferences.add(createPreference(R.drawable.ic_mtrl_block, "Block manager", "Manage your own blocks to use in Logic Editor", new ActivityLauncher(new Intent(getApplicationContext(), BlocksManager.class)), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_pull_down, "Block selector menu manager", "Manage your own block selector menus", openSettingsActivity(SettingsActivity.BLOCK_SELECTOR_MANAGER_FRAGMENT), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_component, "Component manager", "Manage your own components", new ActivityLauncher(new Intent(getApplicationContext(), ManageCustomComponentActivity.class)), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_list, "Event manager", "Manage your own events", openSettingsActivity(SettingsActivity.EVENTS_MANAGER_FRAGMENT), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_box, "Local library manager", "Manage and download local libraries", new ActivityLauncher(new Intent(getApplicationContext(), ManageLocalLibraryActivity.class), new Pair<>("sc_id", "system")), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_settings_applications, "Mod settings", "Change general mod settings", new ActivityLauncher(new Intent(getApplicationContext(), ConfigActivity.class)), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_palette, getString(R.string.settings_appearance), getString(R.string.settings_appearance_description), openSettingsActivity(SettingsActivity.SETTINGS_APPEARANCE_FRAGMENT), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_folder, "Open working directory", "Open Sketchware Pro's directory and edit files in it", v -> openWorkingDirectory(), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_apk_document, "Sign an APK file with testkey", "Sign an already existing APK file with testkey and signature schemes up to V4", v -> signApkFileDialog(), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_article, getString(R.string.design_drawer_menu_title_logcat_reader), getString(R.string.design_drawer_menu_subtitle_logcat_reader), new ActivityLauncher(new Intent(getApplicationContext(), LogReaderActivity.class)), false)); - preferences.add(createPreference(R.drawable.ic_mtrl_settings, getString(R.string.main_drawer_title_system_settings), "Auto-save and vibrations", new ActivityLauncher(new Intent(getApplicationContext(), SystemSettingActivity.class)), true)); - preferences.forEach(preference -> { - final int index = preferences.indexOf(preference); - preference.container.setBackgroundResource(UI.getShapedBackgroundForList(preferences, index)); - content.addView(preference); - }); + preferences.add(createPreference(R.drawable.ic_mtrl_block, "Block manager", "Manage your own blocks to use in Logic Editor", new ActivityLauncher(new Intent(getApplicationContext(), BlocksManager.class)))); + preferences.add(createPreference(R.drawable.ic_mtrl_pull_down, "Block selector menu manager", "Manage your own block selector menus", openSettingsActivity(SettingsActivity.BLOCK_SELECTOR_MANAGER_FRAGMENT))); + preferences.add(createPreference(R.drawable.ic_mtrl_component, "Component manager", "Manage your own components", new ActivityLauncher(new Intent(getApplicationContext(), ManageCustomComponentActivity.class)))); + preferences.add(createPreference(R.drawable.ic_mtrl_list, "Event manager", "Manage your own events", openSettingsActivity(SettingsActivity.EVENTS_MANAGER_FRAGMENT))); + preferences.add(createPreference(R.drawable.ic_mtrl_box, "Local library manager", "Manage and download local libraries", new ActivityLauncher(new Intent(getApplicationContext(), ManageLocalLibraryActivity.class), new Pair<>("sc_id", "system")))); + preferences.add(createPreference(R.drawable.ic_mtrl_settings_applications, "Mod settings", "Change general mod settings", new ActivityLauncher(new Intent(getApplicationContext(), ConfigActivity.class)))); + preferences.add(createPreference(R.drawable.ic_mtrl_palette, getString(R.string.settings_appearance), getString(R.string.settings_appearance_description), openSettingsActivity(SettingsActivity.SETTINGS_APPEARANCE_FRAGMENT))); + preferences.add(createPreference(R.drawable.ic_mtrl_folder, "Open working directory", "Open Sketchware Pro's directory and edit files in it", v -> openWorkingDirectory())); + preferences.add(createPreference(R.drawable.ic_mtrl_apk_document, "Sign an APK file with testkey", "Sign an already existing APK file with testkey and signature schemes up to V4", v -> signApkFileDialog())); + preferences.add(createPreference(R.drawable.ic_mtrl_article, getString(R.string.design_drawer_menu_title_logcat_reader), getString(R.string.design_drawer_menu_subtitle_logcat_reader), new ActivityLauncher(new Intent(getApplicationContext(), LogReaderActivity.class)))); + preferences.add(createPreference(R.drawable.ic_mtrl_settings, getString(R.string.main_drawer_title_system_settings), "Auto-save and vibrations", new ActivityLauncher(new Intent(getApplicationContext(), SystemSettingActivity.class)))); + preferences.forEach(preference -> content.addView(preference)); } private View.OnClickListener openSettingsActivity(String fragmentTag) { @@ -152,20 +146,13 @@ private View.OnClickListener openSettingsActivity(String fragmentTag) { }; } - private LibraryItemView createPreference(int icon, String title, String desc, View.OnClickListener listener, boolean lastpreference) { + private LibraryItemView createPreference(int icon, String title, String desc, View.OnClickListener listener) { LibraryItemView preference = new LibraryItemView(this); preference.enabled.setVisibility(View.GONE); preference.icon.setImageResource(icon); preference.title.setText(title); preference.description.setText(desc); preference.setOnClickListener(listener); - LinearLayout.LayoutParams preferenceParams = new LinearLayout.LayoutParams( - LinearLayout.LayoutParams.MATCH_PARENT, - LinearLayout.LayoutParams.WRAP_CONTENT, - 0.0f - ); - preferenceParams.bottomMargin = lastpreference ? dpToPx(25) : dpToPx(0); - preference.setLayoutParams(preferenceParams); return preference; } @@ -272,7 +259,7 @@ public void run() { } runOnUiThread(() -> { - if (callback.errorCount.get() == 0) { + if (ApkSigner.LogCallback.errorCount.get() == 0) { building_dialog.dismiss(); SketchwareUtil.toast("Successfully saved signed APK to: /Internal storage/sketchware/signed_apk/" + Uri.fromFile(new File(outputApkPath)).getLastPathSegment(), diff --git a/app/src/main/java/pro/sketchware/activities/main/fragments/projects/ProjectsFragment.java b/app/src/main/java/pro/sketchware/activities/main/fragments/projects/ProjectsFragment.java index 222a426366..a817680e41 100644 --- a/app/src/main/java/pro/sketchware/activities/main/fragments/projects/ProjectsFragment.java +++ b/app/src/main/java/pro/sketchware/activities/main/fragments/projects/ProjectsFragment.java @@ -50,7 +50,7 @@ import pro.sketchware.databinding.MyprojectsBinding; import pro.sketchware.databinding.SortProjectDialogBinding; -public class ProjectsFragment extends DA implements View.OnClickListener { +public class ProjectsFragment extends DA { private MyprojectsBinding binding; private ProjectsAdapter projectsAdapter; private DB preference; @@ -101,13 +101,6 @@ public void restoreProject() { new BackupRestoreManager(getActivity(), this).restore(); } - @Override - public void onClick(View v) { - if (v.getId() == R.id.create_new_project) { - toProjectSettingsActivity(); - } - } - @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) { binding = MyprojectsBinding.inflate(inflater, parent, false); @@ -125,7 +118,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat preference = new DB(requireContext(), "project"); ExtendedFloatingActionButton fab = requireActivity().findViewById(R.id.create_new_project); - fab.setOnClickListener(this); + fab.setOnClickListener((v) -> toProjectSettingsActivity()); Insetter.builder() .margin(WindowInsetsCompat.Type.navigationBars()) .applyToView(fab); diff --git a/app/src/main/res/layout/manage_library_base_item.xml b/app/src/main/res/layout/manage_library_base_item.xml index 9fc6593b4c..7b93d093ff 100644 --- a/app/src/main/res/layout/manage_library_base_item.xml +++ b/app/src/main/res/layout/manage_library_base_item.xml @@ -3,35 +3,33 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginEnd="16dp" - android:layout_marginStart="16dp" + android:layout_marginHorizontal="12dp" android:layout_marginTop="10dp" android:clickable="true" app:cardBackgroundColor="@color/transparent" - app:cardCornerRadius="22dp" + app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Large" app:strokeWidth="0dp"> + android:paddingVertical="8dp"> + android:layout_height="28dp" + app:tint="?attr/colorPrimary" /> + app:strokeWidth="0dp"> + app:strokeWidth="0dp"> - - - - - - \ No newline at end of file + + diff --git a/app/src/main/res/menu/design_bottom_menu.xml b/app/src/main/res/menu/design_bottom_menu.xml index ed0cc6d1d7..3a9f49951a 100644 --- a/app/src/main/res/menu/design_bottom_menu.xml +++ b/app/src/main/res/menu/design_bottom_menu.xml @@ -7,7 +7,7 @@ android:orderInCategory="110" android:title="Run" app:iconTint="?attr/colorPrimary" - app:showAsAction="always" /> + app:showAsAction="always|withText" /> Date: Mon, 30 Dec 2024 14:25:17 +0530 Subject: [PATCH 11/20] Improve UI in My Projects - Changed project item card style to use Material 3 corner shape. - Removed card stroke. - Moved project sort button to app bar and added an icon. --- app/src/main/res/layout/myprojects_item.xml | 2 +- app/src/main/res/layout/myprojects_item_special.xml | 4 ++-- app/src/main/res/menu/projects_fragment_menu.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/myprojects_item.xml b/app/src/main/res/layout/myprojects_item.xml index a04d29b3e4..76abd7ec6d 100644 --- a/app/src/main/res/layout/myprojects_item.xml +++ b/app/src/main/res/layout/myprojects_item.xml @@ -8,7 +8,7 @@ android:layout_marginBottom="10dp" android:clickable="true" android:focusable="true" - app:cardCornerRadius="18dp" + app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Medium" app:strokeWidth="0dp"> + app:shapeAppearanceOverlay="@style/ShapeAppearance.Material3.Corner.Medium" + app:strokeWidth="0dp"> + android:icon="@drawable/ic_mtrl_sort" + app:showAsAction="always" /> From 17536935096d772a1c2fef3948af344085cd2324 Mon Sep 17 00:00:00 2001 From: PranavPurwar Date: Mon, 30 Dec 2024 15:51:59 +0530 Subject: [PATCH 12/20] Improve UI in program information Updated the layout of the program information screen, improving the visual appeal and information hierarchy. - Changed the text appearance of program info items to `textAppearanceTitleMedium` for better readability. - Updated the two-line program info item to use `textAppearanceTitleMedium` for the title and `textAppearanceBodyMedium` for the description. - Removed the copyright text view and added Material 3 styling to the buttons. - Rearranged the layout elements to improve the overall structure. --- app/src/main/res/layout/program_info.xml | 19 ++++--------------- app/src/main/res/layout/program_info_item.xml | 2 +- .../res/layout/program_info_two_line_item.xml | 4 ++-- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/app/src/main/res/layout/program_info.xml b/app/src/main/res/layout/program_info.xml index 1052790b97..50ba32d303 100644 --- a/app/src/main/res/layout/program_info.xml +++ b/app/src/main/res/layout/program_info.xml @@ -48,20 +48,8 @@ app:layout_constraintTop_toBottomOf="@id/app_name" tools:text="Version 1.0.0" /> - -