Skip to content

Upgrade to KivyMD 1.1.1, Update build workflow, HeroAnimationScreen Fix, Updated README.md, added new presplash and favicon. #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 111 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,138 @@
name: APK build
name: Android Build

on:
push:
branches: [ main ]
branches: [ master ]
pull_request:
branches: [ main ]
branches: [ master ]
schedule:
- cron: '0 0 1,15 * *'

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# used to cache dependencies with a timeout
# Used to cache dependencies with a timeout
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
echo "date=$(date -u '+%Y%m%d')" >> $GITHUB_ENV
shell: bash

- name: Cache Buildozer global directory
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .buildozer_global
key: buildozer-global-${{ hashFiles('buildozer.spec') }} # Replace with your path
path: ~/.buildozer
key: buildozer-global-${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('buildozer.spec') }}
restore-keys: |
buildozer-global-${{ runner.os }}-

- uses: actions/cache@v2
- name: Cache Buildozer directory in app
uses: actions/cache@v4
with:
path: .buildozer
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('buildozer.spec') }}
key: ${{ runner.os }}-buildozer-${{ github.run_id }}-${{ hashFiles('buildozer.spec') }}
restore-keys: |
${{ runner.os }}-buildozer-

- name: Cache Android SDK
uses: actions/cache@v4
with:
path: ~/.buildozer/android/platform/android-sdk
key: ${{ runner.os }}-android-sdk-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-android-sdk-

- name: Cache Android NDK
uses: actions/cache@v4
with:
path: ~/.buildozer/android/platform/android-ndk-r25b
key: ${{ runner.os }}-android-ndk-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-android-ndk-

# Install dependencies
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y \
build-essential \
git \
ffmpeg \
libsdl2-dev \
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libportmidi-dev \
libswscale-dev \
libavformat-dev \
libavcodec-dev \
libunwind-dev \
zlib1g-dev
sudo apt-get install -y \
libsqlite3-dev \
sqlite3 \
bzip2 \
libbz2-dev \
zlib1g-dev \
openssl \
libgdbm-dev \
libgdbm-compat-dev \
liblzma-dev \
libreadline-dev \
uuid-dev \
libgstreamer1.0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good
sudo apt-get install -y \
zip \
unzip \
autoconf \
libtool \
pkg-config \
libncurses5-dev \
libncursesw5-dev \
libtinfo5 \
cmake \
libffi-dev \
libssl-dev \
automake

# Set up Java 17 required by Gradle
- name: Setup Java 17 required by Gradle
uses: actions/setup-java@v4
with:
distribution: 'temurin' # or 'zulu', 'liberica', etc.
java-version: '17'

# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8' #set your python version

# Install pip dependencies
- name: Install pip dependencies
run: |
pip install --upgrade pip
pip install buildozer cython==0.29.33

# Build with Buildozer
- name: Build with Buildozer
uses: ArtemSBulgakov/buildozer-action@v1
id: buildozer
with:
command: buildozer android debug
buildozer_version: master
run: |
yes | buildozer -v android debug
# yes | buildozer -v android release
# run this for generating aab (Android App Bundle) [Required by google play]

