个人档案-个人荣誉
This commit is contained in:
parent
a26891d145
commit
73c98e9779
@ -0,0 +1,89 @@
|
|||||||
|
package com.tenlionsoft.baselib.core.widget.base;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
|
import com.tenlionsoft.baselib.R;
|
||||||
|
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者 : Adam on 2018/11/10.
|
||||||
|
* 邮箱 : itgaojian@163.com
|
||||||
|
* 描述 : 添加图片的适配器
|
||||||
|
*/
|
||||||
|
public class AddImgGridAdapter extends BaseRecyclerAdapter<AddFileBean, AddImgGridHolder> {
|
||||||
|
public AddImgGridAdapter(Context ctx, List<AddFileBean> list) {
|
||||||
|
super(ctx, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AddImgGridHolder createHolder(ViewGroup parent, int viewType) {
|
||||||
|
View itemView = LayoutInflater.from(mContext)
|
||||||
|
.inflate(R.layout.item_grid_photo, parent, false);
|
||||||
|
return new AddImgGridHolder(itemView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindHolder(AddImgGridHolder applyServicePhotoHolder, int i) {
|
||||||
|
if (TextUtils.isEmpty(mData.get(i).getPath())) {
|
||||||
|
applyServicePhotoHolder.mIvDelete.setVisibility(View.GONE);
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(R.drawable.ic_file_add)
|
||||||
|
.into(applyServicePhotoHolder.mIvPhoto);
|
||||||
|
} else {
|
||||||
|
if (mDeleteListener != null) {
|
||||||
|
applyServicePhotoHolder.mIvDelete.setVisibility(View.VISIBLE);
|
||||||
|
applyServicePhotoHolder.mIvDelete.setOnClickListener(v -> mDeleteListener.onDelete(mData.get(i), i));
|
||||||
|
} else {
|
||||||
|
applyServicePhotoHolder.mIvDelete.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
RequestOptions options = new RequestOptions()
|
||||||
|
.transform(new GlideRoundTransform(mContext, 5))
|
||||||
|
.error(R.drawable.ic_img_load_err)
|
||||||
|
.placeholder(R.drawable.ic_img_loading);
|
||||||
|
if (mData.get(i).getFileType() == 1) {
|
||||||
|
//文档
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(R.drawable.ic_file_word)
|
||||||
|
.apply(options)
|
||||||
|
.into(applyServicePhotoHolder.mIvPhoto);
|
||||||
|
} else if (mData.get(i).getFileType() == 2) {
|
||||||
|
//图片
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(mData.get(i).getPath())
|
||||||
|
.apply(options)
|
||||||
|
.into(applyServicePhotoHolder.mIvPhoto);
|
||||||
|
} else if (mData.get(i).getFileType() == 3) {
|
||||||
|
//视频
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(R.drawable.ic_file_video)
|
||||||
|
.apply(options)
|
||||||
|
.into(applyServicePhotoHolder.mIvPhoto);
|
||||||
|
} else if (mData.get(i).getFileType() == 4) {
|
||||||
|
//音频
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(R.drawable.ic_file_audio)
|
||||||
|
.apply(options)
|
||||||
|
.into(applyServicePhotoHolder.mIvPhoto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private OnDeleteListener mDeleteListener;
|
||||||
|
|
||||||
|
public void addOnDeleteListener(OnDeleteListener listener) {
|
||||||
|
this.mDeleteListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnDeleteListener {
|
||||||
|
void onDelete(AddFileBean bean, int i);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.tenlionsoft.baselib.core.widget.base;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.tenlionsoft.baselib.R;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者 : Adam on 2018/11/10.
|
||||||
|
* 邮箱 : itgaojian@163.com
|
||||||
|
* 描述 : 维修图像
|
||||||
|
*/
|
||||||
|
public class AddImgGridHolder extends RecyclerView.ViewHolder {
|
||||||
|
public ImageView mIvPhoto;
|
||||||
|
public ImageView mIvDelete;
|
||||||
|
|
||||||
|
public AddImgGridHolder(View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
mIvPhoto = itemView.findViewById(R.id.iv_photo);
|
||||||
|
mIvDelete = itemView.findViewById(R.id.iv_delete);
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,6 @@ package com.tenlionsoft.baselib.core.widget.views;
|
|||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -81,7 +80,7 @@ public class ButtomDialogView extends Dialog {
|
|||||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
window.setAttributes(params);
|
window.setAttributes(params);
|
||||||
window.setBackgroundDrawable(new ColorDrawable());
|
window.setBackgroundDrawableResource(android.R.color.transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addOnChoseListener(OnChoseListener listener) {
|
public void addOnChoseListener(OnChoseListener listener) {
|
||||||
|
BIN
baselib/src/main/res/drawable-xhdpi/ic_honour_default.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_honour_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
5
baselib/src/main/res/drawable/sel_rectangle_btn_white_gray_border.xml
Executable file
5
baselib/src/main/res/drawable/sel_rectangle_btn_white_gray_border.xml
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@drawable/shape_rectangle_gray" android:state_pressed="true" />
|
||||||
|
<item android:drawable="@drawable/shape_rectangle_white_border" android:state_pressed="false" />
|
||||||
|
</selector>
|
16
baselib/src/main/res/drawable/shape_rectangle_white_border.xml
Executable file
16
baselib/src/main/res/drawable/shape_rectangle_white_border.xml
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<padding android:bottom="1dp" />
|
||||||
|
<solid android:color="#30EBEBEB" />
|
||||||
|
<corners android:radius="5dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="@color/white" />
|
||||||
|
<corners android:radius="5dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
@ -2,14 +2,16 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/transparent"
|
android:orientation="vertical"
|
||||||
android:orientation="vertical">
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:paddingBottom="20dp">
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_album"
|
android:id="@+id/tv_album"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
android:background="@drawable/sel_rectangle_btn_white_gray_border"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
@ -17,16 +19,12 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="@color/gray_text" />
|
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_photo"
|
android:id="@+id/tv_photo"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
android:background="@drawable/sel_rectangle_btn_white_gray_border"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
@ -34,16 +32,12 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="@color/gray_text" />
|
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_change_pwd"
|
android:id="@+id/tv_change_pwd"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
android:background="@drawable/sel_rectangle_btn_white_gray_border"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
@ -51,16 +45,12 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="@color/gray_text" />
|
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_login_out"
|
android:id="@+id/tv_login_out"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
android:background="@drawable/sel_rectangle_btn_white_gray_border"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
@ -68,17 +58,12 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="@color/gray_text" />
|
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_file"
|
android:id="@+id/tv_file"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:background="@drawable/sel_rectangle_btn_white_gray_border"
|
||||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
@ -90,6 +75,7 @@
|
|||||||
android:id="@+id/tv_cancel"
|
android:id="@+id/tv_cancel"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
android:background="@drawable/sel_rectangle_btn_white_gray"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
30
baselib/src/main/res/layout/item_grid_photo.xml
Executable file
30
baselib/src/main/res/layout/item_grid_photo.xml
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="65dp"
|
||||||
|
android:layout_margin="3dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_photo"
|
||||||
|
android:layout_width="45dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
tools:background="@drawable/ic_ctype_file" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_delete"
|
||||||
|
android:layout_width="15dp"
|
||||||
|
android:layout_height="15dp"
|
||||||
|
android:layout_marginLeft="-10dp"
|
||||||
|
android:layout_marginTop="-5dp"
|
||||||
|
android:layout_toRightOf="@id/iv_photo"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/ic_delete" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -485,6 +485,14 @@
|
|||||||
<item name="android:layout_gravity">center_vertical</item>
|
<item name="android:layout_gravity">center_vertical</item>
|
||||||
<item name="android:textSize">13sp</item>
|
<item name="android:textSize">13sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
<style name="item_title_23_ver">
|
||||||
|
<item name="android:layout_width">match_parent</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:padding">2dp</item>
|
||||||
|
<item name="android:textColor">@color/text_23</item>
|
||||||
|
<item name="android:layout_gravity">center_vertical</item>
|
||||||
|
<item name="android:textSize">13sp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="item_content_23">
|
<style name="item_content_23">
|
||||||
<item name="android:layout_width">0dp</item>
|
<item name="android:layout_width">0dp</item>
|
||||||
|
@ -0,0 +1,86 @@
|
|||||||
|
package com.tenlionsoft.oamodule.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||||
|
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||||
|
import com.tenlionsoft.oamodule.R;
|
||||||
|
import com.tenlionsoft.oamodule.beans.SaveHonourBean;
|
||||||
|
import com.tenlionsoft.oamodule.holder.HonourHolder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者: adam
|
||||||
|
* 日期: 2022/4/24 - 10:06
|
||||||
|
* 邮箱: itgaojian@163.com
|
||||||
|
* 描述:
|
||||||
|
*/
|
||||||
|
public class HonourAdapter extends BaseRecyclerAdapter<SaveHonourBean, HonourHolder> {
|
||||||
|
private int mType;
|
||||||
|
|
||||||
|
public HonourAdapter(Context ctx, List<SaveHonourBean> list, int type) {
|
||||||
|
super(ctx, list);
|
||||||
|
this.mType = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HonourHolder createHolder(ViewGroup parent, int viewType) {
|
||||||
|
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_user_honour, parent, false);
|
||||||
|
return new HonourHolder(itemView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindHolder(HonourHolder h, int i) {
|
||||||
|
SaveHonourBean bean = mData.get(i);
|
||||||
|
h.mTvName.setText(bean.getHonorName());
|
||||||
|
h.mTvDept.setText(bean.getIssuingAuthority());
|
||||||
|
h.mTvDate.setText(bean.getGetDate());
|
||||||
|
if (!TextUtils.isEmpty(bean.getPhoto())) {
|
||||||
|
String[] split = bean.getPhoto().split(",");
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(BaseUrlApi.BASE_IMG_URL + split[0])
|
||||||
|
.apply(options)
|
||||||
|
.into(h.mIvImg);
|
||||||
|
} else {
|
||||||
|
Glide.with(mContext)
|
||||||
|
.load(R.drawable.ic_honour_default)
|
||||||
|
.apply(options)
|
||||||
|
.into(h.mIvImg);
|
||||||
|
}
|
||||||
|
h.mTvRemark.setText(bean.getIntroduction());
|
||||||
|
if (mListener != null) {
|
||||||
|
h.mBtnDel.setOnClickListener(v -> mListener.onDelBean(bean, i));
|
||||||
|
h.mBtnEdit.setOnClickListener(v -> mListener.onEditBean(bean, i));
|
||||||
|
}
|
||||||
|
if (mType == 1) {
|
||||||
|
h.mBtnEdit.setVisibility(View.GONE);
|
||||||
|
h.mBtnDel.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
h.mBtnEdit.setVisibility(View.VISIBLE);
|
||||||
|
h.mBtnDel.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
if (i == (mData.size() - 1)) {
|
||||||
|
h.mLine.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
h.mLine.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private OnDelOrEditListener mListener;
|
||||||
|
|
||||||
|
public void addOnDelOrEditListener(OnDelOrEditListener listener) {
|
||||||
|
this.mListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnDelOrEditListener {
|
||||||
|
void onDelBean(SaveHonourBean bean, int i);
|
||||||
|
|
||||||
|
void onEditBean(SaveHonourBean bean, int i);
|
||||||
|
}
|
||||||
|
}
|
@ -8,12 +8,26 @@ package com.tenlionsoft.oamodule.beans;
|
|||||||
*/
|
*/
|
||||||
public class SaveHonourBean {
|
public class SaveHonourBean {
|
||||||
|
|
||||||
|
private String creator;
|
||||||
private String getDate;
|
private String getDate;
|
||||||
|
private String gmtCreate;
|
||||||
|
private String gmtModified;
|
||||||
private String honorName;
|
private String honorName;
|
||||||
private String introduction;
|
private String introduction;
|
||||||
|
private int isDelete;
|
||||||
private String issuingAuthority;
|
private String issuingAuthority;
|
||||||
|
private String modifier;
|
||||||
private String photo;
|
private String photo;
|
||||||
private String userArchivesId;
|
private String userArchivesId;
|
||||||
|
private String userHonorId;
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGetDate() {
|
public String getGetDate() {
|
||||||
return getDate;
|
return getDate;
|
||||||
@ -23,6 +37,22 @@ public class SaveHonourBean {
|
|||||||
this.getDate = getDate;
|
this.getDate = getDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGmtCreate() {
|
||||||
|
return gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtCreate(String gmtCreate) {
|
||||||
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtModified() {
|
||||||
|
return gmtModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtModified(String gmtModified) {
|
||||||
|
this.gmtModified = gmtModified;
|
||||||
|
}
|
||||||
|
|
||||||
public String getHonorName() {
|
public String getHonorName() {
|
||||||
return honorName;
|
return honorName;
|
||||||
}
|
}
|
||||||
@ -39,6 +69,14 @@ public class SaveHonourBean {
|
|||||||
this.introduction = introduction;
|
this.introduction = introduction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getIsDelete() {
|
||||||
|
return isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsDelete(int isDelete) {
|
||||||
|
this.isDelete = isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
public String getIssuingAuthority() {
|
public String getIssuingAuthority() {
|
||||||
return issuingAuthority;
|
return issuingAuthority;
|
||||||
}
|
}
|
||||||
@ -47,6 +85,14 @@ public class SaveHonourBean {
|
|||||||
this.issuingAuthority = issuingAuthority;
|
this.issuingAuthority = issuingAuthority;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getModifier() {
|
||||||
|
return modifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifier(String modifier) {
|
||||||
|
this.modifier = modifier;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPhoto() {
|
public String getPhoto() {
|
||||||
return photo;
|
return photo;
|
||||||
}
|
}
|
||||||
@ -62,4 +108,12 @@ public class SaveHonourBean {
|
|||||||
public void setUserArchivesId(String userArchivesId) {
|
public void setUserArchivesId(String userArchivesId) {
|
||||||
this.userArchivesId = userArchivesId;
|
this.userArchivesId = userArchivesId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUserHonorId() {
|
||||||
|
return userHonorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserHonorId(String userHonorId) {
|
||||||
|
this.userHonorId = userHonorId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,70 @@
|
|||||||
package com.tenlionsoft.oamodule.fragments;
|
package com.tenlionsoft.oamodule.fragments;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Environment;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||||
|
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||||
|
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||||
|
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||||
|
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||||
|
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||||
|
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||||
|
import com.tenlionsoft.baselib.core.widget.views.ButtomDialogView;
|
||||||
|
import com.tenlionsoft.baselib.core.widget.views.CustomStateView;
|
||||||
|
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||||
|
import com.tenlionsoft.baselib.utils.FileUtils;
|
||||||
|
import com.tenlionsoft.baselib.utils.ProvderUtils;
|
||||||
|
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||||
import com.tenlionsoft.oamodule.R;
|
import com.tenlionsoft.oamodule.R;
|
||||||
|
import com.tenlionsoft.oamodule.R2;
|
||||||
|
import com.tenlionsoft.oamodule.adapter.HonourAdapter;
|
||||||
|
import com.tenlionsoft.oamodule.beans.SaveHonourBean;
|
||||||
|
import com.tenlionsoft.oamodule.net.OAApi;
|
||||||
|
import com.tenlionsoft.oamodule.widget.HonourDialog;
|
||||||
|
import com.tenlionsoft.oamodule.widget.HonourShowDialog;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import io.reactivex.rxjava3.annotations.NonNull;
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import io.reactivex.rxjava3.core.Observer;
|
||||||
|
import io.reactivex.rxjava3.disposables.Disposable;
|
||||||
|
import okhttp3.MediaType;
|
||||||
|
import okhttp3.MultipartBody;
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
|
import static android.app.Activity.RESULT_OK;
|
||||||
|
import static com.tenlionsoft.baselib.core.widget.PhotoActivity.TAG_IMGURL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作者: adam
|
* 作者: adam
|
||||||
@ -16,6 +75,24 @@ import com.tenlionsoft.oamodule.R;
|
|||||||
@Route(path = PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_HONOUR)
|
@Route(path = PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_HONOUR)
|
||||||
public class UserRecordHonourFragment extends BaseFragment {
|
public class UserRecordHonourFragment extends BaseFragment {
|
||||||
|
|
||||||
|
@BindView(R2.id.rlv_honour)
|
||||||
|
RecyclerView mRlvHonour;
|
||||||
|
@BindView(R2.id.csv_state)
|
||||||
|
CustomStateView mCsvState;
|
||||||
|
@BindView(R2.id.rl_content)
|
||||||
|
RelativeLayout mRlContent;
|
||||||
|
@BindView(R2.id.btn_confirm)
|
||||||
|
Button mBtnConfirm;
|
||||||
|
private List<SaveHonourBean> mDatas;
|
||||||
|
private HonourAdapter mAdapter;
|
||||||
|
private String mId;
|
||||||
|
private String mPicPath;
|
||||||
|
private ActivityResultLauncher<Intent> mImgLauncher;
|
||||||
|
private ActivityResultLauncher<Intent> mAlermLauncher;
|
||||||
|
private HonourDialog mHonourDialog;
|
||||||
|
private int mUploadCount = 0;
|
||||||
|
private int mFileMax = 10;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getContentViewId() {
|
protected int getContentViewId() {
|
||||||
return R.layout.fragment_user_record_honour_phone;
|
return R.layout.fragment_user_record_honour_phone;
|
||||||
@ -23,9 +100,483 @@ public class UserRecordHonourFragment extends BaseFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setDataToView(View dataView) {
|
protected void setDataToView(View dataView) {
|
||||||
|
ButterKnife.bind(this, dataView);
|
||||||
setStateView(STATE_SUCCESS);
|
setStateView(STATE_SUCCESS);
|
||||||
|
setReLoEnable(false, false);
|
||||||
|
Bundle bundle = getArguments();
|
||||||
|
if (bundle != null) {
|
||||||
|
mId = bundle.getString("id");
|
||||||
|
}
|
||||||
|
mDatas = new ArrayList<>();
|
||||||
|
mAdapter = new HonourAdapter(mActivity, mDatas, 2);
|
||||||
|
mRlvHonour.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||||
|
mRlvHonour.setAdapter(mAdapter);
|
||||||
|
if (!TextUtils.isEmpty(mId)) {
|
||||||
|
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||||
|
getHonourList();
|
||||||
|
} else {
|
||||||
|
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||||
|
}
|
||||||
|
mBtnConfirm.setOnClickListener(v -> showAddOrEdit(null, 1, 0));
|
||||||
|
mAdapter.addOnDelOrEditListener(new HonourAdapter.OnDelOrEditListener() {
|
||||||
|
@Override
|
||||||
|
public void onDelBean(SaveHonourBean bean, int i) {
|
||||||
|
new AlertDialog.Builder(mActivity)
|
||||||
|
.setTitle("警告")
|
||||||
|
.setMessage("确定要删除该荣誉信息吗?")
|
||||||
|
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||||
|
.setPositiveButton("确定", (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
doDelNet(bean);
|
||||||
|
})
|
||||||
|
.create()
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEditBean(SaveHonourBean bean, int i) {
|
||||||
|
showAddOrEdit(bean, 2, i);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mAdapter.addOnItemClickListener(this::showHonour);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(@androidx.annotation.NonNull @NotNull Context context) {
|
||||||
|
super.onAttach(context);
|
||||||
|
//证件照
|
||||||
|
mImgLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||||
|
if (result.getResultCode() == RESULT_OK) {
|
||||||
|
ArrayList<String> paths = new ArrayList<>();
|
||||||
|
paths.add(mPicPath);
|
||||||
|
doUploadFiles(paths);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
mAlermLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||||
|
if (RESULT_OK == result.getResultCode()) {
|
||||||
|
Intent data = result.getData();
|
||||||
|
if (data == null) return;
|
||||||
|
Uri uri = data.getData();
|
||||||
|
String[] proj = {MediaStore.Images.Media.DATA};
|
||||||
|
Cursor cursor = mActivity.managedQuery(uri, proj, null, null, null);
|
||||||
|
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||||
|
cursor.moveToFirst();
|
||||||
|
String srcPath = cursor.getString(column_index);
|
||||||
|
ArrayList<String> paths = new ArrayList<>();
|
||||||
|
paths.add(srcPath);
|
||||||
|
doUploadFiles(paths);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示添加或编辑窗口
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 显示添加 或 编辑
|
||||||
|
*/
|
||||||
|
private void showAddOrEdit(SaveHonourBean bean, int type, int pos) {
|
||||||
|
mHonourDialog = new HonourDialog.Builder(mActivity)
|
||||||
|
.setType(type)
|
||||||
|
.setBean(bean)
|
||||||
|
.build();
|
||||||
|
mHonourDialog.addOnChangeListener(new HonourDialog.OnChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void doSave(SaveHonourBean bean) {
|
||||||
|
//新增教育经历
|
||||||
|
mHonourDialog.dismiss();
|
||||||
|
hideSoftInput();
|
||||||
|
doSaveNet(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doEdit(SaveHonourBean bean) {
|
||||||
|
//编辑
|
||||||
|
mHonourDialog.dismiss();
|
||||||
|
hideSoftInput();
|
||||||
|
doEditNet(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doSelPhoto() {
|
||||||
|
//选择照片
|
||||||
|
chooseImg();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doShowPhoto(AddFileBean addFileBean) {
|
||||||
|
//预览照片
|
||||||
|
//图片预览
|
||||||
|
//遍历文件获取所有图片文件
|
||||||
|
ArrayList<String> imgUrls = new ArrayList<>();
|
||||||
|
imgUrls.add(addFileBean.getPath());
|
||||||
|
ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
|
||||||
|
.withStringArrayList(TAG_IMGURL, imgUrls)
|
||||||
|
.navigation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mHonourDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示详情
|
||||||
|
*/
|
||||||
|
private void showHonour(SaveHonourBean bean) {
|
||||||
|
HonourShowDialog dialog = new HonourShowDialog.Builder(mActivity)
|
||||||
|
.setType(2)
|
||||||
|
.setBean(bean)
|
||||||
|
.build();
|
||||||
|
dialog.addOnChangeListener(new HonourShowDialog.OnChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void doSave(SaveHonourBean bean) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doEdit(SaveHonourBean bean) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doSelPhoto() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doShowPhoto(AddFileBean addFileBean) {
|
||||||
|
//预览照片
|
||||||
|
//图片预览
|
||||||
|
//遍历文件获取所有图片文件
|
||||||
|
ArrayList<String> imgUrls = new ArrayList<>();
|
||||||
|
imgUrls.add(addFileBean.getPath());
|
||||||
|
ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
|
||||||
|
.withStringArrayList(TAG_IMGURL, imgUrls)
|
||||||
|
.navigation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑保存
|
||||||
|
*
|
||||||
|
* @param bean
|
||||||
|
*/
|
||||||
|
private void doEditNet(SaveHonourBean bean) {
|
||||||
|
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
|
||||||
|
dialog.show();
|
||||||
|
bean.setUserArchivesId(mId);
|
||||||
|
RequestBody body = RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
|
||||||
|
RetrofitManager.getInstance()
|
||||||
|
.create(OAApi.class)
|
||||||
|
.doEditUserHonour(bean.getUserHonorId(), body)
|
||||||
|
.compose(RxTransformer.getTransformer())
|
||||||
|
.subscribe(new Observer<BaseSuccessBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull BaseSuccessBean bean) {
|
||||||
|
if (dialog.isShowing()) dialog.dismiss();
|
||||||
|
ToastUtils.show("保存成功");
|
||||||
|
getHonourList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
if (dialog.isShowing()) dialog.dismiss();
|
||||||
|
ExceptionHandler.handleException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param bean
|
||||||
|
*/
|
||||||
|
private void doSaveNet(SaveHonourBean bean) {
|
||||||
|
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
|
||||||
|
dialog.show();
|
||||||
|
bean.setUserArchivesId(mId);
|
||||||
|
RequestBody body = RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
|
||||||
|
RetrofitManager.getInstance()
|
||||||
|
.create(OAApi.class)
|
||||||
|
.doSaveUserHonour(body)
|
||||||
|
.compose(RxTransformer.getTransformer())
|
||||||
|
.subscribe(new Observer<BaseSuccessBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull BaseSuccessBean bean) {
|
||||||
|
if (dialog.isShowing()) dialog.dismiss();
|
||||||
|
ToastUtils.show("保存成功");
|
||||||
|
getHonourList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
if (dialog.isShowing()) dialog.dismiss();
|
||||||
|
ExceptionHandler.handleException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
private void doDelNet(SaveHonourBean bean) {
|
||||||
|
ProgressDialog dialog = UIUtil.initDialog(mActivity, "删除中...");
|
||||||
|
dialog.show();
|
||||||
|
RetrofitManager.getInstance()
|
||||||
|
.create(OAApi.class)
|
||||||
|
.doDelHonour(bean.getUserHonorId())
|
||||||
|
.compose(RxTransformer.getTransformer())
|
||||||
|
.subscribe(new Observer<BaseSuccessBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull BaseSuccessBean bean) {
|
||||||
|
if (dialog.isShowing()) dialog.dismiss();
|
||||||
|
getHonourList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
if (dialog.isShowing()) dialog.dismiss();
|
||||||
|
ExceptionHandler.handleException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取荣誉列表
|
||||||
|
*/
|
||||||
|
private void getHonourList() {
|
||||||
|
mDatas.clear();
|
||||||
|
mAdapter.setData(mDatas);
|
||||||
|
RetrofitManager.getInstance()
|
||||||
|
.create(OAApi.class)
|
||||||
|
.getUserHonourList(mId)
|
||||||
|
.compose(RxTransformer.getTransformer())
|
||||||
|
.subscribe(new Observer<List<SaveHonourBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull List<SaveHonourBean> saveHonourBeans) {
|
||||||
|
if (saveHonourBeans.size() > 0) {
|
||||||
|
mDatas = saveHonourBeans;
|
||||||
|
mAdapter.setData(mDatas);
|
||||||
|
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||||
|
} else {
|
||||||
|
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||||
|
ExceptionHandler.handleException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择上传的图片
|
||||||
|
*/
|
||||||
|
private void chooseImg() {
|
||||||
|
ButtomDialogView buttomDialogView = new ButtomDialogView.DialogBuilder(mActivity)
|
||||||
|
.setIsBackCancelable(true)
|
||||||
|
.setIscancelable(true)
|
||||||
|
.setShowLocation(Gravity.BOTTOM)
|
||||||
|
.setIsShowFile(false)
|
||||||
|
.build();
|
||||||
|
buttomDialogView.addOnChoseListener(new ButtomDialogView.OnChoseListener() {
|
||||||
|
@Override
|
||||||
|
public void choseFile() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void choseAlbum() {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_PICK, null);
|
||||||
|
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||||
|
"image/*");
|
||||||
|
mAlermLauncher.launch(intent);
|
||||||
|
buttomDialogView.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void choseShoot() {
|
||||||
|
mPicPath = mActivity.getExternalFilesDir(Environment.DIRECTORY_PICTURES).getPath() + File.separator + System.currentTimeMillis() + ".jpg";
|
||||||
|
File file = new File(mPicPath);
|
||||||
|
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
// 下面这句指定调用相机拍照后的照片存储的路径
|
||||||
|
Uri uri;
|
||||||
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||||
|
uri = Uri.fromFile(file);
|
||||||
|
} else {
|
||||||
|
uri = FileProvider.getUriForFile(mActivity, ProvderUtils.getFileProviderName(mActivity), file);
|
||||||
|
}
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
|
||||||
|
mImgLauncher.launch(intent);
|
||||||
|
buttomDialogView.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loginOut() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void changePwd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
buttomDialogView.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
*/
|
||||||
|
private void doUploadFiles(ArrayList<String> paths) {
|
||||||
|
List<AddFileBean> tempList = new ArrayList<>();
|
||||||
|
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "上传中...");
|
||||||
|
progressDialog.show();
|
||||||
|
List<Observable<BaseSuccessBean>> requests = new ArrayList<>();
|
||||||
|
List<String> fileNames = new ArrayList<>();
|
||||||
|
for (int i = 0; i < paths.size(); i++) {
|
||||||
|
File file = new File(paths.get(i));
|
||||||
|
Observable<BaseSuccessBean> observable = createObservable(file);
|
||||||
|
if (observable == null) return;
|
||||||
|
requests.add(observable);
|
||||||
|
fileNames.add(file.getName());
|
||||||
|
}
|
||||||
|
Observable<BaseSuccessBean>[] observables1 = requests.toArray(new Observable[requests.size()]);
|
||||||
|
|
||||||
|
Observable.mergeArrayDelayError(observables1)
|
||||||
|
.compose(RxTransformer.getTransformer())
|
||||||
|
.subscribe(new Observer() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NotNull Object o) {
|
||||||
|
++mUploadCount;
|
||||||
|
if (o instanceof BaseSuccessBean) {
|
||||||
|
--mFileMax;
|
||||||
|
//刷新文件
|
||||||
|
BaseSuccessBean bean = (BaseSuccessBean) o;
|
||||||
|
AddFileBean fileBean = new AddFileBean();
|
||||||
|
fileBean.setId(bean.getData());
|
||||||
|
fileBean.setPath(BaseUrlApi.BASE_IMG_URL + bean.getData());
|
||||||
|
fileBean.setFileName(fileNames.get(mUploadCount - 1));
|
||||||
|
int fileType = FileUtils.getFileType(fileNames.get(mUploadCount - 1));
|
||||||
|
if (2 == fileType) {
|
||||||
|
fileBean.setFileType(2);
|
||||||
|
tempList.add(0, fileBean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mUploadCount == paths.size()) {
|
||||||
|
mUploadCount = 0;
|
||||||
|
mPicPath = "";
|
||||||
|
if (mHonourDialog != null) {
|
||||||
|
mHonourDialog.refreshPhoto(tempList);
|
||||||
|
}
|
||||||
|
if (progressDialog.isShowing()) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
mUploadCount = 0;
|
||||||
|
if (progressDialog.isShowing()) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
}
|
||||||
|
ToastUtils.show("上传失败,请稍后重试.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private Observable<BaseSuccessBean> createObservable(File file) {
|
||||||
|
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||||
|
MultipartBody.Part body;
|
||||||
|
int fileType = FileUtils.getFileType(file.getName());
|
||||||
|
if (fileType == 1) {
|
||||||
|
body = MultipartBody.Part.createFormData("file", file.getName(), requestFile);
|
||||||
|
return RetrofitManager.getInstance()
|
||||||
|
.create(BaseApiService.class)
|
||||||
|
.uploadFile(body)
|
||||||
|
.compose(RxTransformer.getTransformer());
|
||||||
|
} else if (fileType == 2) {
|
||||||
|
body = MultipartBody.Part.createFormData("image", file.getName(), requestFile);
|
||||||
|
return RetrofitManager.getInstance()
|
||||||
|
.create(BaseApiService.class)
|
||||||
|
.uploadImage(body)
|
||||||
|
.compose(RxTransformer.getTransformer());
|
||||||
|
} else if (fileType == 3) {
|
||||||
|
body = MultipartBody.Part.createFormData("video", file.getName(), requestFile);
|
||||||
|
return RetrofitManager.getInstance()
|
||||||
|
.create(BaseApiService.class)
|
||||||
|
.uploadVideo(body)
|
||||||
|
.compose(RxTransformer.getTransformer());
|
||||||
|
} else if (fileType == 4) {
|
||||||
|
body = MultipartBody.Part.createFormData("audio", file.getName(), requestFile);
|
||||||
|
return RetrofitManager.getInstance()
|
||||||
|
.create(BaseApiService.class)
|
||||||
|
.uploadAudio(body)
|
||||||
|
.compose(RxTransformer.getTransformer());
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void refreshView() {
|
protected void refreshView() {
|
||||||
|
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
package com.tenlionsoft.oamodule.holder;
|
package com.tenlionsoft.oamodule.holder;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.tenlionsoft.baselib.core.widget.base.BaseViewHolder;
|
||||||
|
import com.tenlionsoft.oamodule.R2;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import butterknife.BindView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作者: adam
|
* 作者: adam
|
||||||
@ -13,7 +20,23 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
* 邮箱: itgaojian@163.com
|
* 邮箱: itgaojian@163.com
|
||||||
* 描述:
|
* 描述:
|
||||||
*/
|
*/
|
||||||
public class HonourHolder extends RecyclerView.ViewHolder {
|
public class HonourHolder extends BaseViewHolder {
|
||||||
|
@BindView(R2.id.iv_img)
|
||||||
|
public ImageView mIvImg;
|
||||||
|
@BindView(R2.id.tv_name)
|
||||||
|
public TextView mTvName;
|
||||||
|
@BindView(R2.id.tv_dept)
|
||||||
|
public TextView mTvDept;
|
||||||
|
@BindView(R2.id.tv_date)
|
||||||
|
public TextView mTvDate;
|
||||||
|
@BindView(R2.id.tv_remark)
|
||||||
|
public TextView mTvRemark;
|
||||||
|
@BindView(R2.id.btn_del)
|
||||||
|
public Button mBtnDel;
|
||||||
|
@BindView(R2.id.btn_edit)
|
||||||
|
public Button mBtnEdit;
|
||||||
|
@BindView(R2.id.line)
|
||||||
|
public View mLine;
|
||||||
|
|
||||||
public HonourHolder(@NonNull @NotNull View itemView) {
|
public HonourHolder(@NonNull @NotNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
@ -0,0 +1,273 @@
|
|||||||
|
package com.tenlionsoft.oamodule.widget;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||||
|
import com.bigkoo.pickerview.view.TimePickerView;
|
||||||
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||||
|
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||||
|
import com.tenlionsoft.baselib.core.widget.base.AddImgGridAdapter;
|
||||||
|
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||||
|
import com.tenlionsoft.oamodule.R;
|
||||||
|
import com.tenlionsoft.oamodule.beans.SaveHonourBean;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者: adam
|
||||||
|
* 日期: 2022/4/24 - 09:25
|
||||||
|
* 邮箱: itgaojian@163.com
|
||||||
|
* 描述:
|
||||||
|
*/
|
||||||
|
public class HonourDialog extends Dialog {
|
||||||
|
private Context mContext;
|
||||||
|
private View view;
|
||||||
|
private SaveHonourBean mBean;
|
||||||
|
private int mType;//1新增 2修改
|
||||||
|
private EditText mEtName;//荣誉称号
|
||||||
|
private TextView mTvStart;//获取时间
|
||||||
|
private EditText mEtIssueDept;//发证机关
|
||||||
|
private EditText mEtRemark;//荣誉简介
|
||||||
|
private RecyclerView mRlvPhoto;//证书照片
|
||||||
|
private List<AddFileBean> mPhotosDatas;
|
||||||
|
private AddImgGridAdapter mAdapter;
|
||||||
|
|
||||||
|
private HonourDialog(@NonNull Context context, int type, SaveHonourBean bean) {
|
||||||
|
super(context, R.style.dialog_center_alpha);
|
||||||
|
this.mContext = context;
|
||||||
|
this.mType = type;
|
||||||
|
this.mBean = bean;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
view = LayoutInflater.from(mContext).inflate(R.layout.dialog_honour, null);
|
||||||
|
setContentView(view);
|
||||||
|
setCancelable(false);
|
||||||
|
setCanceledOnTouchOutside(false);
|
||||||
|
mEtName = view.findViewById(R.id.et_name);
|
||||||
|
mEtIssueDept = view.findViewById(R.id.et_issue_dept);
|
||||||
|
mTvStart = view.findViewById(R.id.tv_start_date);
|
||||||
|
mEtRemark = view.findViewById(R.id.et_remark);
|
||||||
|
mRlvPhoto = view.findViewById(R.id.rlv_photo);
|
||||||
|
mPhotosDatas = new ArrayList<>();
|
||||||
|
mPhotosDatas.add(new AddFileBean());
|
||||||
|
mAdapter = new AddImgGridAdapter(mContext, mPhotosDatas);
|
||||||
|
mRlvPhoto.setLayoutManager(new GridLayoutManager(mContext, 4));
|
||||||
|
mRlvPhoto.setAdapter(mAdapter);
|
||||||
|
if (mType == 2) {
|
||||||
|
//编辑
|
||||||
|
mEtName.setText(mBean.getHonorName());//荣誉称号
|
||||||
|
mEtIssueDept.setText(mBean.getIssuingAuthority());//发证机关
|
||||||
|
mTvStart.setText(mBean.getGetDate());
|
||||||
|
mEtRemark.setText(mBean.getIntroduction());
|
||||||
|
String photo = mBean.getPhoto();
|
||||||
|
if (!TextUtils.isEmpty(photo)) {
|
||||||
|
String[] split = photo.split(",");
|
||||||
|
for (int i = 0; i < split.length; i++) {
|
||||||
|
AddFileBean bean = new AddFileBean();
|
||||||
|
bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
|
||||||
|
bean.setId(split[i]);
|
||||||
|
bean.setFileType(2);
|
||||||
|
bean.setFileName("荣誉证书图片-" + i);
|
||||||
|
mPhotosDatas.add(0, bean);
|
||||||
|
}
|
||||||
|
mAdapter.setData(mPhotosDatas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//添加或预览
|
||||||
|
mAdapter.addOnItemClickListener(addFileBean -> {
|
||||||
|
if (TextUtils.isEmpty(addFileBean.getId())) {
|
||||||
|
mChangeListener.doSelPhoto();
|
||||||
|
} else {
|
||||||
|
mChangeListener.doShowPhoto(addFileBean);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//删除
|
||||||
|
mAdapter.addOnDeleteListener((bean, i) -> new AlertDialog.Builder(mContext)
|
||||||
|
.setTitle("警告")
|
||||||
|
.setMessage("确定要删除该图片吗?")
|
||||||
|
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||||
|
.setPositiveButton("确定", (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
mPhotosDatas.remove(bean);
|
||||||
|
mAdapter.setData(mPhotosDatas);
|
||||||
|
})
|
||||||
|
.create()
|
||||||
|
.show());
|
||||||
|
mTvStart.setOnClickListener(v -> onShowDate(1));
|
||||||
|
view.findViewById(R.id.tv_cancel).setOnClickListener(v -> this.dismiss());
|
||||||
|
view.findViewById(R.id.tv_confirm).setOnClickListener(v -> doConfirm());
|
||||||
|
DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
|
||||||
|
Window window = this.getWindow();
|
||||||
|
window.setGravity(Gravity.CENTER);
|
||||||
|
window.setWindowAnimations(R.style.dialog_center_alpha);
|
||||||
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
|
params.width = (int) (displayMetrics.widthPixels * 0.9);
|
||||||
|
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
|
window.setAttributes(params);
|
||||||
|
window.setBackgroundDrawable(new ColorDrawable());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doConfirm() {
|
||||||
|
if (checkParams()) {
|
||||||
|
HideSoftKeyBoardDialog();
|
||||||
|
if (mChangeListener != null) {
|
||||||
|
String name = mEtName.getText().toString().trim();
|
||||||
|
String issueDept = mEtIssueDept.getText().toString().trim();
|
||||||
|
String date = mTvStart.getText().toString().trim();
|
||||||
|
String remark = mEtRemark.getText().toString().trim();
|
||||||
|
SaveHonourBean bean = new SaveHonourBean();
|
||||||
|
bean.setHonorName(name);
|
||||||
|
bean.setIssuingAuthority(issueDept);
|
||||||
|
bean.setGetDate(date);
|
||||||
|
bean.setIntroduction(remark);
|
||||||
|
//图片
|
||||||
|
if (mPhotosDatas.size() >= 2) {
|
||||||
|
StringBuilder fileId = new StringBuilder();
|
||||||
|
for (AddFileBean fileBean : mPhotosDatas) {
|
||||||
|
if (!TextUtils.isEmpty(fileBean.getId())) {
|
||||||
|
fileId.append(fileBean.getId()).append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fileId.toString().endsWith(",")) {
|
||||||
|
fileId = new StringBuilder(fileId.substring(0, fileId.length() - 1));
|
||||||
|
}
|
||||||
|
bean.setPhoto(fileId.toString().trim());
|
||||||
|
} else {
|
||||||
|
bean.setPhoto("");
|
||||||
|
}
|
||||||
|
if (mType == 1) {
|
||||||
|
mChangeListener.doSave(bean);
|
||||||
|
} else {
|
||||||
|
bean.setUserHonorId(mBean.getUserHonorId());
|
||||||
|
mChangeListener.doEdit(bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refreshPhoto(List<AddFileBean> beans) {
|
||||||
|
mPhotosDatas.addAll(0, beans);
|
||||||
|
mAdapter.setData(mPhotosDatas);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onShowDate(int type) {
|
||||||
|
TimePickerView mTimePickerView = new TimePickerBuilder(mContext, (date, v) ->
|
||||||
|
mTvStart.setText(TimeUtils.dateToString(date)))
|
||||||
|
.setTitleText("请选日期")
|
||||||
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
|
.isDialog(true)
|
||||||
|
.setType(new boolean[]{true, true, true, false, false, false})
|
||||||
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
|
.build();
|
||||||
|
mTimePickerView.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean checkParams() {
|
||||||
|
String name = mEtName.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(name)) {
|
||||||
|
ToastUtils.show("请输入荣誉称号");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String issueDept = mEtIssueDept.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(issueDept)) {
|
||||||
|
ToastUtils.show("请输入发证机关");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String start = mTvStart.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(start)) {
|
||||||
|
ToastUtils.show("请选择获取日期");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String remark = mEtRemark.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(remark)) {
|
||||||
|
ToastUtils.show("请输入荣誉简介");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private OnChangeListener mChangeListener;
|
||||||
|
|
||||||
|
public void addOnChangeListener(OnChangeListener listener) {
|
||||||
|
this.mChangeListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnChangeListener {
|
||||||
|
void doSave(SaveHonourBean bean);
|
||||||
|
|
||||||
|
void doEdit(SaveHonourBean bean);
|
||||||
|
|
||||||
|
void doSelPhoto();//添加图片
|
||||||
|
|
||||||
|
void doShowPhoto(AddFileBean addFileBean);//预览图片
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideSoftKeyBoardDialog(Activity activity) {
|
||||||
|
try {
|
||||||
|
InputMethodManager imm = (InputMethodManager) activity.getSystemService(activity.INPUT_METHOD_SERVICE);
|
||||||
|
imm.toggleSoftInput(InputMethodManager.HIDE_NOT_ALWAYS, 0);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideSoftKeyBoardDialog() {
|
||||||
|
try {
|
||||||
|
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||||
|
imm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
private Context mContext;
|
||||||
|
private int mType;
|
||||||
|
private SaveHonourBean mBean;
|
||||||
|
|
||||||
|
public Builder(Context context) {
|
||||||
|
this.mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setType(int type) {
|
||||||
|
this.mType = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setBean(SaveHonourBean bean) {
|
||||||
|
this.mBean = bean;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HonourDialog build() {
|
||||||
|
return new HonourDialog(mContext, mType, mBean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,257 @@
|
|||||||
|
package com.tenlionsoft.oamodule.widget;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||||
|
import com.bigkoo.pickerview.view.TimePickerView;
|
||||||
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||||
|
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||||
|
import com.tenlionsoft.baselib.core.widget.base.AddImgGridAdapter;
|
||||||
|
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||||
|
import com.tenlionsoft.oamodule.R;
|
||||||
|
import com.tenlionsoft.oamodule.beans.SaveHonourBean;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者: adam
|
||||||
|
* 日期: 2022/4/24 - 09:25
|
||||||
|
* 邮箱: itgaojian@163.com
|
||||||
|
* 描述: 显示
|
||||||
|
*/
|
||||||
|
public class HonourShowDialog extends Dialog {
|
||||||
|
private Context mContext;
|
||||||
|
private View view;
|
||||||
|
private SaveHonourBean mBean;
|
||||||
|
private int mType;//1新增 2修改
|
||||||
|
private EditText mEtName;//荣誉称号
|
||||||
|
private TextView mTvStart;//获取时间
|
||||||
|
private EditText mEtIssueDept;//发证机关
|
||||||
|
private EditText mEtRemark;//荣誉简介
|
||||||
|
private RecyclerView mRlvPhoto;//证书照片
|
||||||
|
private List<AddFileBean> mPhotosDatas;
|
||||||
|
private AddImgGridAdapter mAdapter;
|
||||||
|
|
||||||
|
private HonourShowDialog(@NonNull Context context, int type, SaveHonourBean bean) {
|
||||||
|
super(context, R.style.dialog_center_alpha);
|
||||||
|
this.mContext = context;
|
||||||
|
this.mType = type;
|
||||||
|
this.mBean = bean;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
view = LayoutInflater.from(mContext).inflate(R.layout.dialog_honour_show, null);
|
||||||
|
setContentView(view);
|
||||||
|
setCancelable(true);
|
||||||
|
setCanceledOnTouchOutside(true);
|
||||||
|
mEtName = view.findViewById(R.id.et_name);
|
||||||
|
mEtIssueDept = view.findViewById(R.id.et_issue_dept);
|
||||||
|
mTvStart = view.findViewById(R.id.tv_start_date);
|
||||||
|
mEtRemark = view.findViewById(R.id.et_remark);
|
||||||
|
mRlvPhoto = view.findViewById(R.id.rlv_photo);
|
||||||
|
mPhotosDatas = new ArrayList<>();
|
||||||
|
mAdapter = new AddImgGridAdapter(mContext, mPhotosDatas);
|
||||||
|
mRlvPhoto.setLayoutManager(new GridLayoutManager(mContext, 4));
|
||||||
|
mRlvPhoto.setAdapter(mAdapter);
|
||||||
|
if (mType == 2) {
|
||||||
|
//编辑
|
||||||
|
mEtName.setText(mBean.getHonorName());//荣誉称号
|
||||||
|
mEtIssueDept.setText(mBean.getIssuingAuthority());//发证机关
|
||||||
|
mTvStart.setText(mBean.getGetDate());
|
||||||
|
mEtRemark.setText(mBean.getIntroduction());
|
||||||
|
String photo = mBean.getPhoto();
|
||||||
|
if (!TextUtils.isEmpty(photo)) {
|
||||||
|
String[] split = photo.split(",");
|
||||||
|
for (int i = 0; i < split.length; i++) {
|
||||||
|
AddFileBean bean = new AddFileBean();
|
||||||
|
bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
|
||||||
|
bean.setId(split[i]);
|
||||||
|
bean.setFileType(2);
|
||||||
|
bean.setFileName("荣誉证书图片-" + i);
|
||||||
|
mPhotosDatas.add(0, bean);
|
||||||
|
}
|
||||||
|
mAdapter.setData(mPhotosDatas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//添加或预览
|
||||||
|
mAdapter.addOnItemClickListener(addFileBean -> {
|
||||||
|
if (!TextUtils.isEmpty(addFileBean.getId())) {
|
||||||
|
mChangeListener.doShowPhoto(addFileBean);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mTvStart.setOnClickListener(v -> onShowDate(1));
|
||||||
|
view.findViewById(R.id.tv_cancel).setOnClickListener(v -> this.dismiss());
|
||||||
|
view.findViewById(R.id.tv_confirm).setOnClickListener(v -> doConfirm());
|
||||||
|
DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
|
||||||
|
Window window = this.getWindow();
|
||||||
|
window.setGravity(Gravity.CENTER);
|
||||||
|
window.setWindowAnimations(R.style.dialog_center_alpha);
|
||||||
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
|
params.width = (int) (displayMetrics.widthPixels * 0.9);
|
||||||
|
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
|
window.setAttributes(params);
|
||||||
|
window.setBackgroundDrawable(new ColorDrawable());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doConfirm() {
|
||||||
|
if (checkParams()) {
|
||||||
|
if (mChangeListener != null) {
|
||||||
|
String name = mEtName.getText().toString().trim();
|
||||||
|
String issueDept = mEtIssueDept.getText().toString().trim();
|
||||||
|
String date = mTvStart.getText().toString().trim();
|
||||||
|
String remark = mEtRemark.getText().toString().trim();
|
||||||
|
SaveHonourBean bean = new SaveHonourBean();
|
||||||
|
bean.setHonorName(name);
|
||||||
|
bean.setIssuingAuthority(issueDept);
|
||||||
|
bean.setGetDate(date);
|
||||||
|
bean.setIntroduction(remark);
|
||||||
|
//图片
|
||||||
|
if (mPhotosDatas.size() >= 2) {
|
||||||
|
StringBuilder fileId = new StringBuilder();
|
||||||
|
for (AddFileBean fileBean : mPhotosDatas) {
|
||||||
|
if (!TextUtils.isEmpty(fileBean.getId())) {
|
||||||
|
fileId.append(fileBean.getId()).append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fileId.toString().endsWith(",")) {
|
||||||
|
fileId = new StringBuilder(fileId.substring(0, fileId.length() - 1));
|
||||||
|
}
|
||||||
|
bean.setPhoto(fileId.toString().trim());
|
||||||
|
} else {
|
||||||
|
bean.setPhoto("");
|
||||||
|
}
|
||||||
|
if (mType == 1) {
|
||||||
|
mChangeListener.doSave(bean);
|
||||||
|
} else {
|
||||||
|
bean.setUserHonorId(mBean.getUserHonorId());
|
||||||
|
mChangeListener.doEdit(bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refreshPhoto(List<AddFileBean> beans) {
|
||||||
|
mPhotosDatas.addAll(0, beans);
|
||||||
|
mAdapter.setData(mPhotosDatas);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onShowDate(int type) {
|
||||||
|
TimePickerView mTimePickerView = new TimePickerBuilder(mContext, (date, v) ->
|
||||||
|
mTvStart.setText(TimeUtils.dateToString(date)))
|
||||||
|
.setTitleText("请选日期")
|
||||||
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
|
.isDialog(true)
|
||||||
|
.setType(new boolean[]{true, true, true, false, false, false})
|
||||||
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
|
.build();
|
||||||
|
mTimePickerView.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean checkParams() {
|
||||||
|
String name = mEtName.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(name)) {
|
||||||
|
ToastUtils.show("请输入荣誉称号");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String issueDept = mEtIssueDept.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(issueDept)) {
|
||||||
|
ToastUtils.show("请输入发证机关");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String start = mTvStart.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(start)) {
|
||||||
|
ToastUtils.show("请选择获取日期");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String remark = mEtRemark.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(remark)) {
|
||||||
|
ToastUtils.show("请输入荣誉简介");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private OnChangeListener mChangeListener;
|
||||||
|
|
||||||
|
public void addOnChangeListener(OnChangeListener listener) {
|
||||||
|
this.mChangeListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnChangeListener {
|
||||||
|
void doSave(SaveHonourBean bean);
|
||||||
|
|
||||||
|
void doEdit(SaveHonourBean bean);
|
||||||
|
|
||||||
|
void doSelPhoto();//添加图片
|
||||||
|
|
||||||
|
void doShowPhoto(AddFileBean addFileBean);//预览图片
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideSoftKeyBoardDialog(Activity activity) {
|
||||||
|
try {
|
||||||
|
InputMethodManager imm = (InputMethodManager) activity.getSystemService(activity.INPUT_METHOD_SERVICE);
|
||||||
|
imm.toggleSoftInput(InputMethodManager.HIDE_NOT_ALWAYS, 0);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideSoftKeyBoardDialog() {
|
||||||
|
try {
|
||||||
|
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||||
|
imm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
private Context mContext;
|
||||||
|
private int mType;
|
||||||
|
private SaveHonourBean mBean;
|
||||||
|
|
||||||
|
public Builder(Context context) {
|
||||||
|
this.mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setType(int type) {
|
||||||
|
this.mType = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder setBean(SaveHonourBean bean) {
|
||||||
|
this.mBean = bean;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HonourShowDialog build() {
|
||||||
|
return new HonourShowDialog(mContext, mType, mBean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
@ -19,8 +20,8 @@
|
|||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title_23"
|
style="@style/item_title_23"
|
||||||
android:drawableLeft="@drawable/ic_start_hint"
|
android:text="学校名称"
|
||||||
android:text="学校名称" />
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
android:id="@+id/et_name"
|
android:id="@+id/et_name"
|
||||||
@ -32,8 +33,8 @@
|
|||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title_23"
|
style="@style/item_title_23"
|
||||||
android:drawableLeft="@drawable/ic_start_hint"
|
android:text="专业"
|
||||||
android:text="专业" />
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
android:id="@+id/et_specialty"
|
android:id="@+id/et_specialty"
|
||||||
@ -45,8 +46,8 @@
|
|||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title_23"
|
style="@style/item_title_23"
|
||||||
android:drawableLeft="@drawable/ic_start_hint"
|
android:text="学历"
|
||||||
android:text="学历" />
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
android:id="@+id/et_degree"
|
android:id="@+id/et_degree"
|
||||||
@ -59,13 +60,11 @@
|
|||||||
style="@style/item_hor_content"
|
style="@style/item_hor_content"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/style_hint_star"
|
|
||||||
android:visibility="visible" />
|
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title"
|
style="@style/item_title"
|
||||||
android:text="开始时间" />
|
android:text="开始时间"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_start_date"
|
android:id="@+id/tv_start_date"
|
||||||
@ -74,17 +73,16 @@
|
|||||||
android:hint="请选择开始时间" />
|
android:hint="请选择开始时间" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
style="@style/item_hor_content"
|
style="@style/item_hor_content"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/style_hint_star"
|
|
||||||
android:visibility="visible" />
|
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title"
|
style="@style/item_title"
|
||||||
android:text="结束时间" />
|
android:text="结束时间"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_end_date"
|
android:id="@+id/tv_end_date"
|
||||||
|
126
oamodule/src/main/res/layout/dialog_honour.xml
Normal file
126
oamodule/src/main/res/layout/dialog_honour.xml
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="20dp"
|
||||||
|
android:background="@drawable/shp_rectangle_white_5"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:text="个人荣誉"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_hor_content">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title_23"
|
||||||
|
android:text="荣誉称号"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
|
android:id="@+id/et_name"
|
||||||
|
style="@style/item_content"
|
||||||
|
android:hint="请输入荣誉称号" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_hor_content">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title_23"
|
||||||
|
android:text="发证机关"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
|
android:id="@+id/et_issue_dept"
|
||||||
|
style="@style/item_content"
|
||||||
|
android:hint="请输入发证机关" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/item_hor_content"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title"
|
||||||
|
android:text="获取日期"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:id="@+id/tv_start_date"
|
||||||
|
style="@style/item_content"
|
||||||
|
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||||
|
android:hint="请选择获取日期" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_hor_content">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title_23"
|
||||||
|
android:text="荣誉简介"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
|
android:id="@+id/et_remark"
|
||||||
|
style="@style/item_content"
|
||||||
|
android:hint="请输入荣誉简介" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="5dp">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title_23_ver"
|
||||||
|
android:text="证件照片"
|
||||||
|
android:textSize="@dimen/text_15"
|
||||||
|
app:text_type_cus="2" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rlv_photo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:gravity="right"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:id="@+id/tv_cancel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="取消"
|
||||||
|
android:textColor="@color/gray_text" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:id="@+id/tv_confirm"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="保存"
|
||||||
|
android:textColor="@color/text_blue" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
129
oamodule/src/main/res/layout/dialog_honour_show.xml
Normal file
129
oamodule/src/main/res/layout/dialog_honour_show.xml
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="20dp"
|
||||||
|
android:background="@drawable/shp_rectangle_white_5"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:text="个人荣誉"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_hor_content">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title_23"
|
||||||
|
android:text="荣誉称号"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
|
android:id="@+id/et_name"
|
||||||
|
style="@style/item_content"
|
||||||
|
android:focusable="false"
|
||||||
|
android:hint="未录入" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_hor_content">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title_23"
|
||||||
|
android:text="发证机关"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
|
android:id="@+id/et_issue_dept"
|
||||||
|
style="@style/item_content"
|
||||||
|
android:focusable="false"
|
||||||
|
android:hint="未录入" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/item_hor_content"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title"
|
||||||
|
android:text="获取日期"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:id="@+id/tv_start_date"
|
||||||
|
style="@style/item_content"
|
||||||
|
android:hint="未录入" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_hor_content">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title_23"
|
||||||
|
android:text="荣誉简介"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
|
android:id="@+id/et_remark"
|
||||||
|
style="@style/item_content"
|
||||||
|
android:focusable="false"
|
||||||
|
android:hint="未录入" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="5dp">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
style="@style/item_title_23_ver"
|
||||||
|
android:text="证件照片"
|
||||||
|
android:textSize="@dimen/text_15"
|
||||||
|
app:text_type_cus="2" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rlv_photo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:gravity="right"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:id="@+id/tv_cancel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="取消"
|
||||||
|
android:textColor="@color/gray_text" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:id="@+id/tv_confirm"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="保存"
|
||||||
|
android:textColor="@color/text_blue" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
@ -19,8 +20,8 @@
|
|||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title_23"
|
style="@style/item_title_23"
|
||||||
android:drawableLeft="@drawable/ic_start_hint"
|
android:text="单位名称"
|
||||||
android:text="单位名称" />
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
android:id="@+id/et_name"
|
android:id="@+id/et_name"
|
||||||
@ -32,8 +33,8 @@
|
|||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title_23"
|
style="@style/item_title_23"
|
||||||
android:drawableLeft="@drawable/ic_start_hint"
|
android:text="所在部门"
|
||||||
android:text="所在部门" />
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
android:id="@+id/et_dept"
|
android:id="@+id/et_dept"
|
||||||
@ -45,8 +46,8 @@
|
|||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title_23"
|
style="@style/item_title_23"
|
||||||
android:drawableLeft="@drawable/ic_start_hint"
|
android:text="工作内容"
|
||||||
android:text="工作内容" />
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
android:id="@+id/et_content"
|
android:id="@+id/et_content"
|
||||||
@ -58,8 +59,8 @@
|
|||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title_23"
|
style="@style/item_title_23"
|
||||||
android:drawableLeft="@drawable/ic_start_hint"
|
android:text="离职原因"
|
||||||
android:text="离职原因" />
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText
|
||||||
android:id="@+id/et_cause"
|
android:id="@+id/et_cause"
|
||||||
@ -72,13 +73,11 @@
|
|||||||
style="@style/item_hor_content"
|
style="@style/item_hor_content"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/style_hint_star"
|
|
||||||
android:visibility="visible" />
|
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title"
|
style="@style/item_title"
|
||||||
android:text="开始时间" />
|
android:text="开始时间"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_start_date"
|
android:id="@+id/tv_start_date"
|
||||||
@ -92,13 +91,11 @@
|
|||||||
style="@style/item_hor_content"
|
style="@style/item_hor_content"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/style_hint_star"
|
|
||||||
android:visibility="visible" />
|
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
style="@style/item_title"
|
style="@style/item_title"
|
||||||
android:text="结束时间" />
|
android:text="结束时间"
|
||||||
|
app:text_show_hint="true" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_end_date"
|
android:id="@+id/tv_end_date"
|
||||||
|
@ -1,11 +1,39 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/gray_f7"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<RelativeLayout
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/rl_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/shp_rectangle_white_10"
|
||||||
|
android:padding="10dp">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rlv_honour"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.CustomStateView
|
||||||
|
android:id="@+id/csv_state"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_confirm"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="个人荣誉" />
|
android:layout_below="@id/rl_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@drawable/sel_btn_submit"
|
||||||
|
android:text="新增"
|
||||||
|
android:textColor="@color/col_white_gray_press" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -28,7 +28,8 @@
|
|||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="时间:"
|
app:text_type_cus="2"
|
||||||
|
android:text="时间 : "
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
@ -70,6 +71,7 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/text_15"
|
android:textSize="@dimen/text_15"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
app:text_type_cus="2"
|
||||||
tools:text="学校名称" />
|
tools:text="学校名称" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -87,8 +89,9 @@
|
|||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="专业:"
|
android:text="专业 : "
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black"
|
||||||
|
app:text_type_cus="2" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_specialty"
|
android:id="@+id/tv_specialty"
|
||||||
@ -107,8 +110,9 @@
|
|||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="学历:"
|
android:text="学历 : "
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black"
|
||||||
|
app:text_type_cus="2" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_degree"
|
android:id="@+id/tv_degree"
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/text_15"
|
android:textSize="@dimen/text_15"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
app:text_type_cus="2"
|
||||||
tools:text="单位名称" />
|
tools:text="单位名称" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -45,6 +46,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="部门 : "
|
android:text="部门 : "
|
||||||
|
app:text_type_cus="2"
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
@ -65,6 +67,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="工作内容 : "
|
android:text="工作内容 : "
|
||||||
|
app:text_type_cus="2"
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
@ -86,6 +89,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="离职原因 : "
|
android:text="离职原因 : "
|
||||||
|
app:text_type_cus="2"
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
@ -105,7 +109,8 @@
|
|||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="时间:"
|
android:text="时间 : "
|
||||||
|
app:text_type_cus="2"
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -34,7 +35,8 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/text_15"
|
android:textSize="@dimen/text_15"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="学校名称" />
|
app:text_type_cus="2"
|
||||||
|
tools:text="荣誉称号" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -45,11 +47,12 @@
|
|||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="发证机关:"
|
android:text="发证机关 : "
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black"
|
||||||
|
app:text_type_cus="2" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_degree"
|
android:id="@+id/tv_dept"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
@ -65,8 +68,9 @@
|
|||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="获取日期:"
|
android:text="获取日期 : "
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black"
|
||||||
|
app:text_type_cus="2" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_date"
|
android:id="@+id/tv_date"
|
||||||
@ -86,13 +90,16 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="荣誉简介"
|
android:text="荣誉简介"
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black"
|
||||||
|
app:text_type_cus="2" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_remark"
|
android:id="@+id/tv_remark"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
tools:text="荣誉简介" />
|
tools:text="荣誉简介" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user