This commit is contained in:
hch 2024-01-17 11:12:53 +08:00
parent d9951b5a35
commit 5b813aff88
8 changed files with 36 additions and 45 deletions

View File

@ -26,26 +26,26 @@
android:orientation="horizontal">
<TextView
android:id="@+id/btn_confirm"
android:id="@+id/btn_cancel"
android:layout_width="100dp"
android:layout_height="35dp"
android:background="@mipmap/icon_del_sys_confirm"
android:gravity="center"
android:paddingBottom="2dp"
android:text="@string/confirm"
android:text="@string/sys_msg_cancel"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/btn_cancel"
android:id="@+id/btn_confirm"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginLeft="30dp"
android:background="@mipmap/icon_del_sys_cancel"
android:gravity="center"
android:paddingBottom="2dp"
android:text="@string/cancel"
android:text="@string/confirm"
android:textColor="@color/yellow_ff6c00"
android:textSize="14sp"
android:textStyle="bold" />

View File

@ -1445,4 +1445,6 @@ Limited ride And limited avatar frame</string>
<string name="game_review_view_information">Information</string>
<string name="game_review_view_unmute">Unmute</string>
<string name="game_review_view_sound_off">Mute</string>
<string name="sys_msg_cancel">Cancel</string>
</resources>

View File

@ -1444,4 +1444,5 @@
<string name="main_suspension_war_order">直播通行證</string>
<string name="sys_msg_cancel">取消</string>
</resources>

View File

@ -1443,4 +1443,6 @@
<string name="main_suspension_war_order">直播通行證</string>
<string name="sys_msg_cancel">取消</string>
</resources>

View File

@ -1440,4 +1440,6 @@
<string name="main_suspension_war_order">直播通行證</string>
<string name="sys_msg_cancel">取消</string>
</resources>

View File

@ -1449,4 +1449,6 @@ Limited ride And limited avatar frame</string>
<string name="main_suspension_war_order">BattlePass</string>
<string name="sys_msg_cancel">Cancel</string>
</resources>

View File

@ -6,6 +6,7 @@ import android.text.format.DateUtils;
import android.view.View;
import android.view.ViewOutlineProvider;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
@ -22,6 +23,7 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.RouteUtil;
@ -51,7 +53,6 @@ import java.util.Map;
@Route(path = RouteUtil.PATH_COMPENSATE_ACTIVITY)
public class CompensateActivity extends AbsActivity {
Banner banner_me;
TextView content;
TextView time;
RecyclerView recyclerView;
@ -59,6 +60,8 @@ public class CompensateActivity extends AbsActivity {
String msgId, mBanner, mContent, link;
Button submit;
ImageView imgContent;
@Override
protected int getLayoutId() {
return R.layout.activity_compensate;
@ -75,6 +78,7 @@ public class CompensateActivity extends AbsActivity {
content = findViewById(R.id.content);
submit = findViewById(R.id.submit);
time = findViewById(R.id.time);
imgContent = findViewById(R.id.img_content);
recyclerView = findViewById(R.id.hor_recycler);
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
@ -94,13 +98,6 @@ public class CompensateActivity extends AbsActivity {
time.setText(sdf.format(currenTimeZone));
content.setText(mContent);
banner_me = findViewById(R.id.banner_me);
banner_me.setOutlineProvider(new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
}
});
if (!getIntent().getBooleanExtra("receive", false)) {
submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received));
submit.setText(getString(R.string.receive2));
@ -130,13 +127,19 @@ public class CompensateActivity extends AbsActivity {
getMessageGiftInfo();
if (!StringUtils.isEmpty(mBanner)) {
List<SlideBean> mBannerList = new ArrayList<>();
SlideBean slideBean = new SlideBean();
slideBean.setSlide_pic(mBanner);
slideBean.setSlide_url(link);
mBannerList.add(slideBean);
showBanner(mBannerList);
ImgLoader.display(mContext, mBanner, imgContent);
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
StringBuffer urlBuffer = new StringBuffer();
urlBuffer.append(link).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE);
findViewById(R.id.lt_advertisement).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
}
});
}
}
@ -149,25 +152,4 @@ public class CompensateActivity extends AbsActivity {
}
});
}
private void showBanner(List<SlideBean> mBannerList) {
banner_me.setAutoPlay(true).setPages(mBannerList, new CustomMyViewHolder()).setDelayTime(3000).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() {
@Override
public void onBannerClick(List datas, int p) {
if (mBannerList != null) {
if (p >= 0 && p < mBannerList.size()) {
SlideBean bean = mBannerList.get(p);
if (!bean.getSlide_url().equals("")) {
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
StringBuffer urlBuffer = new StringBuffer();
urlBuffer.append(bean.getSlide_url()).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
}
}
}
}
}).start();
}
}

View File

@ -80,13 +80,13 @@
app:cardCornerRadius="10dp"
app:cardElevation="0dp">
<com.ms.banner.Banner
android:id="@+id/banner_me"
<ImageView
android:id="@+id/img_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:delay_time="5000"
app:indicator_height="8dp"
app:indicator_width="8dp" />
android:layout_height="87dp"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop" />
</androidx.cardview.widget.CardView>
</LinearLayout>