package com.basic.security.fragment;
|
|
import android.os.Bundle;
|
import android.view.LayoutInflater;
|
import android.view.View;
|
import android.view.ViewGroup;
|
|
import com.basic.security.base.BaseFragment;
|
import com.basic.security.utils.ResolutionAdaptation;
|
|
import org.androidannotations.annotations.AfterViews;
|
import org.androidannotations.annotations.EFragment;
|
import org.androidannotations.annotations.ViewById;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
import java.util.Set;
|
|
@EFragment
|
public class BackgroundAndBorderFragment extends BaseFragment {
|
@ViewById
|
public View topBlurView, topBlurView1, topBackground2_guest_mode, topBlurView2_guest_mode, topBlurView2, bottomBlurView, bottomBlurView2, topBackground, topBackground1, topBackground2,
|
bottomBackground, bottomBackground2, fullscreenBlurView, fullscreenBackground, topBackground3, bottomBackground3, topBlurView3, bottomBlurView3,
|
topBlurView4, topBackground4,
|
topBlurView5, topBackground5,
|
topBlurView5_left, topBackground5_left,
|
topBlurView5_right, topBackground5_right,
|
bottomBlurView4, bottomBackground4,
|
bottomBlurView5, bottomBackground5,
|
bottomBlurView6, bottomBackground6,
|
topBackground7_left, topBackground7_right,
|
topBlurView7_left, topBlurView7_right;
|
List<View> views = new ArrayList<>();
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
return inflater.inflate(ResolutionAdaptation.fragment_background_and_border(), container, false);
|
}
|
|
public void show() {
|
super.show();
|
Set<View> visibleViews = mainActivity().backgroundAndBorderViews.get(mainActivity().currentFragment);
|
for (View view : views) {
|
if (view != null) {
|
|
if (visibleViews != null && visibleViews.contains(view)) {
|
|
view.setVisibility(View.VISIBLE);
|
} else {
|
view.setVisibility(View.INVISIBLE);
|
}
|
}
|
}
|
}
|
|
@AfterViews
|
public void afterViews() {
|
views.add(topBlurView);
|
views.add(topBackground2_guest_mode);
|
views.add(topBlurView2_guest_mode);
|
views.add(topBlurView1);
|
views.add(topBlurView2);
|
views.add(topBlurView3);
|
views.add(bottomBlurView);
|
views.add(bottomBlurView2);
|
views.add(bottomBlurView3);
|
views.add(topBackground);
|
views.add(topBackground1);
|
views.add(topBackground2);
|
views.add(topBlurView7_left);
|
views.add(topBlurView7_right);
|
views.add(topBackground7_left);
|
views.add(topBackground7_right);
|
views.add(topBackground3);
|
views.add(bottomBackground);
|
views.add(bottomBackground2);
|
views.add(bottomBackground3);
|
views.add(fullscreenBlurView);
|
views.add(fullscreenBackground);
|
views.add(topBlurView4);
|
views.add(topBackground4);
|
views.add(topBlurView5);
|
views.add(topBackground5);
|
views.add(topBlurView5_left);
|
views.add(topBackground5_left);
|
views.add(topBlurView5_right);
|
views.add(topBackground5_right);
|
views.add(bottomBlurView4);
|
views.add(bottomBackground4);
|
views.add(bottomBlurView5);
|
views.add(bottomBackground5);
|
views.add(bottomBlurView6);
|
views.add(bottomBackground6);
|
for (View view : views) {
|
if (view != null) {
|
view.setVisibility(View.VISIBLE);
|
}
|
}
|
}
|
}
|