Giter Site home page Giter Site logo

annotation_loadimage's Introduction

#项目说明 ##编写粗糙的图片框架 -利用的是HttpURLConnection,后面会优化

使用Android的Paint画出不同的图形,加深对canvas和path的理解

-画了个篮球

使用属性动画,熟悉动画效果

  • 点击篮球可以运动

了解元注解的各个注解的使用

  • 利用@Documented生成了doc文件夹中的文件,使用浏览器打开index.html就有相关说明

运行时获取注解信息并更改

  • 反射,运行时动态获取注解信息, 知道这里怎么做的,那就知道retrofit是怎么使用注解的

简单的装饰模式

  • RedShapeDecorator

使用APT注解处理器,生成工厂类,工厂模式

  • 根据网上的提供注解处理器的方法完成注解处理器,但是遇到一个问题,就是项目的gradle升级后注解处理器不生效了,生成不了factory类
  • 经过多次尝试,根据Android studio的提示,将factorylib这个java-library的module下的build.gradle中的'com.google.auto.service:auto-service:1.0-rc4'前的引用变为annotationProcessor
  • 但是这样一来发现代码中找不到AutoService注解类了,于是我又加上了一个implementation 'com.google.auto.service:auto-service:1.0-rc4',误打误撞就这么好了
  • 生成的factory类在app/build/intermediates/javac这个文件夹下面

用gradle插件实现ASM插桩

  • 使用groovy实现gradle插件

annotation_loadimage's People

Watchers

James Cloos avatar tom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.