Skip to content

Commit

Permalink
Improve touch UI and toast pop ups (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjyong authored Dec 6, 2024
1 parent 7f7d09a commit fc3a271
Show file tree
Hide file tree
Showing 82 changed files with 289 additions and 10,782 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
rm -rf plugins
cordova platform add android --verbose &&
cordova plugin add cordova-custom-config &&
cordova plugin add cordova-plugin-x-toast &&
cordova plugin add cordova-plugin-screen-pinning --verbose &&
cordova build android --release -- --keystore=/workspace/src/upload-keystore.jks --storePassword=$KEYSTORE_PASSWORD --alias=uploadkey --password=$ALIAS_PASSWORD --packageType=apk
apksigner sign --ks /workspace/src/upload-keystore.jks \
Expand Down Expand Up @@ -76,7 +75,6 @@ jobs:
rm -rf plugins
cordova platform add android --verbose &&
cordova plugin add cordova-custom-config &&
cordova plugin add cordova-plugin-x-toast &&
cordova plugin add cordova-plugin-screen-pinning --verbose &&
cordova build android --release -- --keystore=/workspace/src/upload-keystore.jks --storePassword=$KEYSTORE_PASSWORD --alias=uploadkey --password=$ALIAS_PASSWORD --packageType=bundle"
env:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# BabbyPaint

<img width="242" alt="logo" src="https://github.com/user-attachments/assets/180a2ee3-9c03-4cf4-8b18-4b78cac6258d">
<img width="242" alt="screenshot_of_app" src="https://github.com/user-attachments/assets/df7dc7b5-bfa2-46c9-84a3-d519d4de7d77">
<img width="242" alt="lockexample" src="https://github.com/user-attachments/assets/b3e2af45-ee3a-43de-bd38-ddcd7650cdf2">

Simple little paint application for kids.
[<img src="https://f-droid.org/badge/get-it-on.png"
Expand Down
4 changes: 4 additions & 0 deletions metadata/en-US/changelogs/00006.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Version 0.0.6 release!

* Improved the UI. Users can now use the canvas while touching another part of the screen.
* Updated toast appearance.
Binary file modified metadata/en-US/images/phoneScreenshots/lockexample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="dev.alexjyong.babbypaint" version="0.0.5"
<widget id="dev.alexjyong.babbypaint" version="0.0.6"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">
Expand Down
25 changes: 6 additions & 19 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dev.alexjyong.babbypaint",
"displayName": "BabbyPaint",
"version": "0.0.5",
"version": "0.0.6",
"description": "A simple paint app for kids",
"main": "index.js",
"scripts": {
Expand All @@ -15,13 +15,11 @@
"devDependencies": {
"cordova-android": "^13.0.0",
"cordova-custom-config": "^5.1.1",
"cordova-plugin-screen-pinning": "^1.1.3",
"cordova-plugin-x-toast": "^2.7.3"
"cordova-plugin-screen-pinning": "^1.1.3"
},
"cordova": {
"plugins": {
"cordova-plugin-screen-pinning": {},
"cordova-plugin-x-toast": {},
"cordova-custom-config": {}
},
"platforms": [
Expand Down
16 changes: 0 additions & 16 deletions src/platforms/android/android.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
{
"xml": "<feature name=\"ScreenPinning\"><param name=\"android-package\" value=\"io.fdmn.plugin.ScreenPinning\" /></feature>",
"count": 1
},
{
"xml": "<feature name=\"Toast\"><param name=\"android-package\" value=\"nl.xservices.plugins.Toast\" /></feature>",
"count": 1
}
]
}
Expand All @@ -25,9 +21,6 @@
"cordova-plugin-screen-pinning": {
"PACKAGE_NAME": "dev.alexjyong.babbypaint"
},
"cordova-plugin-x-toast": {
"PACKAGE_NAME": "dev.alexjyong.babbypaint"
},
"cordova-custom-config": {
"PACKAGE_NAME": "dev.alexjyong.babbypaint"
}
Expand All @@ -41,19 +34,10 @@
"clobbers": [
"cordova.plugins.screenPinning"
]
},
{
"id": "cordova-plugin-x-toast.Toast",
"file": "plugins/cordova-plugin-x-toast/www/Toast.js",
"pluginId": "cordova-plugin-x-toast",
"clobbers": [
"window.plugins.toast"
]
}
],
"plugin_metadata": {
"cordova-plugin-screen-pinning": "1.1.3",
"cordova-plugin-x-toast": "2.7.3",
"cordova-custom-config": "5.1.1"
}
}
2 changes: 1 addition & 1 deletion src/platforms/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="5" android:versionName="0.0.5" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:hardwareAccelerated="true" android:versionCode="6" android:versionName="0.0.6" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:exported="true" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@style/Theme.App.SplashScreen" android:windowSoftInputMode="adjustResize">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,10 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
"clobbers": [
"cordova.plugins.screenPinning"
]
},
{
"id": "cordova-plugin-x-toast.Toast",
"file": "plugins/cordova-plugin-x-toast/www/Toast.js",
"pluginId": "cordova-plugin-x-toast",
"clobbers": [
"window.plugins.toast"
]
}
];
module.exports.metadata = {
"cordova-plugin-screen-pinning": "1.1.3",
"cordova-plugin-x-toast": "2.7.3",
"cordova-custom-config": "5.1.1"
};
});
31 changes: 31 additions & 0 deletions src/platforms/android/app/src/main/assets/www/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@
box-sizing: border-box;
}

#custom-toast-container {
position: fixed;
top: 10px; /* Show at the top of the screen */
left: 50%;
transform: translateX(-50%);
z-index: 9999;
display: flex;
flex-direction: column;
align-items: center;
pointer-events: none; /* Prevent interactions */
}

.custom-toast {
background-color: #333; /* Dark background */
color: #fff; /* White text */
padding: 10px 20px;
margin-top: 10px;
border-radius: 5px;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
opacity: 0;
transform: translateY(-20px);
transition: opacity 0.3s ease, transform 0.3s ease;
pointer-events: none;
font-size: 14px;
}

.custom-toast.show {
opacity: 1;
transform: translateY(0);
}

body {
background: #F5F5F5;
font-family: sans-serif;
Expand Down
1 change: 1 addition & 0 deletions src/platforms/android/app/src/main/assets/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</head>
<body>
<div class="app-container">
<div id="custom-toast-container"></div>
<canvas id="mainCanvas"></canvas>
<div class="controls">
<ul>
Expand Down
Loading

0 comments on commit fc3a271

Please sign in to comment.