android samples,Android-Learning

Jetpack Compose Samples

samples_montage.gif

This repository contains a set of individual Android Studio projects to help you learn about

Compose in Android. Each sample demonstrates different use cases, complexity levels and APIs.

For more information, please read the documentation

💻 Requirements

To try out these sample apps, you need to use the latest Canary version of Android Studio.

You can clone this repository or import the

project from Android Studio following the steps

here.

🧬 Samples

Project

0f3c13acf0ad8e1185156edf62899f1e.png

A sample blog post viewer that demonstrates the use of Compose with a typical Material app and real-world architecture.

• Medium complexity

• Varied UI

• Light & dark themes

• Resource loading

• UI Testing

3fa32659551cf92bd311c51796c078a7.png

a8851b6fe07fa9a2a3d65f0f4a7c99ed.png

A sample chat app that focuses on UI state patterns and text input.

• Low complexity

• Simple Material Design theme (Light & dark)

• Resource loading

• Back button handling

• Integration with Architecture Components: Navigation, Fragments, LiveData, ViewModel

• Animation

• UI Testing

06de07b0602b38acff87c5746783f5f1.png

8cbd1d23f099b3f83f4a56cddf3ffcd8.png

A sample survey app that showcases text input, validation and UI state management in Compose.

• Low complexity

• TextField and form validation

• Snackbar implementation

• Element reusability and styling

• Various form elements

cd9c94f9fb03cf2422ad21be377e1f0a.png

d61605f7adeeb3dcff9321c3ee47fa9b.png

Jetsnack is a sample snack ordering app built with Compose.

• Medium complexity

• Custom design system

• Custom layouts

• Animation

9b114db7a8b4da443cbd83a2e732dc2c.png

05454a0ec2441bfe7ee4bbbff3d4632e.png

A sample podcast app that features a full-featured, Redux-style architecture and showcases dynamic themes.

• Advanced sample

• Dynamic theming using podcast artwork

• Image fetching

• WindowInsets support

• Coroutines

• Local storage with Room

c663108310a3ceeaadb992b37cb0aa50.png

b5f158726177089085ab4bc8c30cb649.png

A Compose implementation of the Rally Material study, a financial app that focuses on data, charts, reusability and animations.

• Low complexity

• Material theming with a dark-only theme

• Custom layouts and reusable elements

• Charts and tables

• Animations

• Screenshot tests

71cbd902dd84fd2e41a03bfc883eb849.png

ad85cd5eaa593eecf838344a0b9d1bd3.png

A Compose implementation of the Crane Material study, a travel app that uses Material Design components and Material Theming to create a personalized, on-brand experience.

• Medium complexity

• Draggable UI elements

• Android Views inside Compose

• UI state handling

• UI Tests

663d99c48a27884efaf32bc19a52c12f.png

328eace5bb5bddea77879adf53f9123c.png

A Compose implementation of the Owl Material study. The Owl brand uses bold color, shape, and typography to express its brand attributes: energy, daring, and fun.

• Medium complexity

• Material theming & light/dark themes

• Custom layout

• Animation

90554f411c419df6c57a4158e7d73280.png

🧬 Compose in existing app samples

To see how Compose and view-based UIs can coexist and interact together, check out these samples:

License

Copyright 2020 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
List of Sample Apps The list below provides a summary of the sample applications that are available with the Android SDK. Using the links on this page, you can view the source files of the sample applications in your browser. You can also download the source of these samples into your SDK, then modify and reuse it as you need. For more information, see Getting the Samples. API Demos A variety of small applications that demonstrate an extensive collection of framework topics. Backup and Restore A simple example that illustrates a few different ways for an application to implement support for the Android data backup and restore mechanism. Bluetooth Chat An application for two-way text messaging over Bluetooth. BusinessCard An application that demonstrates how to launch the built-in contact picker from within an activity. This sample also uses reflection to ensure that the correct version of the contacts API is used, depending on which API level the application is running under. Contact Manager An application that demonstrates how to query the system contacts provider using the ContactsContract API, as well as insert contacts into a specific account. Home A home screen replacement application. JetBoy A game that demonstrates the SONiVOX JET interactive music technology, with JetPlayer. Live Wallpaper An application that demonstrates how to create a live wallpaper and bundle it in an application that users can install on their devices. Lunar Lander A classic Lunar Lander game. Multiple Resolutions A sample application that shows how to use resource directory qualifiers to provide different resources for different screen configurations. Note Pad An application for saving notes. Similar (but not identical) to the Notepad tutorial. SampleSyncAdapter Demonstrates how an application can communicate with a cloud-based service and synchronize its data with data stored locally in a content provider. The sample uses two related parts of the Android framework — the account manager and the synchronization manager (through a sync adapter). Searchable Dictionary A sample application that demonstrates Android's search framework, including how to provide search suggestions for Quick Search Box. Snake An implementation of the classic game "Snake." Soft Keyboard An example of writing an input method for a software keyboard. Spinner A simple application that serves as an application-under-test for the SpinnerTest sample application. SpinnerTest An example test application that contains test cases run against the Spinner sample application. To learn more about the application and how to run it, please read the Activity Testing tutorial. TicTacToeLib An example of an Android library project that provides a game-play Activity to any dependent application project. For an example of how an application can use the code and resources in an Android library project, see the TicTacToeMain sample application. TicTacToeMain An example of an Android application that makes use of code and resources provided in an Android library project. Specifically, this application uses code and resources provided in the TicTacToeLib library project. Wiktionary An example of creating interactive widgets for display on the Android home screen. Wiktionary (Simplified) A simple Android home screen widgets example.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值