Neo-Wellbeing 开源项目教程

Neo-Wellbeing 开源项目教程

Neo-WellbeingOpen source "Digital Wellbeing" replacement at alpha stage. Work in progress, will eat your cat.项目地址:https://gitcode.com/gh_mirrors/ne/Neo-Wellbeing

1. 项目的目录结构及介绍

Neo-Wellbeing 项目的目录结构如下:

Neo-Wellbeing/
├── app/
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/
│   │   │   │   └── com/
│   │   │   │       └── neoapplications/
│   │   │   │           └── neo_wellbeing/
│   │   │   │               ├── MainActivity.kt
│   │   │   │               └── ...
│   │   │   ├── res/
│   │   │   │   ├── layout/
│   │   │   │   │   └── activity_main.xml
│   │   │   │   └── ...
│   │   │   └── AndroidManifest.xml
│   │   └── ...
│   └── build.gradle.kts
├── framework/
│   ├── src/
│   │   └── ...
│   └── build.gradle.kts
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── shared/
│   ├── src/
│   │   └── ...
│   └── build.gradle.kts
├── .gitignore
├── LICENSE
├── README.md
├── build.gradle.kts
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle.kts

目录结构介绍

  • app/: 包含应用程序的主要代码和资源。
    • src/main/java/com/neoapplications/neo_wellbeing/: 包含主要的 Kotlin 源代码文件。
    • src/main/res/: 包含应用程序的资源文件,如布局、字符串、图片等。
    • src/main/AndroidManifest.xml: 应用程序的清单文件,定义了应用的基本属性和组件。
  • framework/: 可能包含应用程序使用的框架代码。
  • gradle/wrapper/: 包含 Gradle 包装器的文件,用于确保项目使用特定版本的 Gradle。
  • shared/: 可能包含多个模块共享的代码或资源。
  • .gitignore: 定义了 Git 版本控制系统忽略的文件和目录。
  • LICENSE: 项目的许可证文件。
  • README.md: 项目的说明文档。
  • build.gradle.kts: 项目的构建脚本。
  • gradle.properties: Gradle 构建系统的属性配置文件。
  • gradlewgradlew.bat: Gradle 包装器的脚本文件,用于在不同操作系统上运行 Gradle。
  • settings.gradle.kts: 定义了项目的模块和仓库设置。

2. 项目的启动文件介绍

项目的启动文件是 app/src/main/java/com/neoapplications/neo_wellbeing/MainActivity.kt。这个文件是应用程序的主活动,负责启动应用程序并加载初始界面。

package com.neoapplications.neo_wellbeing

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.neoapplications.neo_wellbeing.ui.theme.NeoWellbeingTheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            NeoWellbeingTheme {
                MainScreen()
            }
        }
    }
}

@Composable
fun MainScreen() {
    // 主屏幕的 UI 组件
}

@Preview
@Composable
fun PreviewMainScreen() {
    NeoWellbeingTheme {
        MainScreen()
    }
}

启动文件介绍

  • MainActivity.kt: 定义了应用程序的主活动 MainActivity,继承自 ComponentActivity
  • onCreate 方法: 在活动创建时调用,设置内容视图并加载主屏幕。
  • MainScreen 函数: 定义了主屏幕的 UI 组件。
  • PreviewMainScreen 函数: 用于预览主屏幕的 UI 组件。

3. 项目的配置文件介绍

项目的配置文件主要包括 build.gradle.kts

Neo-WellbeingOpen source "Digital Wellbeing" replacement at alpha stage. Work in progress, will eat your cat.项目地址:https://gitcode.com/gh_mirrors/ne/Neo-Wellbeing

润色:In the recent years, the world is constantly stricken by various terrifying natural or man-made disasters, all of which calls on our attention to the global sustainable development, defined as the overall coordinating development of nature, society and economy, to meet the current needs without at the cost of the future.\\ Back in 2015, UN Assembly has stipulated the 2030 Agenda for Sustainable Development to address the problem including 17 goals which can be further classified into 5 categories: \textbf{fundamental necessities pursuit} (GOAL 1, 2), \textbf{sustainable social development} (GOAL 3, 4, 5, 6, 7), \textbf{sustainable economic development} (GOAL 8, 9, 10, 11, 12),\textbf{ sustainable ecological development} (GOAL 13, 14, 15) and \textbf{human symbiont pursuit} (GOAL 16, 17). In the article, we mainly discuss the relationships between the SDGs, the priority ranking of SDGs, base on which future implications are given including predicted blue print, ideal achievements and potential goals. Finally the influence of external factors on the structure is researched. In consideration of the priority of each SDG, the point weight is given to each SDG itself, and the edge weight is given to the degree of correlation between SDGs (that is, the degree of influence), to represent the degree of contribution of each SDG to the human-wellbeing. By final calculation, Goal 5,2,1 rank the top3.\\ In future implication, the sliding window model is employed. The predicted blue-print in 10 years is given qualitively and quantitively, and for the ideal achievements we find that fundamental necessities pursuit has a huge impact on the other goals, while human symbiont pursuit influence gradually and sustainable economic development has a general impact too.
02-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

费念念Ross

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值