android:attr/selectableItemBackground"android:gravity="center"android:padding="16dp"android:text="拍照"android:textColor="#000"/><Viewandroid:layout_width="match_parent"android:layout_height="0.5dp"android:background="#EEEEEE"/><TextViewandroid:id="@+id/tv_open_album"android:layout_width="matc...
/*** 更换头像** @param view*/public void changeAvatar(View view) {bottomSheetDialog = new BottomSheetDialog(this);bottomView = getLayoutInflater().inflate(R.layout.dialog_bottom, null);bottomSheetDialog.setContentView(bottomView);bottomSheetDialog.getWindow().findViewById(R.id.design_bottom_sheet)...
项目创建好之后,先想清楚你的这个功能需要什么,换头像常规肯定是上传到后台去,那么你肯定是要有网络权限的,其次如果你的网络请求地址是http开头的话,而在Android9.0及以上版本则要配置http访问许可才行,之后你是否会用到一些第三方框架,比如圆形头像,圆角头像、图片加载、动态权限请求。 二、配置项目 基于这些考虑,首...