Git Product home page Git Product logo

Comments (10)

ChenSiLiang avatar ChenSiLiang commented on June 12, 2024

继承ImageMedia或者BaseMedia,如果你需要从数据库里读更多字段只能修改源码,如果是其他属性的可以选择组合方法把ImageMedia作为一个属性。

from boxing.

weinierfei avatar weinierfei commented on June 12, 2024

我的实体Entity继承了ImageMedia或者BaseMedia,传给withIntent,选完图片以后,在回调中返回Boxing.getResult(data); 这个值得类型是ArrayList;并不是我自己的ArrayList,不知道这个咋整?求指导

from boxing.

ChenSiLiang avatar ChenSiLiang commented on June 12, 2024

噢 这样不行的。因为在查数据库的时候实体类就已经构造好了,跟你外面传什么进去无关。只能改源码了。
你想加什么字段呢?

from boxing.

weinierfei avatar weinierfei commented on June 12, 2024

项目中原本图片相关实体里头有上传状态之类的标记字段,改造的时候,遇到了问题

from boxing.

ChenSiLiang avatar ChenSiLiang commented on June 12, 2024

这个字段可以不加在imagemedia里,你可以用组合的方法,把两个东西放到一个新类里面。实在不行的话只能改源码了。

from boxing.

weinierfei avatar weinierfei commented on June 12, 2024

修改源码的话,就是往imagemedia中添加字段吗?

from boxing.

ChenSiLiang avatar ChenSiLiang commented on June 12, 2024

可以 但是因为图片选择的过程并没有对你添加的字段进行修改,所以我觉得没什么必要。

from boxing.

weinierfei avatar weinierfei commented on June 12, 2024

那就是我用组合的方法,将imagemedia作为一个属性,那我给withIntent传值的时候,应该传我新建的类还是imagemedia?

from boxing.

ChenSiLiang avatar ChenSiLiang commented on June 12, 2024

withIntent方法的imagemedia参数是当你有已选图片的情况下才传的。
你直接传imagemedia就行了。

from boxing.

weinierfei avatar weinierfei commented on June 12, 2024

好的 ,谢谢

from boxing.

Related Issues (20)

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.