Comments (10)
继承ImageMedia或者BaseMedia,如果你需要从数据库里读更多字段只能修改源码,如果是其他属性的可以选择组合方法把ImageMedia作为一个属性。
from boxing.
我的实体Entity继承了ImageMedia或者BaseMedia,传给withIntent,选完图片以后,在回调中返回Boxing.getResult(data); 这个值得类型是ArrayList;并不是我自己的ArrayList,不知道这个咋整?求指导
from boxing.
噢 这样不行的。因为在查数据库的时候实体类就已经构造好了,跟你外面传什么进去无关。只能改源码了。
你想加什么字段呢?
from boxing.
项目中原本图片相关实体里头有上传状态之类的标记字段,改造的时候,遇到了问题
from boxing.
这个字段可以不加在imagemedia里,你可以用组合的方法,把两个东西放到一个新类里面。实在不行的话只能改源码了。
from boxing.
修改源码的话,就是往imagemedia中添加字段吗?
from boxing.
可以 但是因为图片选择的过程并没有对你添加的字段进行修改,所以我觉得没什么必要。
from boxing.
那就是我用组合的方法,将imagemedia作为一个属性,那我给withIntent传值的时候,应该传我新建的类还是imagemedia?
from boxing.
withIntent方法的imagemedia参数是当你有已选图片的情况下才传的。
你直接传imagemedia就行了。
from boxing.
好的 ,谢谢
from boxing.
Related Issues (20)
- Android resource linking failed HOT 2
- Video need camera not work. How to solve this problem
- Android Q SQLiteException HOT 6
- 图片预览闪退,报方法找不到 HOT 1
- Why not support setIntent(Intnet intent) method to turn to select(UI Activity)?
- 在选择图片页面新功能需求
- Android 10 crash HOT 7
- implementation 'com.bilibili:boxing-impl:1.0.4' 报错 HOT 1
- 模拟器点击图片选择闪退 HOT 3
- 可以合并下修复android10上面的bug的分支吗
- Android Q SQLiteException HOT 7
- Android 10 crash #临时解决方案 HOT 8
- Weak Cryptographic Hash
- Unused Field
- Android 10 crash的问题不准备解决了吗? HOT 2
- Android 11也报错了 HOT 1
- .
- 关于崩溃和适配的问题,可以看这里 HOT 2
- 图片多选问题
- 请问如何支持圆形裁剪 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxing.