开源项目 anchoredbottomsheet 使用教程

开源项目 anchoredbottomsheet 使用教程

anchoredbottomsheetiOS Maps-like bottom sheet with anchor points and reusable view项目地址:https://gitcode.com/gh_mirrors/an/anchoredbottomsheet

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

anchoredbottomsheet/
├── app/
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       ├── main/
│       │   ├── java/
│       │   │   └── com.example.anchoredbottomsheet/
│       │   │       ├── MainActivity.java
│       │   │       └── ...
│       │   ├── res/
│       │   │   ├── layout/
│       │   │   │   ├── activity_main.xml
│       │   │   │   └── ...
│       │   │   ├── values/
│       │   │   │   ├── strings.xml
│       │   │   │   └── ...
│       │   │   └── ...
│       │   └── AndroidManifest.xml
│       └── test/
├── build.gradle
├── settings.gradle
└── ...
  • app/: 包含应用程序的主要代码和资源。
    • build.gradle: 应用程序的构建脚本。
    • proguard-rules.pro: ProGuard 规则文件。
    • src/: 源代码目录。
      • androidTest/: 用于 Android 测试的代码。
      • main/: 主要代码和资源。
        • java/: Java 源代码。
          • com.example.anchoredbottomsheet/: 主应用程序包。
            • MainActivity.java: 主活动文件。
            • ...: 其他 Java 文件。
        • res/: 资源文件。
          • layout/: 布局文件。
            • activity_main.xml: 主活动布局文件。
            • ...: 其他布局文件。
          • values/: 值资源文件。
            • strings.xml: 字符串资源文件。
            • ...: 其他值资源文件。
          • ...: 其他资源文件。
        • AndroidManifest.xml: 应用程序清单文件。
      • test/: 用于单元测试的代码。
  • build.gradle: 项目级别的构建脚本。
  • settings.gradle: 项目设置文件。
  • ...: 其他项目文件和目录。

2. 项目的启动文件介绍

  • MainActivity.java: 这是应用程序的主活动文件,负责启动应用程序并加载主界面。
package com.example.anchoredbottomsheet;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

3. 项目的配置文件介绍

  • build.gradle: 这是项目的主要构建脚本,包含项目依赖、插件和其他构建配置。
// 项目级别的 build.gradle
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.0'
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

// 应用程序级别的 build.gradle
apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    defaultConfig {
        applicationId "com.example.anchoredbottomsheet"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
}
  • AndroidManifest.xml: 这是应用程序的清单文件,包含应用程序的基本信息、权限和活动声明。
<manifest xmlns

anchoredbottomsheetiOS Maps-like bottom sheet with anchor points and reusable view项目地址:https://gitcode.com/gh_mirrors/an/anchoredbottomsheet

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

宁乐钧Gwendolyn

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

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

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

打赏作者

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

抵扣说明:

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

余额充值