up主认证功能和邀请有礼的UI
This commit is contained in:
@@ -24,7 +24,8 @@ public class ConstUrl {
|
||||
public static final String SOCKET_USERSTATIS = "wss://ws.whnuanbeinikj.cn?user_id=";
|
||||
public static final String SOCKET_SPEED_DATE = DEBUG ? (DEBUG1 ? "wss://pre.ws.whnuanbeinikj.cn/speed?token=" : "wss://ws.whnuanbeinikj.cn/speed?token=") :
|
||||
"wss://ws.whnuanbeinikj.cn/speed?token=";
|
||||
public final static String IMAGE_URL = "http://qianyan-asset.oss-cn-shanghai.aliyuncs.com/";
|
||||
//public final static String IMAGE_URL = "http://qianyan-asset.oss-cn-shanghai.aliyuncs.com/";
|
||||
public final static String IMAGE_URL = "http://oss.jindashengkj.cn/";
|
||||
public final static String BASE_URL = BASE_ROOT + "api/";
|
||||
public final static String APP_FIELD = "app/";
|
||||
public final static String AUTH_FIELD = "passport/";
|
||||
|
||||
@@ -127,13 +127,13 @@ public class InfoEditPhotoRecyclerAdapter extends RecyclerView.Adapter implement
|
||||
|
||||
} else if (0 == position) {
|
||||
dataHolder.mDeleteView.setVisibility(View.VISIBLE);
|
||||
dataHolder.mHeadPhotoView.setVisibility(View.VISIBLE);
|
||||
dataHolder.mPhotoView.setVisibility(GONE);
|
||||
dataHolder.mHeadPhotoView.setVisibility(GONE);
|
||||
dataHolder.mPhotoView.setVisibility(View.VISIBLE);
|
||||
dataHolder.mEmptyView.setVisibility(GONE);
|
||||
if (imagePath.contains("uploads/")) {
|
||||
dataHolder.mHeadPhotoView.setImageURI(StrU.getResourcePath(imagePath, mContext));
|
||||
dataHolder.mPhotoView.setImageURI(StrU.getResourcePath(imagePath, mContext));
|
||||
} else {
|
||||
dataHolder.mHeadPhotoView.setImageURI("file://" + imagePath);
|
||||
dataHolder.mPhotoView.setImageURI("file://" + imagePath);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -41,6 +41,8 @@ public class InvitationActivity extends BaseActivity implements
|
||||
private String qrImageUrl;
|
||||
ActivityInvitationBinding binding;
|
||||
private List<String> posterList;
|
||||
private TextView tv_zg;
|
||||
private TextView tv_my_fc_bl;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -77,6 +79,9 @@ public class InvitationActivity extends BaseActivity implements
|
||||
// });
|
||||
|
||||
|
||||
tv_zg = findViewById(R.id.tv_zg);
|
||||
tv_my_fc_bl = findViewById(R.id.tv_my_fc_bl);
|
||||
|
||||
mShareDialog = new BottomShareDialog(this, R.style.SelectiveDialog);
|
||||
mShareDialog.setOnButtonSelectListener(this);
|
||||
binding.ruleBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -100,6 +105,13 @@ public class InvitationActivity extends BaseActivity implements
|
||||
mShareDialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
/*binding.tv_share_btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mShareDialog.show();
|
||||
}
|
||||
});*/
|
||||
if (UserManager.getUserInfo().getGender() == 2) {
|
||||
binding.tvManTip.setVisibility(View.GONE);
|
||||
binding.menTip1.setVisibility(View.GONE);
|
||||
@@ -200,6 +212,9 @@ public class InvitationActivity extends BaseActivity implements
|
||||
binding.firstLabel.setText(result.getReward().getFirst());
|
||||
binding.secondLabel.setText(result.getReward().getSecond());
|
||||
binding.thirdLabel.setText(result.getReward().getThird());
|
||||
//TODO 需要接口返回准确数据
|
||||
tv_zg.setText("最高" + result.getReward().getFour() +"分成");
|
||||
tv_my_fc_bl.setText(result.getReward().getThird());
|
||||
binding.fourLabel.setText(result.getReward().getFour() + "");
|
||||
posterList = result.getAvatar_list();
|
||||
binding.totalPeopleLabel.setText(result.getTotal().getTotal_invite() + "");
|
||||
|
||||
@@ -853,10 +853,8 @@ public class SettingFragment extends Fragment implements View.OnClickListener {
|
||||
mName.setText("每日任务");
|
||||
view.setOnClickListener(view16 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
/*Intent intent = new Intent(getActivity(), MissionActivity.class);
|
||||
startActivity(intent);*/
|
||||
|
||||
startActivity(new Intent(getActivity(), UpPrivilegeActivity.class));
|
||||
Intent intent = new Intent(getActivity(), MissionActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -671,7 +671,6 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
||||
view.setOnClickListener(view19 -> {
|
||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||
startActivity(new Intent(getActivity(), GoddessPrivilegeActivity.class));
|
||||
// startActivity(new Intent(getActivity(), UpPrivilegeActivity.class));
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -291,7 +291,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
formDTO = result.getForm();
|
||||
if(formDTO != null) {
|
||||
sd_avatar.setImageURI(ConstUrl.IMAGE_URL + formDTO.getAvatar());
|
||||
//sd_avatar.setImageURI("http://xqasset.whnuanbeinikj.cn/uploads/album/202604/02/c0b2434c43939911a34f5dffb03f2101_.pic.jpg");
|
||||
//sd_avatar.setImageURI("http://oss.jindashengkj.cn/uploads/album/202604/02/c0b2434c43939911a34f5dffb03f2101_.pic.jpg");
|
||||
|
||||
tv_nikename.setText(formDTO.getNickname());
|
||||
tv_sign.setText(formDTO.getSignature());
|
||||
|
||||
BIN
app/src/main/res/drawable-xhdpi/ic_zg_invite_bg.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_zg_invite_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
6
app/src/main/res/drawable/bg_e9403d.xml
Normal file
6
app/src/main/res/drawable/bg_e9403d.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#1AE9403D"/>
|
||||
<stroke android:color="@color/white" android:width="@dimen/dp1"/>
|
||||
<corners android:radius="@dimen/dp8"/>
|
||||
</shape>
|
||||
13
app/src/main/res/drawable/bg_invite.xml
Normal file
13
app/src/main/res/drawable/bg_invite.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp8"/>
|
||||
<gradient android:startColor="#FCF3EA"
|
||||
android:endColor="#FDF7FB"
|
||||
android:angle="270"
|
||||
/>
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFFFFF" />
|
||||
|
||||
</shape>
|
||||
13
app/src/main/res/drawable/bg_invite_share.xml
Normal file
13
app/src/main/res/drawable/bg_invite_share.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp50"/>
|
||||
<gradient android:startColor="#F1A364"
|
||||
android:endColor="#E9413C"
|
||||
android:angle="0"
|
||||
/>
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFFFFF" />
|
||||
|
||||
</shape>
|
||||
@@ -40,6 +40,7 @@
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="none"
|
||||
android:fillViewport="true">
|
||||
|
||||
<RelativeLayout
|
||||
@@ -55,11 +56,63 @@
|
||||
android:src="@mipmap/invitaion_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp45"
|
||||
android:src="@mipmap/ic_invite_01"/>
|
||||
android:src="@mipmap/ic_invite_01" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_zg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp14"
|
||||
android:layout_below="@+id/iv_title_img"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/ic_zg_invite_bg"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_my_fc_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp14"
|
||||
android:layout_below="@+id/tv_zg"
|
||||
android:layout_marginTop="@dimen/dp35"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textColor="#9A6222"
|
||||
android:textStyle="bold"
|
||||
android:text="我的分成比例"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_my_fc_bl_tt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp14"
|
||||
android:layout_below="@+id/tv_my_fc_title"
|
||||
android:layout_marginTop="@dimen/dp40"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textColor="#E95340"
|
||||
android:textStyle="bold"
|
||||
android:text="永久分成"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_my_fc_bl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp45"
|
||||
android:layout_below="@+id/tv_my_fc_bl_tt"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textColor="#E95340"
|
||||
android:textStyle="bold"
|
||||
android:text="0%"/>
|
||||
|
||||
<com.flyco.roundview.RoundTextView
|
||||
android:id="@+id/ruleBtn"
|
||||
@@ -72,24 +125,26 @@
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="规则详情"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14dp"
|
||||
app:rv_backgroundColor="#7A69FE"
|
||||
app:rv_cornerRadius_BL="36dp"
|
||||
app:rv_cornerRadius_TL="36dp" />
|
||||
|
||||
<com.flyco.roundview.RoundLinearLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/bgImageView"
|
||||
android:layout_below="@+id/tv_tip"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:visibility="visible"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:background="@drawable/bg_invite"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
app:rv_backgroundColor="#FCF3EA"
|
||||
app:rv_cornerRadius="12dp">
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_label"
|
||||
@@ -310,13 +365,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.flyco.roundview.RoundTextView
|
||||
<TextView
|
||||
android:id="@+id/shareLinkBtn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
@@ -324,13 +379,12 @@
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:rv_backgroundColor="#FE3846"
|
||||
app:rv_cornerRadius="36dp" />
|
||||
android:background="@drawable/bg_invite_share" />
|
||||
|
||||
<com.flyco.roundview.RoundTextView
|
||||
<TextView
|
||||
android:id="@+id/sharePosterBtn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
@@ -338,15 +392,13 @@
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:rv_backgroundColor="#FE3846"
|
||||
app:rv_cornerRadius="36dp" />
|
||||
android:background="@drawable/bg_invite_share" />
|
||||
</LinearLayout>
|
||||
</com.flyco.roundview.RoundLinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/bgImageView"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="-34dp"
|
||||
android:src="@mipmap/icon_invitation_tip"
|
||||
@@ -359,6 +411,7 @@
|
||||
android:layout_below="@+id/container"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginRight="16dp">
|
||||
|
||||
<TextView
|
||||
@@ -380,22 +433,21 @@
|
||||
android:textSize="12dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.flyco.roundview.RoundRelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_mine_invite"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_below="@+id/ruleContainer"
|
||||
android:layout_height="@dimen/dp130"
|
||||
android:layout_below="@+id/bgImageView"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:rv_backgroundColor="#FCF3EA"
|
||||
app:rv_cornerRadius="12dp">
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_invite">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="我的收益"
|
||||
android:text="我的邀请"
|
||||
android:textColor="@color/one_text"
|
||||
android:textSize="14dp"
|
||||
android:textStyle="bold" />
|
||||
@@ -408,14 +460,15 @@
|
||||
android:layout_margin="16dp"
|
||||
android:drawableRight="@mipmap/indicator_right"
|
||||
android:text="我邀请的人"
|
||||
android:visibility="gone"
|
||||
android:textColor="#ffc3342b"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
@@ -430,8 +483,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="@color/one_text"
|
||||
android:textSize="24dp"
|
||||
android:textColor="#E95340"
|
||||
android:textSize="30dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -443,19 +496,25 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="累计邀请"
|
||||
android:textColor="@color/one_text"
|
||||
android:text="共邀请用户"
|
||||
android:textColor="#E95340"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" (人)"
|
||||
android:visibility="gone"
|
||||
android:textColor="#C3342B"
|
||||
android:textSize="12dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="@dimen/dp55"
|
||||
android:background="#E95340"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
@@ -468,8 +527,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="@color/one_text"
|
||||
android:textSize="24dp"
|
||||
android:textColor="#E95340"
|
||||
android:textSize="30dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -481,8 +540,8 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="累计充值"
|
||||
android:textColor="@color/one_text"
|
||||
android:text="邀请分红"
|
||||
android:textColor="#E95340"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<TextView
|
||||
@@ -499,6 +558,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@@ -532,7 +592,70 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.flyco.roundview.RoundRelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rule_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/ll_mine_invite"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:background="@drawable/bg_invite"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="邀请规则"
|
||||
android:textColor="@color/one_text"
|
||||
android:textSize="14dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp46"
|
||||
android:layout_below="@+id/rule_layout"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/dp13"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp20"
|
||||
android:background="@drawable/bg_e9403d"
|
||||
android:text="邀请用户时请确保用户从分享链接或图片下载APP"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/rule_layout"
|
||||
android:textColor="#E95340"
|
||||
android:textSize="@dimen/dp13"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp20"
|
||||
android:text="最终解释权归平台所有"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_share_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp50"
|
||||
android:textStyle="bold"
|
||||
android:text="立即邀请"
|
||||
android:textSize="@dimen/dp20"
|
||||
android:textColor="@color/white"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="@dimen/dp20"
|
||||
android:layout_marginTop="@dimen/dp25"
|
||||
android:visibility="gone"
|
||||
android:layout_below="@+id/tv_tip"
|
||||
android:layout_marginHorizontal="@dimen/dp20"
|
||||
android:background="@drawable/bg_invite_share"/>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
|
||||
Reference in New Issue
Block a user