正在查看: Mint v5.7.3 应用的 BookmarkFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 BookmarkFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.htmedia.mint.ui.fragments;
import android.app.Activity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.comscore.Analytics;
import com.htmedia.mint.AppController;
import com.htmedia.mint.pojo.Content;
import com.htmedia.mint.pojo.ForyouPojo;
import com.htmedia.mint.pojo.SectionData;
import com.htmedia.mint.pojo.config.Config;
import com.htmedia.mint.pojo.config.Section;
import com.htmedia.mint.ui.fragments.leftmenudrawer.model.LeftDrawerResponseParent;
import com.thoughtbot.expandablerecyclerview.BuildConfig;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.json.JSONObject;
import q7.h0;
import q7.k7;
import q7.q4;
import q7.s7;
import x4.wf;
public class BookmarkFragment extends Fragment implements k6.s, h0.b, k6.h0, h0.a, q4.i, s7.b, SwipeRefreshLayout.OnRefreshListener, View.OnClickListener, k6.v1, k7.b, com.htmedia.mint.ui.activity.d3 {
private AppController appController;
private wf binding;
private Bundle bundle;
private k6.r configPresenter;
private ForyouPojo forYouPojo;
public FrameLayout frameLayoutCloseButton;
private HashMap<String, String> headers;
private k6.g0 homePresenter;
private LinearLayoutManager horizontalLayoutManager;
public LinearLayout layoutClose;
private LinearLayoutManager linearLayoutManager;
private RecyclerView.Adapter recyclerViewAdapter;
private com.htmedia.mint.utils.l2 scrollListinerForCloseButton;
private Section section;
private k6.u1 sectionPresenter;
private k7 topNavTopicsAdapter;
private final String TAG = "BookmarkFragment";
public List<Section> topicsList = new ArrayList();
private final ArrayList<Content> list = new ArrayList<>();
private String serverUrl = BuildConfig.FLAVOR;
private void checkTheme(boolean z) {
if (z) {
this.binding.h.setBackgroundColor(getResources().getColor(2131100969));
this.binding.v.setBackgroundColor(getResources().getColor(2131100945));
this.binding.c.setBackgroundColor(getResources().getColor(2131100969));
this.binding.i.setBackgroundColor(getResources().getColor(2131100969));
this.binding.G.setTextColor(getResources().getColor(2131101009));
this.binding.H.setTextColor(getResources().getColor(2131101009));
this.binding.A.setShimmerColor(getResources().getColor(2131100802));
this.binding.w.q.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.g.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.a.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.r.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.h.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.b.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.s.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.i.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.c.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.t.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.j.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.d.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.u.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.o.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.e.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.v.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.p.setBackgroundColor(getResources().getColor(2131100799));
this.binding.w.f.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.a.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.e.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.c.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.f.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.g.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.d.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.h.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.i.setBackgroundColor(getResources().getColor(2131100799));
this.binding.x.b.setBackgroundColor(getResources().getColor(2131100799));
this.binding.J.setBackgroundColor(getResources().getColor(2131100799));
this.binding.K.setBackgroundColor(getResources().getColor(2131100799));
} else {
this.binding.h.setBackgroundColor(getResources().getColor(2131100968));
this.binding.v.setBackgroundColor(getResources().getColor(2131100944));
this.binding.c.setBackgroundColor(getResources().getColor(2131100968));
this.binding.i.setBackgroundColor(getResources().getColor(2131100968));
this.binding.G.setTextColor(getResources().getColor(2131101008));
this.binding.H.setTextColor(getResources().getColor(2131101008));
this.binding.A.setShimmerColor(getResources().getColor(2131100801));
this.binding.w.q.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.g.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.a.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.r.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.h.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.b.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.s.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.i.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.c.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.t.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.j.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.d.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.u.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.o.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.e.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.v.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.p.setBackgroundColor(getResources().getColor(2131100798));
this.binding.w.f.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.a.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.e.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.c.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.f.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.g.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.d.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.h.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.i.setBackgroundColor(getResources().getColor(2131100798));
this.binding.x.b.setBackgroundColor(getResources().getColor(2131100798));
this.binding.J.setBackgroundColor(getResources().getColor(2131100798));
this.binding.K.setBackgroundColor(getResources().getColor(2131100798));
}
k7 k7Var = this.topNavTopicsAdapter;
if (k7Var != null) {
k7Var.notifyDataSetChanged();
}
RecyclerView.Adapter adapter = this.recyclerViewAdapter;
if (adapter != null) {
adapter.notifyDataSetChanged();
}
}
private void closeButtonScrollListiner() {
if (this.recyclerViewAdapter instanceof q7.h0) {
this.scrollListinerForCloseButton.setContentPojosList(this.list);
this.frameLayoutCloseButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int itemClicked = BookmarkFragment.this.scrollListinerForCloseButton.getItemClicked();
BookmarkFragment.this.collapseView(itemClicked);
BookmarkFragment.this.binding.c.scrollToPosition(itemClicked);
}
});
}
}
public void collapseView(int i) {
Content content = this.list.get(i);
content.setCloseButtonSticky(false);
content.setExpanded(false);
this.list.set(i, content);
((q7.h0) this.recyclerViewAdapter).p(this.list);
this.layoutClose.setVisibility(4);
this.recyclerViewAdapter.notifyItemChanged(i);
}
private void expandView(int i) {
Content content = this.list.get(i);
content.setCloseButtonSticky(false);
content.setExpanded(false);
this.layoutClose.setVisibility(4);
this.recyclerViewAdapter.notifyItemChanged(i);
}
private void findListingTemplate(HashMap<String, String> hashMap, Section section) {
if (com.htmedia.mint.utils.f0.G1(getActivity(), "userToken") != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("siteId", "LM");
} catch (Exception e) {
com.htmedia.mint.utils.o0.g(e, getClass().getSimpleName());
}
String ssoBaseUrl = this.appController.g().getSso().getSsoBaseUrl();
this.homePresenter.f(1, "BookmarkFragment", ssoBaseUrl + this.appController.g().getBookmark().getFetchBookmark() + "0", jSONObject, hashMap, false, false);
}
}
private String getDefaultNavigationUrl(Config config) {
for (Section section : config.getOthers()) {
if (section.getId().equalsIgnoreCase(com.htmedia.mint.utils.q.d[11])) {
String url = section.getUrl();
if (url.contains("http")) {
return url;
}
return this.serverUrl + url;
}
}
return BuildConfig.FLAVOR;
}
private Section getStoryDetailSection(Config config) {
for (Section section : config.getOthers()) {
if (section.getId().equalsIgnoreCase(com.htmedia.mint.utils.q.d[6])) {
return section;
}
}
return null;
}
private String getTemplete(Section section) {
return section.getTemplate();
}
private int getTempleteIndex(String str) {
int i = 0;
while (true) {
String[] strArr = com.htmedia.mint.utils.q.c;
if (i >= strArr.length) {
return 1;
}
if (str.trim().equalsIgnoreCase(strArr[i])) {
return i;
}
i++;
}
}
private String getTimeStampUrl(Config config) {
for (Section section : config.getOthers()) {
if (section.getId().equalsIgnoreCase(com.htmedia.mint.utils.q.d[0])) {
String url = section.getUrl();
if (url.contains("http")) {
return url;
}
return this.serverUrl + url;
}
}
return BuildConfig.FLAVOR;
}
private String getURL(Section section) {
return section.getUrl();
}
private void iniAdapterByTemplate(int i) {
if (i == 0) {
q7.h0 h0Var = new q7.h0(getActivity(), this.list, this, this, getActivity(), this.section, this.linearLayoutManager, true, this, this.topicsList, this, null, false, this, this);
this.recyclerViewAdapter = h0Var;
h0Var.s(false);
} else {
if (i == 1) {
this.recyclerViewAdapter = new q4(getActivity(), getActivity(), this.list, this, this.section, this.topicsList, this, false, false);
} else if (i == 3) {
this.recyclerViewAdapter = new s7(getActivity(), getActivity(), this.list, this, getArguments().getString("topicName"), this.forYouPojo);
}
}
}
private void initScrollListiner() {
if (getActivity() != null) {
this.scrollListinerForCloseButton = new com.htmedia.mint.utils.l2(getActivity(), this.binding.getRoot(), this.binding.c, this.linearLayoutManager) {
@Override
public void onLoadMore(int i, int i2) {
if (com.htmedia.mint.utils.f0.G1(BookmarkFragment.this.getActivity(), "userToken") != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("siteId", "LM");
} catch (Exception unused) {
}
if (BookmarkFragment.this.list.size() % 10 != 0 || BookmarkFragment.this.list.size() == 0) {
return;
}
String ssoBaseUrl = BookmarkFragment.this.appController.g().getSso().getSsoBaseUrl();
BookmarkFragment.this.homePresenter.f(1, "BookmarkFragment", ssoBaseUrl + BookmarkFragment.this.appController.g().getBookmark().getFetchBookmark() + i, jSONObject, BookmarkFragment.this.headers, false, false);
}
}
};
if (TextUtils.isEmpty(this.section.getTemplate())) {
this.scrollListinerForCloseButton.setTemplate(this.section.getDesign());
} else {
this.scrollListinerForCloseButton.setTemplate(this.section.getTemplate());
}
this.binding.c.addOnScrollListener(this.scrollListinerForCloseButton);
}
}
private void onListItemClick(int i, Content content, ArrayList<Content> arrayList, Activity activity) {
try {
Bundle bundle = new Bundle();
bundle.putString(com.htmedia.mint.utils.n.Y, "Bookmark");
g7.a.u((AppCompatActivity) activity, bundle, content, arrayList);
} catch (Exception e) {
e.printStackTrace();
}
}
private void setTopicData() {
String defaultNavigationUrl = getDefaultNavigationUrl(this.appController.g());
k6.u1 u1Var = new k6.u1(getActivity(), this);
this.sectionPresenter = u1Var;
u1Var.a(0, "LeftMenuFragment", defaultNavigationUrl, this.headers, false, true);
}
private void showNoDataAvailableErrorPage() {
this.binding.c.setVisibility(8);
this.binding.j.setVisibility(0);
this.binding.g.setImageResource(2131233748);
this.binding.G.setVisibility(0);
this.binding.G.setText(2131952310);
this.binding.H.setText(2131952308);
this.binding.a.setVisibility(8);
}
@Override
public void getAllBookmarkList(List<String> list) {
}
@Override
public void getConfig(Config config) {
AppController application = getActivity().getApplication();
this.appController = application;
application.L(config);
this.serverUrl = this.appController.g().getServerUrl();
this.binding.a.setOnClickListener(this);
initCall(this.bundle);
}
@Override
public void getSection(SectionData sectionData) {
if (sectionData.getResult().size() > 0) {
com.htmedia.mint.utils.o1.a("topics availabe", sectionData.getResult().size() + BuildConfig.FLAVOR);
this.binding.v.setVisibility(0);
this.topicsList.clear();
this.topicsList.addAll(sectionData.getResult());
this.topNavTopicsAdapter.notifyDataSetChanged();
}
}
@Override
public void getSectionAAndC(LeftDrawerResponseParent leftDrawerResponseParent) {
}
public void getStoryData(ForyouPojo foryouPojo) {
}
@Override
public void getStoryData(ForyouPojo foryouPojo, String str) {
this.binding.A.setVisibility(8);
this.binding.A.stopShimmerAnimation();
setTopicData();
setStoryData(foryouPojo);
}
public void initCall(Bundle bundle) {
showNoInternetBackGround(false);
if (bundle != null) {
Section section = new Section();
this.section = section;
section.setTemplate("card");
this.section.setDisplayName("Bookmark page");
this.binding.z.setVisibility(8);
this.binding.y.setVisibility(0);
this.binding.A.startShimmerAnimation();
iniAdapterByTemplate(0);
this.binding.c.setAdapter(this.recyclerViewAdapter);
initScrollListiner();
closeButtonScrollListiner();
this.homePresenter = new k6.g0(getActivity(), this);
HashMap<String, String> hashMap = new HashMap<>();
this.headers = hashMap;
hashMap.put("Authorization", com.htmedia.mint.utils.f0.G1(getActivity(), "userToken"));
findListingTemplate(this.headers, this.section);
}
}
@Override
public boolean isFreemium() {
return super.isFreemium();
}
@Override
public boolean isRFVTag() {
return super.isRFVTag();
}
@Override
public void onBookmarkDelete(ArrayList<Content> arrayList) {
if (arrayList == null) {
showNoDataAvailableErrorPage();
} else if (arrayList.size() == 0) {
showNoDataAvailableErrorPage();
}
}
@Override
public void onClick(View view) {
if (view.getId() == 2131427754 && this.bundle != null && com.htmedia.mint.utils.m0.a(getActivity())) {
showNoInternetBackGround(false);
initCall(this.bundle);
}
}
@Override
public void onCloseButtonClick(int i, Content content) {
com.htmedia.mint.utils.n.M(getActivity(), com.htmedia.mint.utils.n.z2, "home", content, BuildConfig.FLAVOR, com.htmedia.mint.utils.n.c0);
collapseView(i);
this.binding.c.scrollToPosition(i);
}
@Nullable
public View onCreateView(@NonNull LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) {
this.binding = wf.c(layoutInflater, viewGroup, false);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
this.linearLayoutManager = linearLayoutManager;
this.binding.c.setLayoutManager(linearLayoutManager);
LinearLayoutManager linearLayoutManager2 = new LinearLayoutManager(getActivity(), 0, false);
this.horizontalLayoutManager = linearLayoutManager2;
this.binding.v.setLayoutManager(linearLayoutManager2);
k7 k7Var = new k7(getActivity(), this.topicsList, this, 0);
this.topNavTopicsAdapter = k7Var;
this.binding.v.setAdapter(k7Var);
this.binding.o.setRefreshing(false);
this.binding.o.setEnabled(false);
showErrorBackGround(BuildConfig.FLAVOR);
checkTheme(AppController.j().E());
if (getActivity().g != null) {
getActivity().g.setVisible(true);
}
return this.binding.getRoot();
}
@Override
public void onError(String str) {
}
@Override
public void onError(String str, String str2) {
com.htmedia.mint.utils.l2 l2Var = this.scrollListinerForCloseButton;
if (l2Var != null) {
l2Var.backToPreviousScroll();
}
this.recyclerViewAdapter.notifyDataSetChanged();
this.binding.A.setVisibility(8);
this.binding.A.stopShimmerAnimation();
showErrorBackGround(str);
}
@Override
public void onError(String str, String str2, String str3) {
}
@Override
public void onListItemClick(int i, Content content, RecyclerView.Adapter adapter, Section section, ArrayList<Content> arrayList) {
Bundle bundle = new Bundle();
bundle.putString(com.htmedia.mint.utils.n.Y, "Bookmark");
g7.a.u(getActivity(), bundle, content, arrayList);
}
public void onPause() {
super.onPause();
Analytics.notifyExitForeground();
}
@Override
public void onPersonalisedHyperLinkClick(int i, Content content, Section section) {
}
@Override
public void onRecycleItemClick(int i, Content content, ArrayList<Content> arrayList, boolean z) {
if (getActivity() != null) {
onListItemClick(i, content, arrayList, getActivity());
}
}
public void onRefresh() {
this.list.clear();
initCall(getArguments());
}
public void onResume() {
super.onResume();
Analytics.notifyEnterForeground();
if (getTag() != null) {
getActivity().f4(false, getTag().toUpperCase());
}
if (AppController.j().C()) {
checkTheme(AppController.j().E());
}
if (this.recyclerViewAdapter != null) {
updateAndRefreshList();
}
}
public void onScroll(int i) {
}
public void onSectionListItemClick(int i, Content content) {
}
@Override
public void onTopNavTopicClick(int i, int i2, Section section) {
openSection(section);
}
@Override
public void onTopicListItemClick(int i, Content content) {
if (getStoryDetailSection(this.appController.g()) != null) {
FragmentManager supportFragmentManager = getActivity().getSupportFragmentManager();
HomeFragment homeFragment = new HomeFragment();
Bundle bundle = new Bundle();
bundle.putString("story_id", String.valueOf(content.getId()));
bundle.putParcelable("top_section_section", getStoryDetailSection(this.appController.g()));
homeFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, homeFragment, "Tag_Story_Detail").addToBackStack("Tag_Story_Detail").commit();
}
}
public void onViewCreated(@NonNull View view, @Nullable Bundle bundle) {
super.onViewCreated(view, bundle);
if (AppController.j().E()) {
this.binding.c.setBackgroundColor(getResources().getColor(2131100969));
} else {
this.binding.c.setBackgroundColor(getResources().getColor(2131100968));
}
LinearLayout linearLayout = (LinearLayout) getActivity().findViewById(2131429271);
this.layoutClose = linearLayout;
linearLayout.setVisibility(4);
this.frameLayoutCloseButton = (FrameLayout) getActivity().findViewById(2131428019);
this.appController = getActivity().getApplication();
this.bundle = getArguments();
if (getActivity().i0.a.q != null) {
getActivity().i0.a.q.setExpanded(true, true);
}
AppController appController = this.appController;
if (appController == null || appController.g() == null) {
k6.r rVar = new k6.r(getActivity(), this);
this.configPresenter = rVar;
rVar.e(0, "BookmarkFragment", "https://images.livemint.com/apps/v3/deviceconfig.json", true, false);
} else {
this.serverUrl = this.appController.g().getServerUrl();
this.binding.a.setOnClickListener(this);
initCall(this.bundle);
}
if (getActivity().g != null && getActivity().h != null) {
if (com.htmedia.mint.utils.f0.G1(getActivity(), "userName") != null) {
getActivity().g.setVisible(false);
getActivity().h.setVisible(true);
} else {
getActivity().g.setVisible(true);
getActivity().h.setVisible(false);
}
}
if (getActivity().i0.a.b.getVisibility() == 0) {
if (getActivity().i0.a.x.getVisibility() == 0) {
this.binding.c.setPadding(0, 0, 0, com.htmedia.mint.utils.f0.a0(100));
return;
} else {
this.binding.c.setPadding(0, 0, 0, com.htmedia.mint.utils.f0.a0(70));
return;
}
}
if (getActivity().i0.a.x.getVisibility() == 0) {
this.binding.c.setPadding(0, 0, 0, com.htmedia.mint.utils.f0.a0(50));
} else {
this.binding.c.setPadding(0, 0, 0, 0);
}
}
public void openSection(Section section) {
FragmentManager supportFragmentManager = getActivity().getSupportFragmentManager();
HomeFragment homeFragment = new HomeFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("top_section_section", section);
bundle.putBoolean("is_from_left_nav", true);
homeFragment.setArguments(bundle);
supportFragmentManager.beginTransaction().add(2131429286, homeFragment, "Tag_Section").addToBackStack("Tag_Section").commit();
getActivity().f4(false, section.getDisplayName().toUpperCase());
}
public void setStoryData(ForyouPojo foryouPojo) {
if (foryouPojo == null || foryouPojo.getContentList() == null || foryouPojo.getContentList().size() <= 0) {
return;
}
if (foryouPojo.getContentList().get(0).getListElement() == null) {
this.list.addAll(foryouPojo.getContentList());
((q7.h0) this.recyclerViewAdapter).q(true);
this.binding.c.post(new Runnable() {
@Override
public void run() {
BookmarkFragment.this.recyclerViewAdapter.notifyItemInserted(BookmarkFragment.this.list.size() - 1);
}
});
return;
}
this.forYouPojo = foryouPojo;
Content content = foryouPojo.getContentList().get(0);
content.setCloseButtonSticky(true);
content.setExpanded(true);
if (this.list.size() > 0) {
this.list.set(this.scrollListinerForCloseButton.getItemClicked(), content);
this.recyclerViewAdapter.notifyItemChanged(this.scrollListinerForCloseButton.getItemClicked());
} else {
this.list.add(content);
this.recyclerViewAdapter.notifyDataSetChanged();
}
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(1000L);
BookmarkFragment.this.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
if (BookmarkFragment.this.scrollListinerForCloseButton.isLastVisibleItemCrossBaseLine(BookmarkFragment.this.scrollListinerForCloseButton.getItemClicked())) {
BookmarkFragment.this.layoutClose.setVisibility(0);
} else {
BookmarkFragment.this.layoutClose.setVisibility(4);
}
}
});
} catch (Exception e) {
e.printStackTrace();
com.htmedia.mint.utils.o0.g(e, getClass().getSimpleName());
}
}
}).start();
this.section = this.appController.g().getBottomNav().get(0);
}
public void showErrorBackGround(String str) {
if (str.equalsIgnoreCase("server not responding") || str.equalsIgnoreCase("JSONEXPECTION")) {
this.binding.c.setVisibility(8);
this.binding.v.setVisibility(8);
this.binding.j.setVisibility(0);
this.binding.g.setImageResource(2131232480);
this.binding.G.setVisibility(8);
this.binding.H.setText(2131952025);
this.binding.a.setVisibility(0);
return;
}
if (!str.equalsIgnoreCase("Network not available")) {
this.binding.c.setVisibility(0);
this.binding.v.setVisibility(0);
this.binding.j.setVisibility(8);
return;
}
this.binding.v.setVisibility(8);
this.binding.c.setVisibility(8);
this.binding.j.setVisibility(0);
this.binding.g.setImageResource(2131232697);
this.binding.G.setVisibility(8);
this.binding.H.setText(2131952314);
this.binding.a.setVisibility(0);
}
public void showNoInternetBackGround(boolean z) {
if (!z) {
this.binding.c.setVisibility(0);
this.binding.v.setVisibility(0);
this.binding.j.setVisibility(8);
return;
}
this.binding.c.setVisibility(8);
this.binding.v.setVisibility(8);
this.binding.j.setVisibility(0);
this.binding.g.setImageResource(2131232697);
this.binding.G.setVisibility(8);
this.binding.H.setText(2131952314);
this.binding.a.setVisibility(0);
}
public void updateAndRefreshList() {
ArrayList<Content> arrayList = this.list;
if (arrayList == null || arrayList.size() <= 0 || this.recyclerViewAdapter == null) {
return;
}
if (this.headers == null) {
this.headers = new HashMap<>();
}
this.headers.put("Authorization", com.htmedia.mint.utils.f0.G1(getActivity(), "userToken"));
this.list.clear();
findListingTemplate(this.headers, this.section);
}
}