Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#7 #342 提交实验7 通过拍照或相册获取图片实现用户头像更换 #1621

Merged
merged 1 commit into from
Apr 26, 2019

Conversation

Walk-With-Wind
Copy link
Contributor

该功能作为“个人中心”其中的头像更换:
由于android版本的提高,现在实现相机功能需要在AndroidManifest.xml里面声明权限还要配置provider
遇到问题的总结:
1.AndroidManifest.xml里的android:authorities要和HeadActivity.java里的FileProvider.getUriForFile一样
2.要声明相机权限和sd卡权限

运行截图:
1.点击第一个button控件:
image
2.选择拍照启动系统照相机:
image
3.拍完启动截图功能:
image
4.imageview控件图片更改:
image
5.再次点击第一个button,选择相册获取:
image
6.选择图片:
image
7.进行截图:
image
8.截图完成imageview控件再次更改图片:
image

@zengsn zengsn merged commit b7a4fee into hzuapps:master Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants