litho
7,808
Stars
769
Forks
179
Watchers
117
Open Issues
Apache-2.0
许可证
Kotlin
语言
2017-01-27
创建时间
2026-11-12
最近更新
项目能做什么
Meta 推出的用于在 Android 上构建高效 UI 的声明式框架。
来源:基于仓库元数据
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Litho [](https://github.com/facebook/litho/actions/workflows/ci.yml) [](https://bintray.com/facebook/maven/com.facebook.litho%3Alitho-core/_latestVersion) [](https://gitter.im/facebook/litho?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://github.com/facebook/litho/blob/master/LICENSE)
<img src="website/static/logo.png" width=150 align=right>
Litho is a declarative framework for building efficient UIs on Android.
* **Declarative:** Litho uses a declarative API to define UI components. You simply describe the layout for your UI based on a set of immutable inputs and the framework takes care of the rest.
* **Asynchronous layout:** Litho can measure and layout your UI ahead of time without blocking the UI thread.
* **View flattening:** Litho uses [Yoga](https://www.yogalayout.dev/) for layout and automatically reduces the number of ViewGroups that your UI contains.
* **Fine-grained recycling:** Any component such as a text or image can be recycled and reused anywhere in the UI.
To get started, check out these links:
* [Learn how to use Litho in your project.](http://fblitho.com/docs/getting-started)
* [Get started with our tutorial.](http://fblitho.com/docs/tutorial)
* [Read more about Litho in our docs.](http://fblitho.com/docs/intro)
## Installation
Litho can be integrated either in Gradle or Buck projects. Read our [Getting Started](http://fblitho.com/docs/getting-started) guide for installation instructions.
## Quick start
### 1. Initialize `SoLoader` in your `Application` class.
```java
public class SampleApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, false);
}
}
```
### 2. Create and display a component in your Activity
```java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ComponentContext c = new ComponentContext(this);
final Component component = Text.create(c)
.text("Hello World")
.textSizeDip(50)
.build();
setContentView(LithoView.create(c, component));
}
```
## Run sample
You can find more examples in our [sample app](https://github.com/facebook/litho/tree/master/sample).
To build and run (on an attached device/emulator) the sample app, execute
$ buck fetch sample
$ buck install -r sample
or, if you prefer Gradle,
$ ./gradlew :sample:installDebug
## Contributing
Before contributing to Litho, please first read the [Code of
Conduct](https://code.facebook.com/codeofconduct) that we expect
project participants to
阅读完整原文
项目深度分析 规则生成(AI 未配置)
综合评分 43.3 分。该项目在“个人可实施性”维度得 40 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。
面向细分需求的二次开发产品
| 产品构想 | 基于 litho 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。 |
| 目标用户 | 该细分场景用户 |
| 难度/周期 | 中 · 2~6 周 |
| 收费模式 | 买断制 / 订阅制 / 广告 |
| 竞争风险 | 细分需求规模需验证 |
| 依据 | AI 推测:基于项目主题标签的判断 |
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| lithops-cloud/lithops | 中文介绍暂未生成 A multi-cloud framework for big data analytics and embarrass |
372 | Python |
| lithos-ai/lithos-metal | 中文介绍暂未生成 lithos-metal: high-performance LLM inference kernels and ser |
341 | Python |
| TorchOPC/TorchLitho | 中文介绍暂未生成 Differentiable Computational Lithogrpahy Framework |
243 | Python |
| mahmoud/lithoxyl | 中文介绍暂未生成 Application instrumentation and logging, with a geological b |
146 | Python |
| shelljane/lithobench | 中文介绍暂未生成 LithoBench: Benchmarking AI Computational Lithography for Se |
144 | Python |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 2017-01-27,近 30 天仍在推送,发布过 54 个 Release |
| 社区活跃 | Star 7,808 / Fork 769 / Issue 117(数据支持,可自行核实) |
| 许可证 | Apache-2.0 |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。