|
|
@@ -8,10 +8,13 @@ import android.util.Pair;
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
import androidx.annotation.Nullable;
|
|
|
+import androidx.core.widget.NestedScrollView;
|
|
|
import androidx.recyclerview.widget.GridLayoutManager;
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
|
|
|
|
import com.atmob.app.lib.base.BaseActivity;
|
|
|
+import com.atmob.common.logging.AtmobLog;
|
|
|
+import com.atmob.common.ui.SizeUtil;
|
|
|
import com.datarecovery.master.databinding.ActivityMemberBinding;
|
|
|
import com.datarecovery.master.dialog.AlipayQrCodeDialog;
|
|
|
import com.datarecovery.master.dialog.ChoosePaymentWayDialog;
|
|
|
@@ -35,7 +38,7 @@ import dagger.hilt.android.AndroidEntryPoint;
|
|
|
public class MemberActivity extends BaseActivity<ActivityMemberBinding> {
|
|
|
|
|
|
|
|
|
- private static final String MEMBER_TYPE = "member_type";
|
|
|
+ public static final String MEMBER_TYPE = "member_type";
|
|
|
private MemberViewModel memberViewModel;
|
|
|
|
|
|
private GoodsItemAdapter goodsItemAdapter;
|
|
|
@@ -51,6 +54,8 @@ public class MemberActivity extends BaseActivity<ActivityMemberBinding> {
|
|
|
private AlipayQrCodeDialog alipayQrCodeDialog;
|
|
|
private WechatPayQrCodeDialog wechatPayQrCodeDialog;
|
|
|
|
|
|
+ private int maxScrollY;
|
|
|
+
|
|
|
|
|
|
public static void start(Context context, @MemberType String type) {
|
|
|
Intent intent = new Intent(context, MemberActivity.class);
|
|
|
@@ -77,7 +82,6 @@ public class MemberActivity extends BaseActivity<ActivityMemberBinding> {
|
|
|
}
|
|
|
|
|
|
private void initView() {
|
|
|
- addTopStatusBarHeight(binding.toolbar);
|
|
|
goodsItemAdapter = new GoodsItemAdapter(this);
|
|
|
binding.memberDetailList.setAdapter(goodsItemAdapter);
|
|
|
binding.memberDetailList.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
|
|
|
@@ -94,6 +98,19 @@ public class MemberActivity extends BaseActivity<ActivityMemberBinding> {
|
|
|
binding.userEvaluateRyView.setAdapter(memberEvaluateAdapter);
|
|
|
|
|
|
binding.iconBack.setOnClickListener(v -> onBackPressed());
|
|
|
+
|
|
|
+ maxScrollY = (int) (SizeUtil.getScreenHeight() * 0.2f);
|
|
|
+ binding.nestedScrollView.setOnScrollChangeListener((NestedScrollView.OnScrollChangeListener) (v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
|
|
|
+ if (scrollY > maxScrollY) {
|
|
|
+ binding.viewStatusBar.setAlpha(1f);
|
|
|
+ binding.viewToolBar.setAlpha(1f);
|
|
|
+ binding.tvTitle.setAlpha(1f);
|
|
|
+ } else {
|
|
|
+ binding.viewStatusBar.setAlpha(scrollY * 1f / maxScrollY);
|
|
|
+ binding.viewToolBar.setAlpha(scrollY * 1f / maxScrollY);
|
|
|
+ binding.tvTitle.setAlpha(scrollY * 1f / maxScrollY);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
private void initObserver() {
|