正在查看: Mint v5.7.3 应用的 SubscribeNewsLetterActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 SubscribeNewsLetterActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.htmedia.mint.ui.activity;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.core.content.res.ResourcesCompat;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProvider;
import com.htmedia.mint.AppController;
import com.htmedia.mint.pojo.NewsLetterResponseModel;
import com.htmedia.sso.network.ApiClient;
import com.htmedia.sso.network.ApiServices;
import com.htmedia.sso.network.CustomObserver;
import com.thoughtbot.expandablerecyclerview.BuildConfig;
import java.util.ArrayList;
import y7.v5;
public class SubscribeNewsLetterActivity extends com.htmedia.mint.ui.activity.a {
private x4.y2 a;
private v5 b;
class a extends CustomObserver<NewsLetterResponseModel> {
a(Context context, boolean z) {
super(context, z);
}
@Override
public void onNext(NewsLetterResponseModel newsLetterResponseModel) {
super.onNext((a) newsLetterResponseModel);
if (newsLetterResponseModel.getData() != null) {
ArrayList arrayList = new ArrayList();
arrayList.addAll(newsLetterResponseModel.getData().getFREE());
arrayList.addAll(newsLetterResponseModel.getData().getPAID());
SubscribeNewsLetterActivity.this.b.a = arrayList;
SubscribeNewsLetterActivity.this.L();
}
}
}
private void K() {
((ApiServices) ApiClient.getClient().create(ApiServices.class)).getNewsletterData(AppController.j().g().getNewsLetterNetcore().getGetAllNewsletter() + "?email=" + (com.htmedia.mint.utils.f0.G1(this, "userName") != null ? com.htmedia.mint.utils.f0.G1(this, "userEmail") : BuildConfig.FLAVOR) + "&domain=LM").s(sg.a.b()).k(ag.a.a()).a(new a(this, true));
}
public void L() {
this.a.j.setAdapter(new q7.n4(this, this.b.a));
this.a.j.setNestedScrollingEnabled(false);
}
private void setupDarkMode() {
if (!AppController.j().E()) {
getWindow().setStatusBarColor(-1);
getWindow().getDecorView().setSystemUiVisibility(8192);
this.a.p.setTitleTextColor(ResourcesCompat.getColor(getResources(), 2131101008, (Resources.Theme) null));
this.a.q.setBackgroundColor(getResources().getColor(2131100913));
return;
}
getWindow().setStatusBarColor(-16777216);
getWindow().getDecorView().setSystemUiVisibility(0);
this.a.p.setBackgroundColor(getResources().getColor(2131100008));
this.a.p.setTitleTextColor(ResourcesCompat.getColor(getResources(), 2131101009, (Resources.Theme) null));
this.a.q.setBackgroundColor(getResources().getColor(2131100008));
this.a.b.setBackgroundColor(getResources().getColor(2131100969));
this.a.g.setTextColor(getResources().getColor(2131101002));
this.a.f.setTextColor(getResources().getColor(2131100834));
this.a.i.setTextColor(getResources().getColor(2131101002));
this.a.h.setTextColor(getResources().getColor(2131100834));
this.a.a.setCardBackgroundColor(getResources().getColor(2131101012));
}
private void setupToolbar() {
this.a.p.setContentInsetStartWithNavigation(0);
setSupportActionBar(this.a.p);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);
}
this.a.p.setTitle(BuildConfig.FLAVOR);
}
private void setupViewModel() {
v5 v5Var = (v5) new ViewModelProvider(this).get(v5.class);
this.b = v5Var;
this.a.c(v5Var);
}
public void onBackPressed() {
setResult(-1);
finish();
}
public void onConfigurationChanged(@NonNull Configuration configuration) {
super.onConfigurationChanged(configuration);
AppController.e(getIntent(), this);
}
protected void onCreate(Bundle bundle) {
super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
setContentView(2131624025);
this.a = DataBindingUtil.setContentView(this, 2131624025);
setupToolbar();
setupDarkMode();
setupViewModel();
K();
}
}