EffectiveAndroidUI 项目教程

EffectiveAndroidUI 项目教程

EffectiveAndroidUISample project created to show some of the best Android practices to work in the Android UI Layer. The UI layer of this project has been implemented using MVP or MVVM (without binding engine) to show how this patterns works. This project is used during the talk "EffectiveAndroidUI".项目地址:https://gitcode.com/gh_mirrors/ef/EffectiveAndroidUI

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

EffectiveAndroidUI 项目的目录结构如下:

EffectiveAndroidUI/
├── app/
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/
│   │   │   │   ├── com/
│   │   │   │   │   ├── github/
│   │   │   │   │   │   ├── pedrovgs/
│   │   │   │   │   │   │   ├── effectiveandroidui/
│   │   │   │   │   │   │   │   ├── activity/
│   │   │   │   │   │   │   │   ├── adapter/
│   │   │   │   │   │   │   │   ├── component/
│   │   │   │   │   │   │   │   ├── fragment/
│   │   │   │   │   │   │   │   ├── interactor/
│   │   │   │   │   │   │   │   ├── module/
│   │   │   │   │   │   │   │   ├── presenter/
│   │   │   │   │   │   │   │   ├── renderer/
│   │   │   │   │   │   │   │   ├── view/
│   │   │   │   │   │   │   │   └── widget/
│   │   │   ├── res/
│   │   │   │   ├── drawable/
│   │   │   │   ├── layout/
│   │   │   │   ├── menu/
│   │   │   │   ├── mipmap/
│   │   │   │   ├── values/
│   │   │   │   └── xml/
│   │   │   └── AndroidManifest.xml
│   │   └── test/
│   │       └── java/
│   │           └── com/
│   │               └── github/
│   │                   └── pedrovgs/
│   │                       └── effectiveandroidui/
│   └── build.gradle
├── gradle/
│   └── wrapper/
├── .gitignore
├── build.gradle
├── gradle.properties
├── gradlew
├── gradlew.bat
├── LICENSE.txt
├── README.md
└── settings.gradle

目录结构介绍

  • app/: 包含应用程序的主要代码和资源文件。
    • src/: 源代码目录。
      • main/: 主代码目录。
        • java/: Java 代码目录。
          • com/github/pedrovgs/effectiveandroidui/: 主要包目录,包含各种功能模块的代码。
        • res/: 资源文件目录,包含布局、图片、字符串等资源。
        • AndroidManifest.xml: 应用程序的配置文件。
      • test/: 测试代码目录。
    • build.gradle: 应用程序的构建脚本。
  • gradle/: Gradle 包装器目录。
  • .gitignore: Git 忽略文件配置。
  • build.gradle: 项目的构建脚本。
  • gradle.properties: Gradle 属性文件。
  • gradlew: Gradle 包装器脚本(Unix)。
  • gradlew.bat: Gradle 包装器脚本(Windows)。
  • LICENSE.txt: 项目许可证文件。
  • README.md: 项目说明文件。
  • settings.gradle: 项目设置文件。

2. 项目的启动文件介绍

项目的启动文件是 app/src/main/java/com/github/pedrovgs/effectiveandroidui/activity/SplashActivity.java。这个文件是应用程序的入口点,负责启动应用程序并跳转到主界面。

SplashActivity.java

package com.github.pedrovgs.effectiveandroidui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import androidx.appcompat.app.AppCompatActivity;
import com.github.pedrovgs.effectiveandroidui.R;

public class SplashActivity extends AppCompatActivity {

    private static final long SPLASH_DISPLAY_LENGTH = 1000;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout

EffectiveAndroidUISample project created to show some of the best Android practices to work in the Android UI Layer. The UI layer of this project has been implemented using MVP or MVVM (without binding engine) to show how this patterns works. This project is used during the talk "EffectiveAndroidUI".项目地址:https://gitcode.com/gh_mirrors/ef/EffectiveAndroidUI

  • 7
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

卢颜娜

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

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

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

打赏作者

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

抵扣说明:

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

余额充值