- name: Upload artifacts
uses: actions/upload-artifact@v2
# Upload artifacts
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: package
path: ${{ steps.buildozer.outputs.filename }}
path: |
bin/*.apk
bin/*.aab
65 changes: 57 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,66 @@
# KitchenSink

### Demo application of the [KivyMD](https://github.com/kivymd/KivyMD) library widgets
## A Demo application showcasing [KivyMD](https://github.com/kivymd/KivyMD) library Widgets and UI components.

[![APK build](https://github.com/kivymd/KitchenSink/actions/workflows/main.yml/badge.svg)](https://github.com/kivymd/KitchenSink/actions/workflows/main.yml)
[![APK build](https://github.com/Novfensec/KitchenSink/actions/workflows/main.yml/badge.svg)](https://github.com/Novfensec/KitchenSink/actions/workflows/main.yml)
![KivyMD](https://img.shields.io/badge/KivyMD-1.1.1-blue)
![Kivy](https://img.shields.io/badge/Kivy-2.3.0-green)

[![GitHub forks](https://img.shields.io/github/forks/kivymd/KitchenSink)](https://github.com/kivymd/KitchenSink/network/members)
[![GitHub stars](https://img.shields.io/github/stars/kivymd/KitchenSink)](https://github.com/kivymd/KitchenSink/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/kivymd/KitchenSink)](https://github.com/kivymd/KitchenSink/issues)
[![GitHub license](https://img.shields.io/github/license/kivymd/KitchenSink)](https://github.com/kivymd/KitchenSink/blob/main/LICENSE)

<p align="center">
<img
<img
width="720"
src="https://github.com/kivymd/KitchenSink/blob/main/assets/images/preview.png"
src="https://raw.githubusercontent.com/kivymd/KitchenSink/main/assets/images/preview.png"
>
</p>

These are collections of simple stylish and modern user interface design for mobile and desktop applications.
You can download the test `APK` packages of the demo application on [this](https://github.com/kivymd/KitchenSink/actions/workflows/main.yml)
page by selecting the most recent commit, download the `package` archive, unpack it and install it on your phone.
### This project is under development.
KitchenSink is a collection of modern, stylish, and practical user interface components built using the [KivyMD](https://github.com/kivymd/KivyMD) library. This demo application is designed to showcase the rich features and versatility of the KivyMD library for building elegant mobile and desktop applications.

## Features
- Interactive UI Components: A wide variety of widgets including buttons, dialogs, dropdowns, lists, and more.
- Material Design Ready: Built with Google's Material Design principles, providing a familiar and intuitive experience.
- Cross-platform Support: Designed for mobile (Android/iOS) and desktop (Windows/macOS/Linux) environments.
- Consistent Theming: Light and dark themes that are fully customizable.
- Responsive Layouts: UI adapts seamlessly to different screen sizes and resolutions.

## APK Download and Installation
You can download and install the test APK packages of the demo application by visiting the [latest GitHub Actions builds](https://github.com/kivymd/KitchenSink/actions/workflows/main.yml). Follow these steps:

- Navigate to the **latest commit** on the GitHub Actions page.
- Download the `package` archive from the build artifacts.
- Unpack the archive.
- Transfer and install the APK on your Android device.

**This application is a work in progress, and we're constantly adding new components and features. Feel free to check back regularly for updates.**

## How to Run the Project Locally
To run the KitchenSink demo locally on your development machine, follow these instructions:

- Clone the repository:

```bash
git clone https://github.com/kivymd/KitchenSink.git
cd KitchenSink
```

- Install dependencies: Ensure you have Python 3.x installed, and then install the required dependencies:

```bash
pip install -r requirements.txt
```

- Run the application:

```bash
python main.py
```

## Contributions
We welcome contributions! If you'd like to contribute to KitchenSink, feel free to open issues, submit pull requests, or suggest new features. See the [contributing guidelines](CONTRIBUTING.md) for more information.

## License
This project is licensed under the [MIT License](LICENSE). You're free to use, modify, and distribute the software as long as proper attribution is given.
1 change: 0 additions & 1 deletion View/ButtonScreen/components/twoscreen/two_screen.kv
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
size: "120dp", "120dp"
radius: self.width / 2
pos_hint: {"center_x": .5}
elevation: 1
shadow_softness: 4

AnchorLayout:
Expand Down
1 change: 0 additions & 1 deletion View/CardScreen/components/cards/basecard/base_card.kv
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<BaseCard>
size_hint: None, None
size: "160dp", "96dp"
elevation: 2
shadow_softness: 4
padding: "12dp", 0, "12dp", 0
1 change: 0 additions & 1 deletion View/FieldScreen/components/thirdscreen/third_screen.kv
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
size: "150dp", "150dp"
radius: self.height / 2
y: bg.y + dp(56)
elevation: 2
shadow_softness: 4
pos_hint: {"center_x": .5, "center_y": .85}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


<CityCard>

MDSmartTile:
id: tile
radius: [24,]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<OneScreenView>

MDBoxLayout:
orientation: "vertical"

Expand Down
4 changes: 3 additions & 1 deletion View/HeroAnimationScreen/components/onescreen/one_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def on_enter(self):

def on_tap_city_card(self, tile: MDSmartTile) -> None:
def switch_screen(*args):
self.manager.current_hero = tile.parent.tag
if self.ids :
print(self.ids)
self.manager.current_heroes = [tile.parent.tag]
self.manager.current = "hero two screen"

Clock.schedule_once(switch_screen, 0.1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from kivy.metrics import dp

from kivymd.uix.fitimage import FitImage
from kivymd.uix.screen import MDScreen

Expand All @@ -23,3 +22,4 @@ def on_enter(self):

def on_tap_button_close(self) -> None:
self.manager.current = "hero one screen"
self.ids.hero_to.tag = ""
1 change: 0 additions & 1 deletion View/ImageListScreen/components/toolbar/toolbar.kv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
height: "140dp"
md_bg_color: app.theme_cls.primary_color
radius: [0, 0, 42, 0]
elevation: 4
padding: 0, 0, "120dp", 0

RelativeLayout:
Expand Down
12 changes: 6 additions & 6 deletions View/ManagerScreen/manager_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
from kivy.lang import Builder
from kivy.uix.image import Image
from kivy.uix.modalview import ModalView
from kivy.uix.screenmanager import ScreenManager, NoTransition
from kivymd.uix.screenmanager import MDScreenManager
from kivymd.uix.transition import MDFadeSlideTransition
from kivy.utils import get_color_from_hex

from kivymd.app import MDApp
from kivymd.utils.set_bars_colors import set_bars_colors
from kivymd.color_definitions import colors

from View.screens import screens


class ManagerScreen(ScreenManager):
class ManagerScreen(MDScreenManager):
dialog_wait = None
_screen_names = []

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.app = MDApp.get_running_app()
self.transition = NoTransition()
self.transition = MDFadeSlideTransition()

def on_current(self, *args):
super().on_current(*args)
Expand Down Expand Up @@ -53,8 +53,8 @@ def set_bars_colors(self, instance_theme_cls, name_screen: str) -> None:
"navigation_icon_color": "Light",
},
"button_1": {
"status_bar_color": get_color_from_hex(colors["Green"]["800"]),
"navigation_bar_color": get_color_from_hex(colors["Green"]["800"]),
"status_bar_color": get_color_from_hex("#008000"),
"navigation_bar_color": get_color_from_hex("#008000"),
"navigation_icon_color": "Light",
},
"field": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
size_hint: 1, None
height: "200dp"
radius: 12
elevation:0
ripple_behavior: True

RelativeLayout:
Expand Down
1 change: 1 addition & 0 deletions View/MenuScreen/menu_screen.kv
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
title: "Kitchen Sink"
anchor_title: "left"
pos_hint: {"top": 1}
elevation:.8
11 changes: 5 additions & 6 deletions View/MenuScreen/menu_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

from kivymd.uix.screen import MDScreen

from View.MenuScreen.componemts import MenuCard # NOQA
from View.MenuScreen.components import MenuCard # NOQA


class MenuScreenView(MDScreen):
def on_enter(self, *args) -> None:
if not self.ids.menu_list.data:
manu_list = [
menu_list = [
"Field",
"Card",
"Button",
Expand All @@ -19,14 +19,13 @@ def on_enter(self, *args) -> None:
"Tile",
"Hero",
]
manu_list.sort()
for name_card in manu_list:
menu_list.sort()
for name_card in menu_list:
self.ids.menu_list.data.append(
{
"viewclass": "MenuCard",
"title": name_card,
"elevation": 1,
"shadow_softness": 4,
"elevation": 0,
"on_release": lambda x=name_card.lower(): self.manager.switch_screen(
x
),
Expand Down
1 change: 0 additions & 1 deletion View/NavigationrailScreen/navigationrail_screen.kv
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
id: nav_drawer
radius: (0, 16, 16, 0)
md_bg_color: rail_bg_color
elevation: 4
shadow_radius: 16, 16, 0, 0
width: "240dp"

Expand Down
Loading